Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Code Snippets / [GDK] - [uses Sparky's] Shoot 'em game complete working. V1.0

Author
Message
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 8th Feb 2011 03:19 Edited at: 12th Feb 2011 03:07
I finally got it to this stage and thought that everyone can have a look at it. Everything is simply wrapped up in classes.

It a Work in Progress and here's a few of the updates I'm currently working on.

PLAYER:
Jumping controls (DONE)
Sliding collision on scenery (DONE)

BADDIES:
Home in on player when in range. (DONE)
Jump if it can see a bullet.
Run away if health is low.
Sliding collision on scenery (DONE)

INTRO:
Add an intro screen
Alter the level select screen

GAME OVER:
A decent game over screen

IN GAME:
Add sounds and effects
Add animation and explosions
Bullets to have effects (like beams etc)

Just to name a few.



This took a total of about 5 days to get to this stage and to fix bugs along the way. It's also opened my eyes to how to wrap things up in classes for easier control over game programming. This code however has some parts wrapped in classes but was mainly programmed as if I was using DBP.

Hope anyone who checks it out can understand it and appreciates it.

Screen shot to follow...

Warning! May contain Nuts!

Attachments

Login to view attachments
WLGfx
16
Years of Service
User Offline
Joined: 1st Nov 2007
Location: NW United Kingdom
Posted: 8th Feb 2011 03:24 Edited at: 12th Feb 2011 03:33
Screen shot here:

EDIT:

Use keys WASD. Space to Jump. Mouse to look and left mouse to fire...

EDIT2:

Fixed a bug which caused the camera to jitter every couple of seconds for some reason. (global vars being used by different functions)

Players jumping now works. (parabola curve type)

Baddies home in when in range of player. (Now need to stop them from getting stuck on walls)

EDIT3: Sliding collision for player and baddies now works. And some ironing out bugs done. (ie baddies not re-spawning on the level) Levels 1 and 2 have been re-designed.

This code is for anyone who finds it interesting. I try my best to comment as much as possible and to make it readable...

Warning! May contain Nuts!

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-03-29 01:29:58
Your offset time is: 2024-03-29 01:29:58