Code 15 - Top Down Shooter

Realizing my ‘logisitic’ curve would probably not be the best idea, why not just set the acceleration to a constant on keypress, and then verlet integrate? The acceleration set could be computed from Newton’s second law, so ‘friction dampening’ would be easy.


double accelerationX = (keyPressedForceX - frictionForceX) / mass;
double accelerationY = (keyPressedForceY - frictionForceY) / mass;

positionX = positionX + (positionX - lastX) + accelerationX * delta * delta;
positionY = positionY + (positionY - lastY) + accelerationY * delta * delta;

Of course there are better integration methods to use if so inclined.

edit: added sample code

That would work; I personally would use a more simple way of moving. Just seems a bit unnecessary to use.

I have changed the movement, it now accelerates within a few milliseconds making it look like he goes from a walk to a run very quickly. He also has very light dampening to slow him down.

Not changed enough to warrent an update atm.

No playable update but have worked on some fun things :).

Implemented level config files, I can now load in pretty much anything from a config file and create it in my world. That is kind of cool.

I have added and tested 3 new items

Keycard:

http://s26.postimg.org/ertexjdc5/keycard.png

Pistol: (This will actually be a final item)

http://s26.postimg.org/m58swhxdx/pistol.png

Bullet:

http://s26.postimg.org/58jq42ptx/bullet.png

Alright so nothing great, however the pistol was a test weapon. It was implemented in a very OO way, any entity will be able to equip it and shoot it.

Couple of gun types can easily be made from the same class:

Shotgun - Configurable bullet count and spread
Assault Rifle - RoF can be changed, single, burst and auto are togglable
Minigun - RoF can be changed, clip size can be altered greatly

All with configurable accuracy/range that is multiplied by whatever value I want, player skill, powerups etc etc.

Here is a screenshot of the new items lying on the ground ready to be picked up and used:

http://s26.postimg.org/dglnp2hqh/teaser1.png

Once I implement a basic AI and some enemies I will upload a test level for you guys to mess about in :smiley:

i like the game-name: code15 - cool

Seems like a good idea to actually show that I have visual progress. I have been doing a fair bit of work on the path finding AI, although it is ready to go and is capable of guiding whatever I want through the levels, I am here instead to show you some implemented test items!

Grenade

Standard frag grenade, small blast radius, average damage but still enough to kill a man or 5.

Placeholder sprite

http://s26.postimg.org/7simdc0g5/grenade.png

8hmGm5cI2VM

Pistol

Standard military pistol, low damage but reliable when it comes to killing unarmed things.

TmXDbFTcAFo

Coming next

As soon as I code in a proper way to spawn and manage a basic enemy, as well as write all the code for them, I will fire up a pathfinding video and even a demo that allows you to place an enemy, create a maze, set a destination and watch them go!

Dropbox Download

Private videos.

Fixed