[pygame] Tactics Game Demo

2007-12-15 Thread Kris Schnee
At http://kschnee.xepher.net/code/071214tactics_demo.zip is a playable 
demo of a quick-and-dirty tactical combat game in the style of Final 
Fantasy Tactics and Disgaea: Hour of Darkness. I did this for 
practice; check out the included source (mainly acorn.py) for the game 
framework I ended up using. The framework code is also available at 
http://kschnee.xepher.net/code/acorn.py.txt.


Gameplay:
Hit a key to start. Move your characters (the raccoon team) to valid 
spaces, shown in blue, then either attack a target (in red) or click on 
the character themselves to defend for the next round. Your team has a 
fast (overpowered, really) scout, a heavy, and a healer who does 
negative damage. Defeat both enemies to win.


Known problems:
-Escape quits, but only during the brief pauses between characters' 
actions. I should probably have all unhandled events passed back to the 
main event-handler so that Esc keypresses are always handled.
-NPCs just stand there and attack if you're in range. This is a result 
of the NPC AI not having been fully built.


Screenshot:
http://kschnee.xepher.net/pics/071214tactics.jpg


You've gotta be kidding! Level 4000?! -Laharl, Disgaea


Re: [pygame] Mac OS X 10.5, Leopard Support

2007-12-15 Thread Brian Fisher
I just upgraded my iMac to Leopard, and deleted my framework build of
python 2.4 so I could test out the packages here:
http://pythonmac.org/packages/py24-fat/index.html

I installed this:
http://pythonmac.org/packages/py24-fat/dmg/python-2.4.4-macosx2006-10-18.dmg

then this:
http://pythonmac.org/packages/py24-fat/dmg/pyobjc-1.4-python2.4-macosx10.4.dmg

then this:
http://pythonmac.org/packages/py24-fat/mpkg/pygame-1.8.0pre-py2.4-macosx10.4.zip

and my pygame projects all work perfectly. The PyObjC installer had no problems.

So as far as I can tell, the framework builds of python are a way that
pygame will install and work just fine on leopard.

...I know it's not the 2.5 system python (which would be perferable),
but Noah's macport fix on this list looks like it would achieve that.


On Dec 12, 2007 9:07 PM, Nathan [EMAIL PROTECTED] wrote:
  wouldn't the python 2.4 packages here:
http://pythonmac.org/packages/py24-fat/index.html
  all work on leopard?

 Not in the case of PyObjC.  The PyObjC people very bluntly told me
 that PyObjC isn't for Leopard, period.  I really don't know much more
 than that.

This sounds like FUD to me - If somebody tried to install PyObjC for
the purposes of running pygame and ran into problems with it, I'm
curious to hear what those specific problems were.


Re: [pygame] Mac OS X 10.5, Leopard Support

2007-12-15 Thread Brian Fisher
On Dec 15, 2007 3:51 PM, Nathan [EMAIL PROTECTED] wrote:
 Sorry, that was supposed to say Not in the case of PyObjC 1.4...
 Try installing it with macports.  You'll get to experience the
 problems yourself.

thanks for clearing up how to repro the problem you experienced
(install through macports)

hmmm...  it sounds like it doesn't _build_ on leopard, as opposed to
not run on leopard (maybe because leopard includes different devel
libraries than tiger?). The problem may even be more with the macports
config than anything about PyObjC 1.4 itself...?

As I said before, a prebuilt PyObjC 1.4 worked perfectly fine for me
on Leopard, and I expect it would for anyone using the matching python
install (in this case a framework build of 2.4)


[pygame] invisible windows when fullscreen switching on MacOSX

2007-12-15 Thread Keith Nemitz
Okay,

I couldn't get pygame.display.toggle_fullscreen() to work. Fine. Docs say it's 
only for LINUX.

So, after googling around I found this suggestion, which does work...

pygame.display.set_mode(size, flags);

EXCEPT it creates a new window and the old one is made invisible. Not that I 
care so much, except
the Window menu in the menu bar keeps track of the invisible window. So a user 
can select it from
the menu, and POP a dead window appears.

So, I tried another suggestion that also toggled fullscreen correctly...

pygame.display.quit();
pygame.display.init();
pygame.display.set_mode(size, flags);

...hoping the quit method would kill the window. No luck.

I'm out of suggestions. Anyone?

Keith Nemitz
Ordinauteur
Mousechief Co.
www.mousechief.com We put mischief in your mouse.




Re: [pygame] invisible windows when fullscreen switching on MacOSX

2007-12-15 Thread Brian Fisher
I can't seem to repro this in an app that only does this:
pygame.display.set_mode([width, height], flags)
self.surface = pygame.display.get_surface()
...in order to swap fullscreen (i.e. not doing the quit and init thing)

When you say Window menu in the menu bar I assume you mean the menu
that comes up when you right click on the app icon in the dock, right?

So what version of pygame do you have running and how was it installed on OS X?


PS. Dangerous High School Girls in Trouble! is great - it's hilarious

On Dec 15, 2007 6:35 PM, Keith Nemitz [EMAIL PROTECTED] wrote:
 Okay,

 I couldn't get pygame.display.toggle_fullscreen() to work. Fine. Docs say 
 it's only for LINUX.

 So, after googling around I found this suggestion, which does work...

 pygame.display.set_mode(size, flags);

 EXCEPT it creates a new window and the old one is made invisible. Not that I 
 care so much, except
 the Window menu in the menu bar keeps track of the invisible window. So a 
 user can select it from
 the menu, and POP a dead window appears.

 So, I tried another suggestion that also toggled fullscreen correctly...

 pygame.display.quit();
 pygame.display.init();
 pygame.display.set_mode(size, flags);

 ...hoping the quit method would kill the window. No luck.

 I'm out of suggestions. Anyone?

 Keith Nemitz
 Ordinauteur
 Mousechief Co.
 www.mousechief.com We put mischief in your mouse.





Re: [pygame] Mac OS X 10.5, Leopard Support

2007-12-15 Thread Brian Fisher
That sounds like great work, Noah

I haven't tried to run it myself, but it looks like you've got a ports
file for PyObjC 1.4 there - the system python on leopard should have
PyObjC 2.0 built into it (looks like one could get source here:
http://svn.red-bean.com/pyobjc/tags/r200-leopard ), so I imagine there
must be some way to get a pygame to run with PyObjC 2.0


On Dec 12, 2007 9:28 PM, Noah Kantrowitz [EMAIL PROTECTED] wrote:
 Attached is a set of macports port files that will allow installing on
 Leopard. The only weird thing you need to do is add the macports
 site-packages folder to the sys.path for the system python 2.5. The
 easiest way to do this is to add
 /Library/Python/2.5/site-packages/macports.pth containing the text
 /opt/local/lib/python2.5/site-packages. After that make sure to enable
 the new ports (/opt/local/etc/macports/sources.conf) and just `port
 install py25-game`. I don't think I did anything else special, but if
 nothing else this should be a running start.

 --Noah


 Nathan wrote:
  On Dec 12, 2007 8:39 PM, Brian Fisher [EMAIL PROTECTED] wrote:
 
  I was wondering about all the Leopard support questions recently,
  wouldn't the python 2.4 packages here:
http://pythonmac.org/packages/py24-fat/index.html
  all work on leopard?
 
 
  Not in the case of PyObjC.  The PyObjC people very bluntly told me
  that PyObjC isn't for Leopard, period.  I really don't know much more
  than that.
 
  I'm going to go ahead and take myself off this list.  Thanks for any
  help and hints people have given me over the years.  It appears that
  pygame-on-leopard is not a priority, and I've converted all my active
  projects to use pyglet (which I really like), and I'm having fun
  learning OpenGL as a side-benefit of that switch.  Later!
 
  ~ Nathan
 
 




Re: [pygame] invisible windows when fullscreen switching on MacOSX

2007-12-15 Thread Keith Nemitz
This is what the running game prints out:

python:  2.3.5 (#1, Mar 20 2005, 20:38:20) 
[GCC 3.3 20030304 (Apple Computer, Inc. build 1809)]
pygame:  1.7.0
SDL: (1, 2, 8)


By Window menu, I meant the third menu in the top menu bar. On my machine I get 
the Apple menu, an
empty Pygame menu, and a Window menu. The window menu has a minimize item and 
items for the open
windows. The right click on the dock icon, also displays the same window items.

I'm running MacOS 10.4.9 on a G4 MacMini. I installed the python and pygame a 
few years ago. I
don't remember the details.


Keith


P.S. I'm glad you like the game... :-)






--- Brian Fisher [EMAIL PROTECTED] wrote:

 I can't seem to repro this in an app that only does this:
 pygame.display.set_mode([width, height], flags)
 self.surface = pygame.display.get_surface()
 ...in order to swap fullscreen (i.e. not doing the quit and init thing)
 
 When you say Window menu in the menu bar I assume you mean the menu
 that comes up when you right click on the app icon in the dock, right?
 
 So what version of pygame do you have running and how was it installed on OS 
 X?
 
 
 PS. Dangerous High School Girls in Trouble! is great - it's hilarious
 
 On Dec 15, 2007 6:35 PM, Keith Nemitz [EMAIL PROTECTED] wrote:
  Okay,
 
  I couldn't get pygame.display.toggle_fullscreen() to work. Fine. Docs say 
  it's only for LINUX.
 
  So, after googling around I found this suggestion, which does work...
 
  pygame.display.set_mode(size, flags);
 
  EXCEPT it creates a new window and the old one is made invisible. Not that 
  I care so much,
 except
  the Window menu in the menu bar keeps track of the invisible window. So a 
  user can select it
 from
  the menu, and POP a dead window appears.
 
  So, I tried another suggestion that also toggled fullscreen correctly...
 
  pygame.display.quit();
  pygame.display.init();
  pygame.display.set_mode(size, flags);
 
  ...hoping the quit method would kill the window. No luck.
 
  I'm out of suggestions. Anyone?
 
  Keith Nemitz
  Ordinauteur
  Mousechief Co.
  www.mousechief.com We put mischief in your mouse.
 
 
 
 



Re: [pygame] invisible windows when fullscreen switching on MacOSX

2007-12-15 Thread Brian Fisher
I'm using the packages here right now:
http://pythonmac.org/packages/py24-fat/
which is this version of pygame:
pygame: 1.8.0pre
SDL: (1, 2, 11)

and don't see the problem you have (in either the doc right click or
the window top menu), so I would guess the bug is fixed by either a
newer SDL or pygame 1.8 changes.

You could try the packages at the link above then, but as it's a
pre-release build of pygame it may have other problems (you can keep
around your current python still if that's the case)


On Dec 15, 2007 10:09 PM, Keith Nemitz [EMAIL PROTECTED] wrote:
 This is what the running game prints out:

 python:  2.3.5 (#1, Mar 20 2005, 20:38:20)
 [GCC 3.3 20030304 (Apple Computer, Inc. build 1809)]
 pygame:  1.7.0
 SDL: (1, 2, 8)


 By Window menu, I meant the third menu in the top menu bar. On my machine I 
 get the Apple menu, an
 empty Pygame menu, and a Window menu. The window menu has a minimize item and 
 items for the open
 windows. The right click on the dock icon, also displays the same window 
 items.

 I'm running MacOS 10.4.9 on a G4 MacMini. I installed the python and pygame a 
 few years ago. I
 don't remember the details.


 Keith


 P.S. I'm glad you like the game... :-)






Re: [pygame] invisible windows when fullscreen switching on MacOSX

2007-12-15 Thread Keith Nemitz

By updating to SDL 1.2.12, the problem seems to have gone away. (they sure keep 
SDL moving... !!!)

Thanks Brian.

Keith


--- Brian Fisher [EMAIL PROTECTED] wrote:

 I'm using the packages here right now:
 http://pythonmac.org/packages/py24-fat/
 which is this version of pygame:
 pygame: 1.8.0pre
 SDL: (1, 2, 11)
 
 and don't see the problem you have (in either the doc right click or
 the window top menu), so I would guess the bug is fixed by either a
 newer SDL or pygame 1.8 changes.
 
 You could try the packages at the link above then, but as it's a
 pre-release build of pygame it may have other problems (you can keep
 around your current python still if that's the case)
 
 
 On Dec 15, 2007 10:09 PM, Keith Nemitz [EMAIL PROTECTED] wrote:
  This is what the running game prints out:
 
  python:  2.3.5 (#1, Mar 20 2005, 20:38:20)
  [GCC 3.3 20030304 (Apple Computer, Inc. build 1809)]
  pygame:  1.7.0
  SDL: (1, 2, 8)
 
 
  By Window menu, I meant the third menu in the top menu bar. On my machine I 
  get the Apple
 menu, an
  empty Pygame menu, and a Window menu. The window menu has a minimize item 
  and items for the
 open
  windows. The right click on the dock icon, also displays the same window 
  items.
 
  I'm running MacOS 10.4.9 on a G4 MacMini. I installed the python and pygame 
  a few years ago. I
  don't remember the details.
 
 
  Keith
 
 
  P.S. I'm glad you like the game... :-)