python-forum.org

This is the place to post any code that you want to share with the community. Only completed scripts should be posted here.Note: posts here are not necessarily endorsed by the community, and may represent amateur or even bad practices.

Woohoo, first workable pygame "thing". Its stolen art, the source is has a lot of work to do, Mekire had to pull me most of the way, and a lot of it is Mekire's example code transfered over, but its a start.

if self.keys[pygame.K_UP]: self.player.move(0,-1) if self.keys[pygame.K_DOWN]: self.player.move(0,1) if self.keys[pygame.K_RIGHT]: self.player.move(1,0) if self.keys[pygame.K_LEFT]: self.player.move(-1,0)

for obj in self.enemies: obj.update(self.player) if not obj.is_hit: self.screen.blit(obj.image, obj.rect)

Let me know if you want me to throw up a page on pygame.org for this or any projects.Just let me know what you want the page to include.I'll explicitly state at the top that it is your project and not mine.

-Mek

Edit: Not a bad start. I didn't realize that you had implemented the life, score, and attacking enemies.

if you mean loading the graphics:the images are on a universal pic site, photobucket. It made it easy for run and go. It makes it nice, especially when asking question here regarding pygame code that needs those resources to work.