So, writing a Metal Storm clone is just way to complex for me right now, so I'm working on a vertically scrolling platformer instead (something like Kid Icarus). This is what I got so far. You can disappear from one side and reappear from another.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Added platforms. To stand on. There are also platforms offscreen to prevent the character from falling in the "transition zone" between wrapping to the other side of the screen. Something to keep in mind when implementing an actual level format and level editor.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Implemented a level format and a scrolling camera.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Engine now supports multiple levels.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Level resets when you fall off screen.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Added spikes.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Added platforms that you can jump onto from the bottom, but proper collision detection still needs to be worked on.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Added the first enemy. It just walks back in forth right now. It doesn't even take or do any damage, at the moment.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Added a second enemy. It just moves up and down.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Added HP (which you can't see) and sprite flicker when you get hit. I normally put stats like HP in the title bar before adding a HUD, but that didn't show up in my recording.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Added death sprites to the characters.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Enemies now flash red when hit.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Enemy now changes directions when at the edge of ledges.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Finally added sound effects.
#gamedev #SFML
xianc78
in reply to xianc78 • • •xianc78
in reply to xianc78 • • •Alright, he is a recording with actual sound this time.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Player character can now look up and shoot up.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Created a new type of enemy. It moves in a sine curve. Though the movement needs some tweaking if it is going to spawn in groups like this.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Got somewhat of a better pattern.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Added hearts, though you still can't see the HP.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Added a basic HUD. It's just text right now, but I plan on replacing the HP text with an actual health bar.
Right now, I"m suffering from writer's block on enemy design because I can't come up with new enemy ideas. Maybe I should replay Kid Icarus for inspiration, but I don't want this to be a straight up clone of the game. I always try to come up with at least something different.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Added a Game Over and Title screen. Both are currently blank and are red and black respectively.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Added a new enemy. It attacks when in line of sight of the player. It still needs tweaking. The placeholder spritesheet has unequal sizes for the sprites.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Got the enemy to attack when the player is at most, 4 tiles away from the player and is facing the player. Though admittedly, it should be lower. I was just testing the conditions and I will lower the range to make it more reasonable.
I also got the hitbox to change size during the attack, but that's not demonstrated in this recording.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Tweaked the range to be more reasonable. Ideally it should be within stabbing distance.
#gamedev #SFML
xianc78
in reply to xianc78 • • •The enemy now deflects bullets when facing the player and not attacking.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Replaced the HP counter with a health bar.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Added a lives counter to the HUD (was there before but it was just text and I removed it when adding the health bar). Right now, the icon is a coin because I'm borrowing HUD assets from a previous game project which didn't have an icon to represent lives.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Enemies now randomly drop hearts on defeat.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Added an "open door" animation when you reach the exit. Now, you have to press the down key to proceed.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Door now makes a closing sound as well.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Replaced the solid color tiles with an actual tileset. It's still a placeholder though as it is from another game (Mario Bros.).
#gamedev #SFML
xianc78
in reply to xianc78 • • •Added a menu, imported from my last game. Not sure if I will have high scores for my game though.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Added a death "animation" for the player.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Just got started with the level editor, but it's not functional yet and my meds are wearing out, so I have to work on it later.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Level editor is now running, but it's nothing, but an all brick background. Bare with me!
#gamedev #SFML
opal hart
in reply to xianc78 • • •xianc78
in reply to xianc78 • • •You can now place brick tiles in the level editor, but that's basically it for now.
#gamedev #SFML
xianc78
in reply to xianc78 • • •It's been a while, but I finally decided to take the gamble and use my dying laptop to add the ability to change which tile to place in the editor.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Added a UI bar at the bottom which displays the current tile. I also added a yellow outlined rectangle which represents the area that is actually seen in game. Since the player can walk to one side and appear at the other, I have to include tiles that appear offscreen, so naturally the editor window is larger than the actual game window. This outline shows what will actually be visible.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Level editor can now load levels, though it can only load the tiles and you still can't save.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Game objects (only hearts) can now be placed in the editor. The editor now supports saving, but only the tiles.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Editor now saves objects (still only hearts).
#gamedev #SFML
xianc78
in reply to xianc78 • • •Editor now supports all current object. You may notice a bug in this recording after saving with the fourth enemy being in a lower y coordinate after reloading the file. That's due to the fact that this particular enemy is larger than the game's tile size. I'm working on this issue right now.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Editor can now delete objects.
#gamedev #SFML
beard ひげ
in reply to xianc78 • • •xianc78
in reply to xianc78 • • •Editor can now change the position of the player and exit.
#gamedev #SFML
Caek Islove 🍰 💖 likes this.
xianc78
in reply to xianc78 • • •Editor can now change the direction the enemies are facing.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Created the first level in the editor and tested it in game.
#gamedev #SFML
xianc78
in reply to xianc78 • • •And here is the level in the editor.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Added an extra life.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Editor can now increase the height of the level by pressing the + key.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Actually creating levels in the editor now. I'm not the best level designer. I kind of create the level as I go and my editors aren't very robust, but make makeshift editors are much better than creating levels from a text-editor.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Added a turret that shoots when in line of sight of the player. I will probably adjust the firing rate though.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Levels can now have a blue background. Now you can have levels either in a cave or in the sky, I guess.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Added background tiles.
#gamedev #SFML
xianc78
in reply to xianc78 • • •I'm now using triple digit values for each tile in the tile maps because I've added more tiles to the tileset and it gotten to the point that each tile needs a double digit value along with the single digit value that gives the behavior of each tile. Naturally this breaks compatibility with the levels of the older format and I have to convert them manually, and have the reconfigure the level editor as well, but that's the price you pay.
I didn't do it earlier because I didn't expect to use that many tiles. I then decided to include background tiles, so naturally that increases the amount of tiles in the tileset.
You may notice that these tiles are from Mario Bros and CaveStory. I do these as place holders, and I eventually create my own.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Reconfigured the level editor to support the new format. I've also added a way to change the tile behavior and view the behavior of each tile in the editor. Tiles without an overlay are background tiles. Yellow represents solid tiles. Dark blue are platform tiles (ones where you can jump to from the bottom). Tiles with red overlays are spike tiles.
#gamedev #SFML
Mr.NutterButter
in reply to xianc78 • • •xianc78
in reply to Mr.NutterButter • • •xianc78
in reply to xianc78 • • •Now here is a level I can make now that the format supports background tiles.
#gamedev #SFML
beard ひげ
in reply to xianc78 • • •xianc78
in reply to beard ひげ • • •xianc78
in reply to xianc78 • • •I realize that I didn't include support to change the background color in the level editor, so here it is. It is done by pressing the left control key.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Added walkable cloud tiles for this particular level.
I have no idea what this game is going to be about. It probably will be a mix of sci-fi and fantasy, at the rate at this thing is going.
#gamedev #SFML
opal hart
in reply to xianc78 • • •xianc78
in reply to opal hart • • •Mr.NutterButter
in reply to xianc78 • • •xianc78
in reply to Mr.NutterButter • • •Mr.NutterButter
in reply to xianc78 • • •xianc78
in reply to xianc78 • • •Added support for horizontal scrolling levels. Given, that this game is somewhat Kid Icarus-inspired and Kid Icarus did include horizontal levels, I decided I might as well include them.
Including this was a pain as I didn't originally planned to include this. I still haven't included this in the level editor yet, but I think I could get it done. I just feel like the game should be more than about some character jumping all the way to the sky.
Mr.NutterButter
in reply to xianc78 • • •it definitely adds a lot more depth to the game and you can create a lot more creative levels now.
This kind of reminds me of early Kirby because the large majority of the games were vertical but it did have at least in the beginning of the level horizontal play space.
xianc78
in reply to Mr.NutterButter • • •Mr.NutterButter
in reply to xianc78 • • •xianc78
in reply to xianc78 • • •In the level editor, I had to change the camera controls from the arrow keys to WASD because the left and right keys were giving me segmentation faults for whatever reason. Luckily, I can still use arrow keys in the actual game.
#gamedev #SFML
xianc78
in reply to xianc78 • • •binkle
in reply to xianc78 • • •xianc78
in reply to binkle • • •applejack
in reply to xianc78 • • •@binkle What the fuck. And how long were you using C++? Ye, it's no wonder segfaults were an issue
compile with -g
run: gdb ./program
type: start
it tells you exactly where it segfaulted with 10x more useful info than you'd get in python or something. Type `p x` or `p *foo.bar` or whatever to inspect variables, bt for a backtrace
xianc78
in reply to xianc78 • • •I found the problem with the segfaults. I was already using the arrow keys for changing the facing direction of a select object and I forgot to make the current object pointer null by default. I'm probably going to stick to WASD for camera movement though.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Created a horizontal sky level. I'll probably have this level come after the vertical mountain climbing level.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Created the first boss fight. It takes 60 hits to kill. I plan on having it shoot homing attacks at the player.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Boss now shoots at player.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Created a second boss. Currently, it's using the same placeholder sprite. This one jumps. I might have it shoot between jumps.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Second boss now shoots projectiles at an arch in-between jumps.
#gamedev #SFML
xianc78
in reply to xianc78 • • •For whatever reason, I get this random bug that causes the sound effects to be high pitch. It only happens on my new System76 laptop and I don't know what is the cause. It's completely random. Sometimes, it sounds normal. Other times, not so much.
#gamedev #SFML
xianc78
in reply to xianc78 • • •I've added a freeze frame after defeating a boss along with explosions. Ignore the high-pitched, corrupt sounds and me breaking the golden rule of keeping the cursor out of the recording.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Bosses can now be placed in the level editor.
#gamedev #SFML
xianc78
in reply to xianc78 • • •So apparently, I broke compatibility between my game and level editor and I'm still trying to figure out how.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Ugh. Incorporating horizontal levels in a vertical platformer has made the code a huge mess.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Fuck it. I might have to scrap this project. I can't constantly tinker shit. And deal with broken compatibility with the level editor and game itself, while also having two modes.
I might redo the dungeon crawler project since I've been working a lot on procedural generation.
#gamedev #SFML
xianc78
in reply to xianc78 • • •Luke
in reply to xianc78 • • •xianc78
in reply to Luke • • •Luke
in reply to xianc78 • • •xianc78
in reply to Luke • • •@luke For vertical levels I have the player go from one side to the other. This required me to include tiles offscreen. I shoehorned in a horizontal mode, but that required extra code (like repositioning the camera). Too make matters worse I was also working on the level editor so I had to shoehorned those features as well.
Some levels ended up looking corrupted from the level editor to the game itself as a result and I was constantly fixing it.
humongous always
in reply to xianc78 • •C'est tellement fantastique