Richard Jones | 2 Dec 2002 13:09
Picon

Re: [pygame] Pyzzle will be displayed at the Australian Game Developers Conference!

On Sat, 30 Nov 2002 07:27 pm, Rene Dudfield wrote:
> The $15 dollar expo pass seems affordable.  The $900
> conference ticket price is insane!

I didn't realise there was an expo pass. Would the expo be worth it?

   Richard

____________________________________
pygame mailing list
pygame-users@...
http://pygame.seul.org
Niki Spahiev | 4 Dec 2002 10:38
Picon

Re: [pygame] Back to the Scrolling

Pete Shinners wrote:
> i've tried to come up with faster ways to draw big groups of primitives 
> (for example, particles), or blit many images, but they never end up 
> with a speed advantage. i'm thinking the only hope for success for any 
> sort of "speed up in C" is to create your datatypes as real C objects 
> and add bindings for them to python. then the C code can do all the work 
> natively. otherwise it won't buy you any speedup, but that is such a big 
> task that i don't think it's worth it. perhaps something like pyrex then 
> would be the best way to go.

Won't new ctypes module help here?

Niki Spahiev

____________________________________
pygame mailing list
pygame-users@...
http://pygame.seul.org
azazel | 5 Dec 2002 09:54
Picon
Favicon

[pygame] colorkey and time scale

hi everyone, I need to do two question that aren't very related to the
library but for a general purpose:

- To get and set the colorkey of a surface I use the get_colorkey and 
  set_colorkey methods, till now I've written the colorkey of every
  image in a file, and after loading an image I set the colorkey read in
  that file with set_colorkey. There is a way to set a default colorkey
  for an image that don't force me to store it in another file?

- I've noticed that some games use a time_scale variables to regulate
  the movement of the sprite in connection with the actual speed of the
  game. For example if I want to run my game with a framerate of 30fps
  and prev_tick - last_tick is time elapsed since last frame time_scale
  become:

  time_scale = (last_tick - prev_tick) / 30.0

  Is it really necessary with pygame?

thank you  
____________________________________
pygame mailing list
pygame-users@...
http://pygame.seul.org
TVScore | 5 Dec 2002 07:40
Picon
Favicon

[pygame] pygame for Mac

Hello all,
    I am brand-spanking new to the world of Python programming and even newer 
to Pygame.  I was wondering if there were any Mac Pygamers out there who 
wouldn't mind pointing this rookie in the right direction.  
    I understand just enough Python to write simple programs...but I am 
stumped with pygame.  I can't seem to install pygame for the life of me.  
Either this is due to my denseness (which is very possible) or there are code 
issues in the older Mac Pygame.
    I have a Mac (G3 laptop) running Mac OS 9 and Python 2.1.1.  I downloaded 
 "pygame-1.1-src.sit" and "pygame-1.1.tar.gz" and I have had absolutely no 
luck.
    I dragged and dropped the "pygame" folder (containing all of the modules) 
into the "python:lib:site-packages" folder and even dragged-and-dropped the 
extensions into the "Extensions" folder.  Yet, no matter what I do, a common 
response from Python is:

  File "244 HD:Applications:Python 2.1.1:pygame:__init__.py", line 27, in ?
    from pygame.base import *
ImportError: No module named base

    The truth is Python doesn't seem to see any of the pygame modules at all.
    I would greatly appreciate it if someone could point me in the right 
direction.
    Thank you.

Louie

PS. I own a copy of CodeWarrior which I never used.
____________________________________
pygame mailing list
(Continue reading)

Pete Shinners | 5 Dec 2002 09:34
Favicon
Gravatar

[pygame] pygame.org site damage

hey guys, i'm not even sure if this will get through.

the seul.org servers had some messy corruption and things are not 
totally online. the old website is back up, but nothing in the old ftp 
directories are online. this basically means No Downloads until it gets 
fixed. currently ssh is down too, so i am unable to get in and make any 
changes to the site.

people are working on it, hopefully it won't be a problem for much 
longer. we shall see.

____________________________________
pygame mailing list
pygame-users@...
http://pygame.seul.org
Pete Shinners | 6 Dec 2002 02:25
Favicon
Gravatar

Re: [pygame] colorkey and time scale

azazel wrote:
> - To get and set the colorkey of a surface I use the get_colorkey and 
>   set_colorkey methods, till now I've written the colorkey of every
>   image in a file, and after loading an image I set the colorkey read in
>   that file with set_colorkey. There is a way to set a default colorkey
>   for an image that don't force me to store it in another file?

several image formats can store the colorkey internally. the two best 
examples of this would be GIF and PNG. if these images have a colorkey 
set, then they will have their colorkey all setup when you load them.

another "popular" example is to just take the colorvalue in one of the 
image corners and assume that is the transparent color. the pygame 
examples like chimp and aliens have a 'magic' image loader function that 
can do this corner transparancy by passing "-1" as the colorkey. of 
course, again, if the image already has a colorkey, you won't need to 
pass anything extra to these load functions.

> - I've noticed that some games use a time_scale variables to regulate
>   the movement of the sprite in connection with the actual speed of the
>   game. For example if I want to run my game with a framerate of 30fps
>   and prev_tick - last_tick is time elapsed since last frame time_scale
>   become:
> 
>   time_scale = (last_tick - prev_tick) / 30.0

there are two styles of speed control in games.

fixed step: the simpler one is to set a reasonable maximum framerate, 
and just slow the game down to make sure it runs at the correct speed. 
(Continue reading)

Lee Harr | 6 Dec 2002 15:48
Picon
Favicon

Re: [pygame] colorkey and time scale

>- I've noticed that some games use a time_scale variables to regulate
>   the movement of the sprite in connection with the actual speed of the
>   game. For example if I want to run my game with a framerate of 30fps
>   and prev_tick - last_tick is time elapsed since last frame time_scale
>   become:
>
>   time_scale = (last_tick - prev_tick) / 30.0
>
>   Is it really necessary with pygame?

Some sort of frame-rate control should probably be built in to your
game. Notice that this is usually a _maximum_ framerate (which I
never seem to hit on my 486 ;-)

If you do not have a control like this, the game will play at
different speeds on different machines, and might be unplayably
fast on systems much faster than the one on which you develop
the game.

I am thinking now about how to deal with slower systems.... I guess
if the framerate drops below the desired framerate, you might have
a motion-multiplier to pseudo-speed things up to normal. You might
run some sort of frame-rate test in the beginning of the game --
during a demo or intro -- and use that throughout?

Just some thoughts... I am pretty new to pygame also.

_________________________________________________________________
The new MSN 8: advanced junk mail protection and 2 months FREE* 
http://join.msn.com/?page=features/junkmail
(Continue reading)

Brendan Becker | 6 Dec 2002 19:33

Re: [pygame] colorkey and time scale

>Some sort of frame-rate control should probably be built in to your
>game. Notice that this is usually a _maximum_ framerate (which I
>never seem to hit on my 486 ;-)
>
>If you do not have a control like this, the game will play at
>different speeds on different machines, and might be unplayably
>fast on systems much faster than the one on which you develop
>the game.
>
>I am thinking now about how to deal with slower systems.... I guess
>if the framerate drops below the desired framerate, you might have
>a motion-multiplier to pseudo-speed things up to normal. You might
>run some sort of frame-rate test in the beginning of the game --
>during a demo or intro -- and use that throughout?

What I've found is most useful is to calculate the position based on what time it is. Although system clocks
vary in speed a LITTLE sometimes, you can generally rely on the system clock for a good guess at what time it
is, or how long your game has been running.

although it may not be easy at first to calculate positions of things based on time, and possible with every
game, if it works you don't have to worry about framerate limiting because the positions will
automatically just... be there.

For example, you will want to define how far in pixels an object moves in a certain amount of time, like, per
second, then calculate how many seconds it's been since the last frame, which will most likely be a
fraction of a second (don't forget to use floats!). Then, multiply that fraction by the per-second rate
and you have it moving almost exactly the right amount every frame. That way you don't even have to limit
your FPS, and everything always runs as smoothly as possible.

Granted, this will cause framedraws to happen on really fast machines even when they shouldn't, but still,
(Continue reading)

Rene Dudfield | 7 Dec 2002 17:20
Picon
Favicon

[pygame] scrolling through scrolling


 How about using numeric to calculate the coordinates
for each tile?  I think that is one of the slow bits.

So a move right by ten pixels would be something like
tile_positions + (10,0).  Then pass slices of the
array to a c drawing function.  The slice would only
be of the tiles which are to be drawn.

If you have a massive map( 1000's of tiles accross ),
then you'd want to only update the positions of the
viewable tiles(again by using a slice of the visible
tiles).  So you'd have a visible matrix of tile x,y
positions, and a full map matrix which consists of the
type of tile to be drawn(an index into a list of
images?).

A similar method should also be useful for drawing
lots of sprites or particles, as you don't have the
python object overhead for each sprite.

I don't have the time to implement it now though :( 
Someone else who thinks it'll work wanna do it for us?

__________________________________________________
Do You Yahoo!?
Everything you'll ever need on one web page
from News and Sport to Email and Music Charts
http://uk.my.yahoo.com
____________________________________
(Continue reading)

Pete Shinners | 7 Dec 2002 10:43
Favicon
Gravatar

[pygame] Fwd: Pyzzle at the AGDC exhibition

Here is an update from the pyzzle team at the Australian Game Developer 
Conference. sounds like a great showing!
Picon
From: Damon Smith <damon@...>
Subject: Pyzzle at the AGDC exhibition
Date: 2002-12-07 11:36:40 GMT
Hi Pete,

Andy Jones (of the Pyzzle project) asked me to send you this, as I am not on 
the Pygame list, and he wanted to post some info on how we went at the 
conference today.  Could you possibly send the following to the Pygame list?

Hi all,

I've got a fairly hefty bit of info on Team Pyzzle's excursion to the 
Australian Game Developers Conference today.  As you may know, the AGDC are 
holding a competition this year for the best unsigned game, and Andy Jones 
entered Pyzzle into it.  We got shortlisted, so we got to go in there and 
display the game on a tabletop at the conference itself.  Unfortunately, we 
only had a week or so of notice, so we've been madly trying to get a demo game 
happening to demonstrate.  We've got something to show, it's a small scenario 
called Bunker D, and it basically has some rooms and a single (pretty hard) 
puzzle.  I'm sure Andy will be putting a version of it up on the 
pyzzle.sourceforge website as soon as we can get it's size down a bit from it's 
(Continue reading)


Gmane