xianc78,
@xianc78@gameliberty.club avatar

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 #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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 #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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 #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Got tiles.

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Added a limo.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Added explosions. Explosions are their own objects.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Explosions also happen when enemy cars run over mines.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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 #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

You can now knock cars off the road.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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 #sfml

xianc78,
@xianc78@gameliberty.club avatar

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

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Added missiles. Can blow up any car.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Added desert tiles.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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 #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

And yes, I also added tree tiles.

xianc78,
@xianc78@gameliberty.club avatar

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

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Limo now shoots.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Added animated tiles (water).

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Added sound effects.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Added a level start screen.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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

#gamedev #sfml

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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 #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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 #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Added a menu. It's not centered yet.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Centered the menu.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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 #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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 #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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

#gamedev #sfml

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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 #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Actually creating levels now.

#gamedev #SFML

xianc78,
@xianc78@gameliberty.club avatar

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 #sfml

image/png

xianc78,
@xianc78@gameliberty.club avatar

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 #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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 #sfml

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

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 #SFML

image/png

xianc78,
@xianc78@gameliberty.club avatar

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 #SFML

xianc78,
@xianc78@gameliberty.club avatar

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.

#gamedev #SFML

xianc78,
@xianc78@gameliberty.club avatar

Maybe it did fix the lag, but only slightly. I've also rearranged some if-statements, which also seemed to help.

Regardless, if you drive slowly enough, eventually all the cars in the level will appear on-screen at once because the only start moving once they are fully onscreen and will only disappear once they are on the bottom of the screen. So you will eventually get lag. But nobody is going to play the game that way so who cares?

Unlike my previous game, enemies do have some sort of AI, as opposed to just having patterns. Naturally, there are a few state machines and lot of if-statements even for this basic AI, but that's also because of poor planning. Some could be turned into switch statements.

Also, having a mine car does increase difficulty, a little bit. So, I probably won't need that much more cars on screen.

Anyway, the game is coming along nicely and quickly regardless. Like the last game, don't expect anything ground-breaking, just something that would be fun for a couple of minutes.

#gamedev #SFML

xianc78,
@xianc78@gameliberty.club avatar

Added name (initials) entry to the high score table, as in you can change the characters around, but can't save the highscores, yet.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Oh, I've also replaced one large if-else statement with a switch statement. I think that might help with performance. Contrary to popular belief, a switch statement and an if-else statement do not compile the same way. if-else uses branching instructions (constantly checking for and calculating conditions) while a switch statement uses a lookup table.

#gamedev #SFML

xianc78,
@xianc78@gameliberty.club avatar

I've added a checkpoint system. Checkpoints have to be added manually in the text file because I haven't put them in the level editor yet.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Checkpoints have now been implemented in the level editor, but for whatever reason they aren't visible. They do load. I don't know why this is happening. I will probably work on it tomorrow.

#gamedev #SFML

xianc78,
@xianc78@gameliberty.club avatar

Finally, checkpoints are now visible in the level editor.

#gamedev #SFML

xianc78,
@xianc78@gameliberty.club avatar

Checkpoints can now be placed and deleted in the level editor. Note that these checkpoints aren't actually visible in game, only in the level editor.

The red part represents where the player will respond. The yellow part represents where the player needs to cross in order to reach it.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Now creating the second level using my level editor. This one is a desert level.

#gamedev #SFML

xianc78,
@xianc78@gameliberty.club avatar

Desert level is done. Created a forest level using the level editor.

#gamedev #SFML

xianc78,
@xianc78@gameliberty.club avatar

Now creating a bridge level.

#gamedev #SFML

xianc78,
@xianc78@gameliberty.club avatar

I'm realizing that this game is piss easy because Spy Hunter-style enemies can only attack from the side. While I do have a mine car. It isn't enough. Unlike the original Spy Hunter, enemies cannot appear from behind because this game has predefined enemy placement. And if you know where the enemies can attack, you can always attack from behind, and never have to deal with the threat of enemies attacking you.

I plan on adding one more enemy that appears from behind and will shoot you on sight. Hopefully, it will add a little bit more challenge. However, I need to be careful about adding too many enemies on screen because of the lag problem that I can only mitigate so much.

The other option is just to scrap predefined enemy placement altogether, and have cars appear from either the top or bottom after a certain interval with a limit on how many cars can appear on-screen at once. This would obviously be a hard choice because I put so much work in designing the levels and even creating my own level editor, but unexpected turns are just simply a reality in game development.

#gamedev #SFML

xianc78,
@xianc78@gameliberty.club avatar

Now, I'm experimenting with having randomly spawning enemies as opposed to predefined enemy placement in levels. It should help with the problems I had previously and also allow me to include enemies that appear from behind (which I haven't implemented yet).

I should also tweak the behavior of some enemies. Have them catch up to the player, if they attack from the side.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Enemies now appear from behind. I still need to tweak the behavior. I'm trying to program them to catch up to the player when they appear from behind but they still behave oddly.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Created a snow level.

#gamedev #SFML

xianc78,
@xianc78@gameliberty.club avatar

Working on a farm level now. I even have tiles for both corn and some sort of crop. I tried making an apple tree tile, but it ended up looking weird.

#gamedev #SFML

image/png

xianc78,
@xianc78@gameliberty.club avatar

Player car now spins out if it gets hit by spikes or shot by a limo.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Working on a credits sequence. It isn't that much because I'm the sole developer and I didn't use that many third-party assets (yet). I decided to add the tools I used to pad it out.

The credits are loaded from a text file with it's own simple markup format.

#gamedev #SFML

image/png

xianc78,
@xianc78@gameliberty.club avatar

Added a sound effect when the player car spins out.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Wrote a debug level select.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Made a beach/island/sandbar level. I don't know if I'm going to make more levels. Other than that, I just need to tweak some things, add music, replace the Spy Hunter sprites with my own or stock assets, give this a name, and then I'm done.

I'm hoping that my next game would be something more inspired.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Added background music. This track is called Mom's Workout CD by Zane Little Music on OpenGameArt.org.

https://opengameart.org/content/moms-workout-cd

#gamedev #SFML #indiegames #gaming #indie #indiegamedev

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Added a toggle between window and fullscreen, which I can't show in my recordings.

#gamedev #SFML

xianc78,
@xianc78@gameliberty.club avatar

Trying to replace the Spy Hunter assets with my own but I suck at drawing.

This is supposed to be a car.

#gamedev #SFML

xianc78,
@xianc78@gameliberty.club avatar

Replaced the player car's sprite with my own. It kind of looks weird though. I probably should make a smaller one and have this sprite be for an enemy. It turns black when destroyed because it's supposed to be charred.

I also made this using Piskel instead of Pinta because Pinta, for whatever reason, keeps on randomly crashing, even after updating it.

#gamedev #sfml

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

I wasn't planning on making anymore levels, but then I realized that Level 1 was basically a vertical slice level, so now I'm making the actual Level 1.

#gamedev #sfml

xianc78,
@xianc78@gameliberty.club avatar

Still replacing all the Spy Hunter assets with my own. I made the civilian cars look like taxis so it would be easier to recognize them as civilians.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

I now replaced the assets for the spike car and limo. All that's left is the bumper car.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Created a sprite for the bumper car. Still have the bullets and explosions but I will get to them eventually.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Replaced the bullet and explosion graphics with my own. The explosion could use a little more detail though.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Added more detail to the explosion sprites.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

Changed destroyed vehicle sprites from "charred" to wrecked cars like what the original Spy Hunter had. It just looks better since they are usually destroyed by bullets and not explosions.

#gamedev #SFML

video/mp4

xianc78,
@xianc78@gameliberty.club avatar

So I'm almost done with this project. All I need to do is add a few more songs, sound effects, and iron out a few bugs.

But I have an important question: What should the title be? It's a Spy Hunter clone and it has no story. Unlike my last project, I can't get away with coming up with some made up name because it's set in a realistic setting.

xianc78,
@xianc78@gameliberty.club avatar

Finally got a logo on the title screen/menu along with a title for this game. Shout out to @Mr_NutterButter for the logo and for coming up with the name.

It actually looks too good, especially compared to the actual game.

#gamedev #SFML

xianc78,
@xianc78@gameliberty.club avatar

I'm debating whether or not I should have silent credits because the credits sequence is so short, no matter how much I pad it out (I use a lot less stock assets this time).

#gamedev #SFML

xianc78,
@xianc78@gameliberty.club avatar

So, the game is basically done. I could add more levels and stuff, but I'm burnt out and want to move on. It's playable from start to finish and that's all what matters. It also isn't as polished as the last game, but that's because I've switched both languages and frameworks.

Expect a release later today. I just need to create a page for it on my website. It might be for Linux only for the time being because I currently don't have access to a Windows PC and I don't really feel like cross-compiling with MinGW and Wine.

#gamedev #SFML

xianc78,
@xianc78@gameliberty.club avatar

IT'S FINALLY DONE.

My Spy Hunter clone, Distant Ruins is now complete. Currently, there is only a Linux binary, but you should be able to compile for Windows in the meantime.

https://xianc78.codeberg.page/downloads/distant-ruins.html

CC: @coolboymew, @beardalaxy, @Mr_NutterButter, @binkle

Mr_NutterButter,
@Mr_NutterButter@gameliberty.club avatar

@xianc78 @coolboymew @beardalaxy @binkle Congratulations!

xianc78,
@xianc78@gameliberty.club avatar

@Mr_NutterButter @coolboymew @beardalaxy @binkle Thanks.

BTW, I had to remove the "Registered" symbol in the logo. I don't know why you put that there. I don't own a trademark for that name or logo.

coolboymew,
@coolboymew@shitposter.club avatar

@xianc78 @Mr_NutterButter @beardalaxy @binkle

Brutal until you get used to the car type, I got up to level 4 this time

Small glitches:

  • Ramming into the destroyed long gun trucks tends to teleport you left and right at a distance big enough to kill you sometimes
  • After death, you can press start and the music restart until the level restart (very minor)
xianc78,
@xianc78@gameliberty.club avatar

@coolboymew @binkle @beardalaxy @Mr_NutterButter Ugh! That collision glitch is still there? I though I removed it. This is the first video game I ever programmed to have a completely different method of collision detection. Normally, I checked the angle of the collision based on velocity, but since bumping is involved I had to do it based of the position of the previous frame.

I still don't know what's causing the random teleportation.

coolboymew,
@coolboymew@shitposter.club avatar

@xianc78 @binkle @beardalaxy @Mr_NutterButter yeah, all the other cars has no issues except that one. Sometimes it teleport you right to the side (less of a big deal), but sometimes is teleport you a few cars width away and that can be mortal

  • All
  • Subscribed
  • Moderated
  • Favorites
  • gamedev
  • ngwrru68w68
  • rosin
  • GTA5RPClips
  • osvaldo12
  • love
  • Youngstown
  • slotface
  • khanakhh
  • everett
  • kavyap
  • mdbf
  • DreamBathrooms
  • thenastyranch
  • magazineikmin
  • megavids
  • InstantRegret
  • normalnudes
  • tacticalgear
  • cubers
  • ethstaker
  • modclub
  • cisconetworking
  • Durango
  • anitta
  • Leos
  • tester
  • provamag3
  • JUstTest
  • All magazines