Show newer

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 thread

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.

Show thread

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.

Show thread

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.

Show thread

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.

Show thread

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.

Show thread

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.

Show thread

gamedev 

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

Show thread

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.

Show thread

gamedev 

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

Show thread

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.

Show thread

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!)

Show thread

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.

Show thread

gamedev 

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

Show thread
Show older
Game Liberty Mastodon

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