[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [pygame] Hi, I'm new...
On 07 Jul 2001 11:39:30 +1000, Glen Wheeler wrote:
> Greetings pygame-ists,
>
> I've been told to develop a game, and have been given very detailed specs.
> My first inclination was to do it with tkinter, as I had done all my
> previous python games.
> However tkinter has so many horrible limitations w/r to games that I am
> forced to look into other options. So, here I am with pygame.
> My question right now (before I start learning another wrapper :) is 'Is
> it feasible to use pygame?'. The game I'm developing (with the help of a
> team, I'm just head programmer/project head) will be an RPG based on a game
> called Warhammer Quest. The first thing I'll need is a relatively big
> resolution, say eg 1024x768. Also, the main area where all the action takes
> place would be lovely as a changeable camera angle in a 3d world - but I
> think I'm dreaming there. I'll probably end up with something ala Diablo
> I&II. If I did have the time, could I develop a 3d engine for pygame? Or
> (even better) is there one already available?
You could develop a 3D engine for pygame using PyOpenGL. But it's
probably not the level of abstraction you're looking for as a Python
programming. OpenGL is pretty low level, but it works. A diablo-ish
engine would work very well in pygame with bitmaps though.
> I have plenty of other questions, but I'm almost 90% sure they can be done
> so I'll just ask this one - how well does pygame support threads? One major
> problem with tkinter is the fact that you can't have threaded operations
> which all update the GUI - tcl crashes, every time. And the workaround is
> not pretty.
As far as I know ppygame is pretty darn threadsafe
> Say eg that 4 warriors were standing in a dungeon room. I would like them
> all to be doing something each - breathing, reading a scroll, playing with
> magic in the air, practising swings etc. My solution would be to use a
> seperate thread for each warrior - would this work in pygame, and if not how
> would you approach it?
If I was doing it without threads, I would just use a game loop.. where
every frame it calls a method of every player object to update itself..
This is how most things work... usually you'll only have two or three
threads in a game, not one per player.. there isn't really a reason for
it, it's much easier to keep synchronization if you have only one thread
updating the players, and it's not going to complicate the code very
much at all.
-bob
____________________________________
pygame mailing list
pygame-users@seul.org
http://pygame.seul.org