Summer Project

Since finishing uni for the summer, I’ve been working on a Scrolling Shooter in C++. In just a few short weeks I’ve learned a lot, and just this morning I implemented very basic particles into the game! They look a bit rubbish now, but I plan to use them a lot more! I’ve also managed to speed up by reworking the way textures are handled.

I’ve not implemented shooting or enemies yet, but neither should be very hard! Right now I’m focusing on the basic framework and getting everything running smoothly.

There are a few problems I’ve ran into, mostly with collision detection. The maths behind collision detection, especially in 2D, isn’t too complex. What is more difficult is figuring out a way to not let it slow the whole game down to 7 FPS. I’ve got a two-fold strategy. All objects which don’t move, like Blocks, are divided into areas. The player will first test they’re in the same area as a block, then check if they’re close enough to collide, then the actual collision detection code is called to test a simple square overlap.

For the frame rate, I’ve just been using SFML sleep to limit the frame rate to (around) 60 FPS. I plan to make this much better, implementing Delta Time into it to get much smoother results.

I also need to finish my User Input class. Acting as a wrapped for SF::Keyboard and SF::Mouse, this allows me to not just tell which key is press (and when), but tell the difference between keys tapped and held. In the future I’ll update it for key releases too! Right now it also only detects Number and Letter keys, as I’ve simple not gotten round to the Control Keys.

Here are a few screenshots of the game below

screenshotscreenshot2

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s