Hello everyone! Pardon me for getting right to the point; I'm a bit
frustrated right now >.<

My first game with pyglet 1.1.3 is nicknamed Ship Showdown where two
players fight each other and the first one to go down loses. I made
the classes:

 - ShipSprite
 - Ship
 - HUD
 - BulletSprite
 - Bullet

Finally I put all of them together and made the game work fine.


Stage 2: I focused on multiple scenes (Menu, Config, Game). For easier
organization, I built the following classes to handle the game and
scenes:

 - Scene_Base
 - Game

Game sub-classes from pyglet.window.Window and handles the
initialization, update and disposal of the currently running scene.

Then I made scenes subclassing from Scene_Base:

 - Scene_Menu (the initial menu)
 - Scene_PreStart (players configure their ships)
 - Scene_Game (the actual game scene)


Now, the game runs fine but when the player returns to Scene_Menu
after ending the game and starts the game again, I get an error
"NoneType object has no attribute anchor_x" in the pygame Sprite
class. It traces back to what I understood as referencing a non-
existing image (AbstractImage to be precise). I concluded it's a
problem with managing the resources (now I have doubts, though).

So I tried loading the image everytime it is needed, I tried using the
pyglet.resource module for loading images instead of
pyglet.image.load, nothing works.

Here is the source with the needed resources:

http://www.sendspace.com/file/zawh6c (12KB ~ 13KB)

Could someone please help me fix the problem? Also, I would appreciate
any suggestions on improving the semantics in any way possible.

Thank you!

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pyglet-users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/pyglet-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to