Members - Reputation: 192
Posted 08 September 2011 - 12:20 PM
When you get a spacebar event, you will instantiate the bullet class with all the relevand information, like the bullets cordinates(based on the character cordinates), moving direction, speed and so on.
You will have an array of these bullet objects and the game loop checks all the relevant things about them, like drawing cordinates, collision etc.
This is a very basic example and there are lots of ways where you can imrove it, but it will hopefully give you some ideas on implementing it.
In addition I would like to note that I have not done anything similar in Python or Pygame so there can very well be an easier way.
Members - Reputation: 163
Posted 08 September 2011 - 04:17 PM
Basically i need it to shoot from the players image and go in the direction the player is facing and come from his Rect. this will help quite a bit thank you.