Show newer

gamedev 

Door now has a sound effect.

I've also realized that the way I'm storing assets in RAM is inefficient (I've actually knew that since the beginning but I haven't bothered to fixed it). I need to implement an asset manager class and have each object store pointers to said assets. Right now, each object stores entire textures/sounds when they should be storing pointers instead.

Show thread

gamedev 

Player position is now defined in the map file. The second line of numbers determines the player's x and y position (in tiles).

Show thread

gamedev 

Enemies are no longer hard coded into the map. They are now loaded from the map file. Ignore the enemy placement. It moved before I could take the screenshot. (My screenshot utility is probably delayed)

The first two numbers defined the level width and height.

The block of numbers are the tiles.

Everything after that are objects. They are listed by object type and then the x and y coordinates.

Show thread

gamedev 

I've added locked doors. Probably should create a better tile for them, but all tiles are placeholders (assuming I publish this game; this is merely me just getting used to object management in C++) as most sprites are from Zelda I and BS Zelda.

Show thread

gamedev 

I've added keys, which can be used to open lockdowns that haven't been implemented yet.

Show thread

gamedev 

Fixed the segmentation fault and the death bug. Segmentation fault happened because there was an index that I forgot to set to 0. I'm used to C# where integers had the default value of 0 when declared as opposed to random values as it is in C++.

Show thread

gamedev 

I've fixed the bug, but now the enemy is left on the death animation if it dies. As you can see, the enemy is knocked back based on the direction it is facing, when it should be based on the velocity of the projectile (result of copying and pasting code from player's knockback).

There is also a new problem in that I keep on getting segmentation faults. I don't know where they are coming from.

Show thread

gamedev 

I tried to test out increasing the health of the enemy, but I'm stuck with this annoying bug where the enemy dies in one hit no matter how much health I give him. I even tried giving him 1000000 hp and the result is still the same.

Show thread
Show older
Game Liberty Mastodon

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