gamedev 

The dungeon crawler project got too complex, so I decided to abandon it for now. I decided to make a clone of one of my all time favorite arcade games, Spy Hunter.

gamedev 

Added a scrolling camera. The car seems to be moving faster after dying because it stopped moving and there is no background to show it.

gamedev 

Camera now moves based on the position of the player's car in relation to the screen. The further it is from the bottom, the faster the camera and the car moves, just like in the original Spy Hunter.

gamedev 

The player now dies if the car goes off-road.

gamedev 

Fixed it so that it dies when the center point crosses a non-road tile. Looks more natural that way.

gamedev 

Spiked Car now shoots spikes when in line of sight of the player.

gamedev 

Added land mines. I plan on having these as a power up. No explosion animation, yet.

gamedev 

Added explosions. Explosions are their own objects.

gamedev 

Explosions also happen when enemy cars run over mines.

gamedev 

Added civilian cars. They are supposed to make you lose points if you kill them, but I haven't made the score visible yet.

gamedev 

Added a bumper car. You can't shoot it, only bump it off the road.

gamedev 

I think I solved the problems with car physics and collision which is to keep track of the car's position of the previous frame. Up until now, I've been using an object's velocity to handle directional collisions.

gamedev 

Got the bumper car behavior implemented. Will need to fix it. The car doesn't retract after bumping.

gamedev 

Finally fixed the collision detection (at least I hope). Turns out that recording the positions of the previous frame does actually work.

gamedev 

Added power-ups which are stored in wooden-crates. Right now, mines and missiles are stored in crates.

gamedev 

Mines and missiles have limited ammo now. I've also added a HUD. It's just text and it uses a TTF rather than a bitmap font. Bitmap fonts seem to be difficult in SFML. Supposedly, vertex arrays solve this problem but I haven't tried them yet.

gamedev 

I realized that you can have outlines in TTF text, so no need for bitmap fonts.

gamedev 

And yes, I also added tree tiles.

gamedev 

Updated the hud. Now, it displays which power up you have along with the ammo.

gamedev 

Added lives to the HUD. Now it's actually starting to look like a game.

gamedev 

Added a title screen, which is just black right now.

gamedev 

Added a second level. It's just a desert version of the first one, but that's because I'm testing support for multiple levels.

Follow

gamedev 

Added animated tiles (water).

· · Web · 1 · 0 · 1

gamedev 

Added a Game Over screen. Technically, it's been here for a while, but it was just red with no text.

gamedev 

Added a level timer. I set it to 20 seconds just for debugging purposes. I probably plan on setting it to something like 400 seconds.

gamedev 

Remaining time now gives you a bonus at the end of each level.

(EAR RAPE WARNING!!! I did not expect the sound to be this bad when repeating so frequently!)

gamedev 

Started to create a level editor for the game. All it can do right now is convert grass tiles to water on a blank (all grass) map.

gamedev 

Surprisingly, development is going along fast. I think it's because there are no boss fights this time (I can't think how a Spy Hunter clone can have boss fights). The car physics is the only true challenge.

gamedev 

Level editor now supports all tile images which can be switched using the keyboard.

gamedev 

Editor can now place objects (only the civilian cars at the moment) and can mark tiles as drivable (marked in red). I've also included a HUD on the right that currently only displays the current tile.

gamedev 

Editor can now place objects other than the civilian cars. A camera has also now been implemented in the editor.

gamedev 

Huge update to the level editor. Both saving and loading have been implemented along with a simple menu for selecting the level you want to edit. I've also added the power-up crates to the editor. Now it is actually usable.

gamedev 

Work a lot on the level editor. I've added edge tiles, but this caused a problem with the level format because the number of tiles is now in the double digits and I was using two digits in the tile maps. The first determined if the tile was drivable or not and the second was the index of each tile. I had to make the tile maps triple digits now because of that.

gamedev 

I've also allowed the changing of the x coordinate where the player character starts.

Not pictured, but I'm also working on an additional enemy. This one lays mines if the player is behind it.

gamedev 

Added the mine car. It lays mines when the player is behind it.

If you noticed the lag. The game lags when there are too many cars onscreen. I don't know why. It's a 2D written in C++. I normally create levels where there aren't that many cars at once.

gamedev 

Now, I'm working on a high score table. I got it to load random scores from a text file and sort them by score using the insertion sort algorithm.

gamedev 

So, I think I fixed the lag problem, key word being "think". So, in SFML, you have two objects for sounds: sf::SoundBuffer and sf::Sound. The sound buffer just loads the sound file. And sf::Sound is an instance of said sound with a pointer to the buffer. Up until now, I have every game object holding all of the sounds they play in their own sf::Sound objects. I thought it wouldn't be a strain on the memory because the actual sound data is stored in the buffers, but now I have a singleton class to handle all the sound playing.

I've noticed that there is somewhat less lag when there is a clutter of cars, but I haven't truly verified that yet. I haven't done it on a huge cluster of cars. Anyway, this should be a good thing, because the game is piss easy right now with amount of enemies on-screen.

gamedev 

Okay it doesn't seem like it's fixing the lag. At least it did fix the problem of audio crashing (apparently you can't have more than 140 sf::Sound objects in memory). I will try to fix the problem tomorrow because my adderall is wearing off.

Show newer

re: gamedev 

@coolboymew Yes. I thought about doing another shmup, but I didn't want it to be about spaceships or planes this time, and I know next to nothing about "magical anime fairy/witch type shmups", so I went with the Spy Hunter route. The challenging part is dealing with car physics. Namely, bumping into other cars.

re: gamedev 

@xianc78 I love Spy Hunter. I had it on my Apple //c in the 80s.

re: gamedev 

@Rocket As a kid, I would play the flash version all the time on Midway's website.

Sign in to participate in the conversation
Game Liberty Mastodon

Mainly gaming/nerd instance for people who value free speech. Everyone is welcome.