You can't really compare the language C++ with the library Python.
You could compare C++ / SDL with Python / Pygame, and probably C++ would be
faster (but maybe by not as much as you think)... but it would certainly
take a lot more time to write the code.
As to what you can do with Pygame, well
and I would certainly
do something like that in C++.
Pygame is probably fast enough for the graphics, but I was wondering how
performance would be for AI and other calculations.
yours truly
armornick
2011/11/23 Chris Smith maximi...@gmail.com
You can't really compare the language C
On the pygame site, the last three releases don't show the screenshot, they
just have something like:
*Warning*:
getimagesize(/home/pygame/public_html/thumb/22763187615d768f6e293ef6aba77ce7.png)
[function.getimagesizehttp://www.pygame.org/project/257/function.getimagesize]:
failed to open stream:
I can't seem to sign in at pygame.org
Username and password, son;t work, even after resetting the password.
I also tried setting up a new user, but that didn't work either.
Username is maximinus.
Any ideas?
I'm not worried about events currently being 'slow'. But I would like to
know what the extra overhead would be.
If it's otherwise backwards compatible, I see no problem.
Chris
2008/12/1 Lenard Lindstrom [EMAIL PROTECTED]
Hi René,
I don't know enough about fastevent to make a suggestion. It
Well, I did some quick profiling, and here is what I mean.
If we say that I have a maximum FPS of 60, and each 'frame' takes just over
1/60th of a second, then yes, I will get 30 FPS as the screen flipping waits
patiently for the raster to get back to the start of the screen.
My original code
or not.
Also, can probably just limit the frame rate to 30fps for a lot of games :)
How are you measuring the fps? If you use pygame.time.Clock.tick() it
can pause the game.
cu!
On Thu, Nov 20, 2008 at 11:24 PM, Chris Smith [EMAIL PROTECTED] wrote:
Well, I did some quick profiling, and here
, Chris Smith [EMAIL PROTECTED] wrote:
I measure the FPS by adding up the time taken (or what the profiler tells
me), and dividing the total frames by that.
My do_stuff() is real small because I pre-calculate almost everything.
0.066
seconds spent over 610 frames, so I'm pretty sure it's
On this machine (Ubuntu 8.04, PyGame 1.7.1), pygame flip() is very slow.
A little demo I set-up and profiled showed that for 610 frames of animation
- taking 21.8 seconds - pygame.flip() was taking over 9 seconds of that! Now
I know that flip() has to wait for the monitor raster to get to the top
Type help() for interactive help, or help(object) for help about object.
2008/7/22 David Goldsmith [EMAIL PROTECTED]:
help
I too would go with just putting all the questions into a text editor. That
way it's easy to edit and easy to spell-check the questions and answers.
You'd need a little bit of code to parse the text files but Python is pretty
good for that. Anything else would probably be overload.
On 24/01/2008,
In the pygame docs it heavily implies that, having a loop like:
clock=pygame.Clock()
while(True):
clock.tick(1000/X)
Will let you control the framerate, X being the FPS (I know, dependant on a
few other things). However, I'm getting the opposite effect - a low value of
X gives me a high
I usually write out my comments first because it lets me define what I'm
trying to do. The code should be a reflection of the comments.
On 08/12/2007, Greg Ewing [EMAIL PROTECTED] wrote:
Ian Mallett wrote:
When writing code, it is good to have comments, but it is not usually
wise to put
You can read more about what's happening in the SDL world here -
http://www.libsdl.org/cgi/docwiki.cgi/FAQ_20SDL_20Version_202
Although it would be fair to say movement is slow. On the other hand, SDL +
PyGame both work fine, I don't see a real urgent need for a ton of extra
features.
On
I have some experience with pygame + programing board games. If you would
like some coding help, I'm available. I've also written a GUI for use with
pygame, so I at least have some experience going down that route.
Feel free to email me. I'll be next checking my email on Monday though, so
don't
I used to work with touch screens a few years ago and generally they came
with a PS2 connection and the computer saw them as a normal mouse... Do you
know exactly what touch screen you'll be using?
Chris
On 5/9/07, Jason Coggins [EMAIL PROTECTED] wrote:
Are there functions in PyGame that
Yes, I am using Linux, so I'll just follow the other thread.
What I find strange though is that another program written in PyGame
(although the sound code is a bit different) works just fine. I'll try and
isolate the differences and see if I can track down exactly what code does
what
Chris
On
Help! I'm getting very choppy sound playback on my code. Here's a quick
example:
#!/usr/bin/python
import pygame
pygame.init()
pygame.mixer.init(44100,-16,True,4096)
foo=pygame.mixer.Sound(sound.ogg)
foo.set_volume(1)
foo.play()
Sound plays, but like a very dirty record, with lots of
On 12/19/06, Greg Ewing [EMAIL PROTECTED] wrote:
Farai Aschwanden wrote:
I wanted to use such a system too, but 2 points stopped me using it:
1. Its restricted to the charset (well 256 chars is quite a lot)
Unicode!
Then you can use the Chinese characters for water,
grass, hill, etc. Much
I generally make the map file as simple to read and change in a text editor
as I can. This generally makes the python code to parse the file a bit more
complex, but since this is done only once at start-up I don't notice any
speed issues.
Another way of doing it is to write a simple map loader
I grabbed mine (Vera) from an ubuntu install disc, although I must say I'm a tiny bit unsure about the legal status (although it's in debian as well, so must be fairly liberal)On 11/10/06,
Kris Schnee [EMAIL PROTECTED] wrote:
I was looking up fonts that I could use in Pygame projects, and found
I can't seem to update my game entry on pygame.org. This is the first time I've tried to update it: I can log in ok, go to 'my projects' where I get a search page, but my game doesn't want to come up at all.
The game is SPQR, and it's in games - strategy. I'm only really looking to update the
The only works correctly on software surfaces part is a bit annoying though. It would be nice if this was a part of the SDL spec. After all, I assume most of us at least ask for a hardware surface.
On 10/26/06, René Dudfield [EMAIL PROTECTED] wrote:
>From our friendly, food covered handwritten
To continue on the subject of full-screen scrolling, it can be done but with caveats. My game scrolls most of a 800*600 screen when moving around the map (it's a strategy thing), but even with HWSURFACE etc.. set, it's a little jerky.
Can't speak for other people, but my main machine is an
Having used PyGame for the last 2 years or so, here are my observations:
I generally write my Python code with regard to cleanliness and ease-to-read. I've never had to change code because PyGame is slow - although, that said, most of my gfx code has been building a Gnome-like GUI expereience. If
Any chance of describing the bug in some way, before I d/l and read through some code?On 9/11/06, Ville Sokk [EMAIL PROTECTED]
wrote: I'm new to programming but I've learned the basics and have done some
programs but now I've decided to learn pygame. I thought I'll make a simple pong game. I
26 matches
Mail list logo