Finally I've got a gameover screen, which will appear whenever you hit a bullet, it's then on this screen for 5 seconds before quitting. That collision detection really paid off!

|Gunboy

Thanks for all the comments you left, I will remember them for future use.

Awards

Give this entry an award

Scores

Ratings (show detail)

Overall: 1.7
Fun: 1.4
Production: 1.7
Innovation: 2.1

0% of respondents wished to disqualify the entry.
Respondents: 38

Files

File Uploader Date
gunboy.zipfinal
Very final product.
john 2007/04/07 20:28
gunboy.tar.gzfinal
Very final product
john 2007/04/07 20:28
screenshot5.gif
Finally I've got a gameover screen, which will appear whenever you hit a bullet, it's then on this screen for 5 seconds before quitting. That collision detection really paid off!
john 2007/04/03 18:01
screenshot4.gif
Much better graphics, colours, and cannons for the bullets, but I haven't got round to collision detection yet, remember to remind me! :)
john 2007/04/03 06:25
screenshot3.gif
Added in the bullet, now for collision detection.
john 2007/04/02 12:04
screenshot2.gif
Finally I have moving sprite that goes up, and I've managed to tile the background.
john 2007/04/02 10:09
screenshot.gif
Title page so far, the kid lieing down is gunboy, the dude you must kill.
john 2007/04/02 10:08

Diary Entries

Free graphics

A few graphics I've made, I may use them during pyweek, ain't sure, but you can use them: Here

Add a comment

Free graphics

A few graphics I've made, I may use them during pyweek, ain't sure, but you can use them: Here

Add a comment

Nice theme, but what to do...

I like the theme, I was hoping underneath the radar, but anyway, how about climbing a wall dodging bullets that are being continuasly shot at you?

Add a comment

Decided on an idea, and made one screenshot.

I've been thinking of making a game where you must jump onto pipes, and dodge bullets, or get shields to send the bullets back to the enemy. Sounds easy, maybe if I have more time I'll add in a level editor.

Add a comment

How to get Text

Ok, this has really been bugging me for ages, how do you get text in pygame?

4 comments

Ok, I got myself images for background/sprites, now for mouse detection

So I've got my first basic sprite climbing up a wall, graphics black 'n' white, could edit that later though, now I'm going to make it move depending on mouse position.

Add a comment

Ok, now I'm on stage 2

Now I've made the character move, now for the bullet, and collision detection.

Add a comment

Help

I've got this code, but it's only being run once, why:

while (1==1):
cursor_pos = pygame.mouse.get_pos()
cursor_pos_x = int(cursor_pos[0])
cursor_pos_y = int(cursor_pos[1])

The last three lines are tabbed

2 comments

More help please!

This rectangle function won't work, why?
Code:

bt1 = pygame.rect(bx, by, 5, 5)

Help will be greatly appreciated.

11 comments

Help on Collision Detection Please

My collision detection won't work, why?

bt1 = pygame.Rect(0, 0, 5, 5)
bt2 = pygame.Rect(0, 0, 5, 5)
bt3 = pygame.Rect(0, 0, 5, 5)
you_box = pygame.Rect(0, 0, 25, 44)
btm1 = Rect.move(bt1, bx, by)
btm2 = Rect.move(bt2, bx2, by2)
btm3 = Rect.move(bt3, bx3, by3)
you_boxm = pygame.Rect.move(you_box, x,y)
collide = Rect.collidelistall(you_box, bt1)

It won't work, why?!

6 comments

Phew that was close

Finally I've finnished my game, at one point I thought I wouldn't complete it, well, I'm off to celebrate. ;)

Add a comment

Woops

Oops deleted some files without editing the code, the working game is up now.

Add a comment

Thanks for the comments

Thanks for all the comments you left when you rated the game, I'll try and learn from my mistakes, and do what you suggest next time. About the escape button, I'm not sure how to use that. Flickering, I think that I should have used two pygame.display.flip()'s instead of 100.It worked around a loop, so for one tenth of a second the quit button won't work. Soundd, I never had chance to implement it, fonts, I can make my own, but I don't know how to use fonts in the game. I only had 6 days to do the game, I was away for a day. Also I'm not nearly the best programmer, I'm still learning, at least it's easier than C++! Thanks for the ideas, I'll remember them.

2 comments

Gunboy: Reply to Comments

Sorry it's a bit late, but here I'm going to reply to everyones comments. Also, I'm glad noone had trouble getting it working, I only used pygame/python so it should have.

Anyway for the comments:

Not much control (if any) over the character.

There is control, but your right, there ain't a lot of it, move the mouse around.

...

---

Unfortunately I couldn't quite figure out what to do even after reading the instructions (which I was glad to see) twice. How does a powerup help me destroy a gun exactly? Anyway, you're new to this and your goal was to learn something. I'm certain you've succeeded at that goal, so this is good. Looking forward to next time!

Thanks, to destroy the cannon then you need to catch the red powerup, then hit all the bullets in turn, although it doesn't always work out properly. [sigh]

Not bad for the first game you've ever written.

Thanks!

It seemed like there was no way to destroy the cannonns I got the red thing and immediately walked over all the cannons but the never disappeared. The background was odd and it could have used some sound effects.

I was going to get some sounds, but I didn't have time, only 6 days to work on the project you see. And the cannons, a more clear explanatio please.

How do you destroy the cannons?

^Look up^

Very strange game...

Doesn't matter, I expect a lot of people to say that, it wasn't the most fun game in the world.

Not a bad first attempt. Once you get the feel for things it gets much easier and the games get better.

Yep, I suppose it was my first ever game so, ah well.

not much of a game but it ran well without problems :-)

That's good, bit about the game doesn't matter, maybe next time.

I had a hard time exiting - the quit button didn't work some of the time, and closing the window didn't work.

Oops, don't know why the bottom one doesn't always work, top one, don't know how.

Not exactly sure what to do here, the readme says to destroy the cannons with the red powerup, but I can't figure out how. :(

Read one of the above answers.

nice idea.. but the execution was bad.. the graphics could have been done better.

Graphics: I know, execution, more of an explanation?

Not quite sure what to say. I got bored after a minute of very easy bullet dodging, so tried to crash into the bullets. Then I won. How did I win? I don't know.

If you caught the powerup...

I couldn't figure this game out because the instructions were limited. The game seems complete though, however, so it's a decent effort for someone just starting.

Thanks, strange, I spent a good half hour writing the readme.

Hey! Well done on your game. I'm sure you know all of your game's faults, but I'm going to try and capitalize about the things that you did right. I really like how you kept a small scope on the project. So many times, people try to plan for more game than they can handle, and I think that by doing something as reasonably sized as you chose on this project, that really helped. Going along with the above, I'm glad that you got both win and lose conditions in the game. That's the first step in making a complete game, and that gives you something that you can build on. That's great! Also, good job keeping up on the documentation. The readme was very helpful and complete, and that is good to complete. All told, good job! I look forward to seeing how you grow and develop as a programmer -- despite what it may look like on the surface, I really think you did a *lot* of things right with this PyWeek, and you've really got a fantastic base of habits to build from in the future.

Thanks you very much.

Keep learning, I'm glad you figured out collision detection.

Thank you, and I would like to thank those who helped me with collision detection.

simple

Ta

I'm sorry. I thought it was terrible.

Sigh, I can't please everone.

I found this game hard to play.

Catching the bullets can be hard.

mmmm....

Ahhh...

Cool you did this game without all source directly in the main.py file whithout even a function! Thats the way to go in speed coding competitions :)

Thanks, but unfortunately that's only in that version, I needed a level loading system, which meant raplacing main.py. [sigh]

.

-

Better luck next time. :)

Thanks!

Well, it's playable and worked easily off the box, which is better than with some of the other games, but I wouldn't call it very much fun. The easiest way to win seems to be just getting the red powerup and then leaving the game running until you hit all the bullets.

Ah well. Hopefully I'll be better last time.

Yeah, no. I looked through the source code and it appears you blitted everything to the screen instead of using the sprite classes, which is why everything flickers so much. Also, I got the red powerup, but had no idea how to actually blow up the cannons.

A question I answered in another thread.

For a first game it looks good, but this game definitely needs some more developement ;)

Agreed.

Hey, thanks for being a part of pyweek... I tried your game out but didn't find it very much fun to play. I read through your diary entries and it looks like you've been fighting some issues with PyGame. Tough break, man. Being that I'm looking at a game that you probably didn't finish, I'll try and keep my suggestions to things that were probably done: 1. You put a one pixel thick black line around your sprites. This makes things look overly sharp. If you look at some of the nicer entries, they put thicker outlines around the graphics which gives a cleaner look, but also allows them to round the corners a bit. 2. The big man that was repeated over and over again looked like part of the foreground. Consider doing muted colors for the background, or something to give it some depth. 3. The games that are fun to play have some way of indicating what you need to do. For instance, if the character has a chopper on his head, you should probably try to get him to fly. Others have explicit instructions. 4. The games that are fun to play often indicate why you want to play. In one game it was to escape the bad guys after you rescued your kidnapped cat. In another, it was to save your friends by escaping from a volcano. A game like yours (mine had this problem too), I start it and I'm like, "why the **** do I want to dodge these things? What's the point?" Like me, the first time wasn't all you had hoped for. I know next time I'll set aside time at the beginning for a menu, a scoreboard, fonts and maybe some music. These are basic things that are in most games and being able to code these in a short period of time will be transferrable from one pyweek to the next. I hope to practice a bit and be able to do these in under an hour. Thanks for making this game and contributing it to pyweek!

Thank you.

Err... well it confused the hell out of me but definitely good for a first shot.

All right.

Pretty nice for a first-time game.

Thanks mate.

Very good for a first time. My first was terrible, glad you did better.

Thanks

Flawed presentation, not very much fun, seemed incomplete.

Too right, I'm still working on it.

Umm... Not sure what happened here.

OoooooooKkkkkkkk?

Hmmm, WT*?

More info please.

didn't find how to destroy the cannons

Written above.

Well, it is somehow innovative.

Yay!

Didn't really understand how the cannons were destroyed.

How many times!?

I read the instructions, but the game just isn't fun. Also, it was a bit flickery.

Oh well.

Way too easy, until you reach a certain time, and the 1st cannon becomes impossible to avoid. This game is like Frogger only without enough obstacles(more bullets?) or control(up/down). Anyways, learning aa language is tough. I give you a 91 for effort.

Doesn't matter, and thanks for the bit about the effort.

-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

I would just like to thank you for the comments...and say I'm just 11.

2 comments