Show older

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.

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 

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.

gamedev 

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 

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

Follow

gamedev 

@LukeAlmighty Thanks. Now, going off from your deleted post (not offended btw), I just realized that not everyone has a middle name, which may be a problem.

· · Web · 2 · 0 · 1

gamedev 

@xianc78 @LukeAlmighty not everyone uses their initials. some people use shortened versions of their first name or tag, or just letters they like.

@xianc78
Sorry.
I wrote the first post on impulse, and then immediately realized, just how tasteless it was. :cry_konata:

Sign in to participate in the conversation
Game Liberty Mastodon

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