Hello everyone! Pardon me for getting right to the point; I'm a bit frustrated right now >.< (I'm kind of new to groups. I'm sure I've made this post twice, but I can't see them. I'm posting this from the "+ new post" in the "Home" page instead of in the "Discussions" page).
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. The cause (as I understand it) is 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's the link to the source and required resources: http://www.sendspace.com/file/0dbxnw 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 -~----------~----~----~----~------~----~------~--~---
