Onionsoilder
Reaver
- Joined
- Mar 19, 2007
- Messages
- 3,173
So I'd decided to pick up Python over the summer so I could begin working on app development for android phones. After getting the basics down, my first project was making a simple adventure roguelike game using the Pygame library, and I'm having problems with the pygame graphics I can't work out.
Basing my game off of tutorials and example code, I've got everything working so far except rendering the sprites(or sprite, more accurately. At this point I only have the player in the game). I can render him to the screen just fine, but the problem is when I move him - he gets rendered at his new location, but doesn't stop being rendered where he was previously. So when he moves, he leaves a trail of himself behind.
Anyone know how to fix this? I could just re-render the entire background to cover the old sprites up, but that seems horribly inefficient, and since I plan on porting this to android once I'm finished with it, I don't want to do any computations I don't need.
Basing my game off of tutorials and example code, I've got everything working so far except rendering the sprites(or sprite, more accurately. At this point I only have the player in the game). I can render him to the screen just fine, but the problem is when I move him - he gets rendered at his new location, but doesn't stop being rendered where he was previously. So when he moves, he leaves a trail of himself behind.
Anyone know how to fix this? I could just re-render the entire background to cover the old sprites up, but that seems horribly inefficient, and since I plan on porting this to android once I'm finished with it, I don't want to do any computations I don't need.