Re: [pygame] Pathfinding

2009-01-27 Thread Brian Fisher
Hey Yanom, Hmm... your game is "probably not" tile-based? sounds like you aren't very far along yet... I think you may be worrying a bit too much about pathfinding now. The truth of the matter is there is no single solution to pathfinding. There isn't even a best solution. There are some commo

Re: [pygame] Name self not defined

2009-01-27 Thread Jervis Whitley
On Wed, Jan 28, 2009 at 2:18 PM, Yanom Mobis wrote: > this is the code in question: > > class Car(Basicsprite): #car class >def __init__(self, speedarg=(0,0)): >self.speed = speedarg >Basicsprite.__init__(self) >def move(self, speedv=self.speed): >self.rect = self.

Re: [pygame] Name self not defined

2009-01-27 Thread James Paige
On Tue, Jan 27, 2009 at 07:18:20PM -0800, Yanom Mobis wrote: > this is the code in question: > > class Car(Basicsprite): #car class > def __init__(self, speedarg=(0,0)): > self.speed = speedarg > Basicsprite.__init__(self) > def move(self, speedv=self.speed): > self

[pygame] Name self not defined

2009-01-27 Thread Yanom Mobis
this is the code in question: class Car(Basicsprite): #car class def __init__(self, speedarg=(0,0)): self.speed = speedarg Basicsprite.__init__(self) def move(self, speedv=self.speed): self.rect = self.rect.move(speedv) however, when I try to import that class fro

Re: [pygame] Pathfinding

2009-01-27 Thread Casey Duncan
On Jan 27, 2009, at 4:48 PM, Yanom Mobis wrote: my game is 2d, but probably not tile-based. Ok, in that case a rectangle with a width equal to the frontal width of the thing parallel to the path will do. Or you could march a rectangle or circle down the candidate path to check for collisio

Re: [pygame] Pathfinding

2009-01-27 Thread Yanom Mobis
my game is 2d, but probably not tile-based. so your saying I can make it do only a few iterations per turn? how about doing the whole calculation beforehand, then not having to do many calculations? --- On Tue, 1/27/09, Casey Duncan wrote: From: Casey Duncan Subject: Re: [pygame] Pathfinding

Re: [pygame] Pathfinding

2009-01-27 Thread Casey Duncan
On Jan 27, 2009, at 3:36 PM, Yanom Mobis wrote: is it easier to make the game tile-based? Probably, but it really depends on the details. if I make every pixel a node, and there are 2 obstacles really close together, how will I make sure something 20 pixels wide doesn't try to go into

Re: [pygame] Pathfinding

2009-01-27 Thread Yanom Mobis
ok, i didn't get any of that --- On Tue, 1/27/09, Michael George wrote: From: Michael George Subject: Re: [pygame] Pathfinding To: pygame-users@seul.org Date: Tuesday, January 27, 2009, 4:38 PM Yanom Mobis wrote: > is it easier to make the game tile-based? > > if I make every pixel a node, a

Re: [pygame] Pathfinding

2009-01-27 Thread Michael George
Yanom Mobis wrote: is it easier to make the game tile-based? if I make every pixel a node, and there are 2 obstacles really close together, how will I make sure something 20 pixels wide doesn't try to go into a 2 pixel wide opening? One possibility is to use the new convolution code in t

Re: [pygame] Pathfinding

2009-01-27 Thread Yanom Mobis
is it easier to make the game tile-based? if I make every pixel a node, and there are 2 obstacles really close together, how will I make sure something 20 pixels wide doesn't try to go into a 2 pixel wide opening? --- On Mon, 1/26/09, Jake b wrote: From: Jake b Subject: Re: [pygame] Pat

Re: [pygame] Alternatives to portmidi

2009-01-27 Thread René Dudfield
hi, This is the most portable midi library. It's also pretty small, and still has active people working on it. Also, it's supposed to be optional for pygame. Platforms like freebsd don't support midi very well at all as far as I could see. So it's a case of supporting it on platforms that supp

[pygame] Alternatives to portmidi

2009-01-27 Thread Marcus von Appen
Hi, unfortunately, portmidi is limited to three platforms only at the moment, Win32, Mac OS and Linux with Alsa support. This is somewhat limiting regarding the wide-spreaded platform support of pygame. Is someone aware of a more portable midi library or knows about audio editing tools featuring

Re: [pygame] pygame.midi using portmidi?

2009-01-27 Thread Brian Fisher
That patch must be for building with a makefile. It builds fine as is from the xcode project (seems to be the maintained option) On a computer without a real midi device, it looks like both the test program and the midi.py example seem to work with the virtual keyboard. It looks like what must hav

Re: [pygame] Python 2.5.4

2009-01-27 Thread James Paige
Let me guess, you are using Ubuntu Linux, right? And you are worried that because python's version number is reported as 2.5.2 that you are missing security fixes from 2.5.3 and 2.5.4, right? Let me put your fears to rest. When the Ubuntu security team (or the Debian security team) backports s

Re: [pygame] Pathfinding

2009-01-27 Thread Eli Bendersky
Here's a tutorial of pathfinding with A*, specifically for PyGame: http://eli.thegreenplace.net/2009/01/09/writing-a-game-in-python-with-pygame-part-iii/ On Mon, Jan 26, 2009 at 19:01, Michael George wrote: > Marius Gedminas wrote: > >> My personal snag with A* is that the NPCs seem to know too

Re: [pygame] PyObjc dependency replaced for pygame on Mac OS X

2009-01-27 Thread René Dudfield
hi, here is the mac osx scrap module someone made: http://article.gmane.org/gmane.comp.lib.sdl/35258 There's another message in that thread with a main.c file too. Note, the API is different from the original scrap, and the pygame scrap... but it should be usable. Also the python version shoul

Re: [pygame] Python 2.5.4

2009-01-27 Thread René Dudfield
hi, the main issue is compiling with the same configure options as the system python. It's unlikely that all the development packages required are installed. For example, perhaps you don't have the zlib development packages installed -- so various pieces of python will end up broken. Also, it's