You are browsing as a guest. Sign up (or log in) to start making projects!

Unnamed Platformer

  • 22 Devlogs
  • 177 Total hours

A game where you play as a square in space, and there are 5 sets of 6 levels. For each set you begin after the first, you unlock a powerup and go to a new planet. This game was coded using C++ and the Simple and Fast Multimedia Library (SFML), without the use of any external game engines such as Godot or Unity.

Open comments for this post

6h 53m 13s logged

Unnamed Platformer - Devlog 22

School starts tomorrow 🫩✌️so i decided to make a shorter devlog…also I’m so tired

What I did: Honestly you can’t really tell that I did much at first glance. I was mainly playtesting a lot and polishing stuff up, and making sure all the background stuff was fine. For now I dont think I’ll return to background stuff for a while. Although I did manage to add a particle effect for the black holes (both the ones in the background as well as the actual obstacles). I was also experimenting with a horizon for a bit, but then I decided I don’t want it and scrapped a good chunk of time worth of changes.

Challenges: Deciding how to add in particles was a bit challenging, specially the math part. But other than that it was a pretty chill 7 hours.

Plans for next time: Hopefully finish menus, then: work on vfx, polish up all the menus, tackle any big issues with levels or physics, and finally work on bringing my game onto itch.io! not all in one go, though.

K bye guys

0
0
11
Open comments for this post

9h 50m 50s logged

Unnamed Platformer - Devlog 21

Background design is a bit easier now that I have a plan…also I did not lose track of time 👍

What I did: I added in every single sky element I want to have: comets, planets, black holes, stars, floating rocks, and a moon. I think I might tweak some elements later down the line (specifically the moon(adding craters) and black holes(I’ll think of some extra effects) ), but for now I’m fairly satisfied with how far I’ve come. Looking at the game now gives me a sense of pride at seeing everything finally come together after so long 🥹✌️

Challenges: Making comets was a bit of a hassle, because I had to decide how to do it (which took me some time for brainstorming + more time cuz of discarded changes + even more minutes of brainstorming), and implement it. It’s pretty complex cuz there’s a cooldown on each comet, then you have to set the spawn point and angle/speed, calculate the trail’s points, draw them, draw the head too etc etc…so it was pretty tedious, but comets are the most rewarding visually imo out of all the features. Other than that, I spent a bit of time per other feature figuring out how to implement each of them, but none of them were as complex as the comet.

Plans for next time: Finish up any bugs or other issues in sky-related stuff, then I’ll try to make a visible horizon again and see if I’ve changed my mind since last time. Either that or I’ll start working more on smaller vfx, specially trying to find out how to make a particle effect.

K bye guys

0
0
4
Open comments for this post

11h 10m 58s logged

Unnamed Platformer - Devlog 20

Background design is a hell of a lot harder than I thought it would be…also I lost track of time 😭😭

What I did: I got started on background design, and partially implemented a background. I actually had a pretty different idea in mind compared to what I have now: the rest of the planet visible, stretching into the horizon, with mountains and volcanoes etc etc. scattered along its surface. After spending a while implementing that, I realized it a) didn’t look right, since everything was just following the player around at normal cam speed, and b) I didn’t like the idea anymore to begin with.

So after scrapping all those changes, I started researching how to add a scrolling effect so it would look more natural. I found out how to implement a parallax scroll effect, which basicallymeans that objects in the background move along slower than objects closer to the front of the screen. I also restructured my scenes.h file which contains all background-related stuff, and made a couple of other small changes and fixes with certain levels. I know I don’t have much to show for it, but that’s mainly because I spent a lot of time tweaking certain elements and just undoing backgrounds I ended up not liking 😭🥀

Challenges: Deciding what to do visuals-wise cost me some time bcuz I kept going back on my old ideas, but restructuring scenes.h was the hardest part since after deciding what to do for visuals, I had to base the logic in scenes.h off that. Also it took me a while to decide how to add in a parallax scroll system.

Plans for next time: Work on more background stuff. right now I’ve set up a lot of background elements’ structs and whatnot, but I’ve only redrawn the stars and added a rough brightening/dimming effect. Also Im gonna have to start thinking about what I’m going to add on each of the sub-menus accessible from the main menu (credits, handbook, and settings).

K bye guys

0
0
46
Open comments for this post

9h 59m 24s logged

Unnamed Platformer - Devlog 19

The UI is coming along pretty nicely! Pt. 2

What I did: I believe I’ve fully created everything UI- and menu-wise, aside from 3 additional menus (credits, a ‘handbook’ that contains info about stuff, and a settings page) that are currently blank. I created a hovering effect for buttons that makes it so when you hover over a button, the button goes downward slightly and the shadow moves to match. Aside from that, I polished up/tweaked some minor details, and the only things I’ll add menu wise are probably those 3 sub-menus on the main menu and a universal backwards-nav button.

The biggest thing (time-wise) was figuring out how to make the code more readable and actually making it more readable. I created two new functions for making text and button objects which made my life a lot easier, also the button-hover code took quite a few lines so I put that into a function too. Aside from that, I made a couple fixes here and there to make it more efficient memory wise. And even then, I ended up breaking stuff which took me a while to fix, such as the issue with unpausing ur game in the vid.

Challenges: Probably efficiency stuff, since deciding how to do it + implementation took a while and had a couple of bugs due to me not accounting for stuff. For example: my hover function would change states on its own, but since sometimes you don’t need to directly change state or you need to do other things too, I made it into a boolean that each individual case takes and does its own thing with.

Plans for next time: Start on background stuff probably, I don’t want to do anymore UI stuff for now. I have a fewideas in mind for my background visuals, but I hope they won’t be too hard/impossible to implement.

K bye guys

0
0
106
Open comments for this post

9h 55m 39s logged

Unnamed Platformer - Devlog 18

The UI is coming along pretty nicely!

What I did: Designed a full level select menu (there are a couple more things left to add), add a heads up display for the current level, and add proper mouse input and extra details to buttons such as shadows (havent implemented shadows for everything, I’ll explain why) and changing color when hovering. Even though it doesn’t sound like much, it took me a surprisingly long time because my text wasn’t centering…What I didn’t realize is that sf::Text creates invisible offsets for some reason, so when I used getGlobalBounds() it would return that offset too and mess up the centering. I ended up doing some research and realized I had to use the local bounds (i.e. untransformed) when centering.

Challenges: Ig the biggest ‘challenge’ was centering buttons with text, because at first I actually tried to manually fine tune coordinates and whatnot. But then I found out I had to use localbounds and blah blah. Another thing is, I spent a lot of time fine tuning sizes, colors, shadow darknesses and depths, etc. which took a lot of my time. Also no ai used this time either, although I did spend a lot of time researching why my text wouldn’t center itself.

Plans for next time: I’ll just polish up existing menus, and work on background elements. Also I want to add a kind of handbook accessible from the main menu that tells you what stuff does, different powerups, etc. But most importantly, I’m gonna try to find out how to make shadow creation more efficient.

For every text/button, I need a shadow. That means I have to add it as a member in the class, copy the actual object, change the color and offset it, then draw it too. Since I have so many objects that make shadows (all of them in the end, ideally), I’m probably going to make a shadow-making function for readability. Other than that I’ll just play the game and test levels a bunch, which I’ve already been doing a lot to make sure everything is as it should be.

K bye guys

P.S. there’s also still a couple bugs ( UI-related or otherwise) that I have to fix as well

0
0
106
Open comments for this post

9h 54m 15s logged

Unnamed Platformer - Devlog 17

It’s actually no longer “Unnamed Platformer”, it’s “Worlds of Blockman”, I might change that later idk

What I did: I designed level 30, playtested every level extensively and tweaked some levels, and made a basic main menu, level hud and pause menu. And it took me ~10 hours.

Well, that’s not all I did. I also changed up the colors of the square to differentiate it from spikes and buttons, and I added a visual indicator for the triangle’s teleport. When you tp the triangle fades to a darker shade of green, and when it gets off cooldown (3 secs) it fades back to its normal color and then you can tp again. Also, level design took quite a long time since I was kind of making it up as I went along, and the whole game states implementation wasn’t too hard in itself, but I ran into errors with loading my font. I added the .ttf file to my assets folder and wrote the correct file name in font.loadFromFile() and whatnot, but turns out I didn’t have the actual font downloaded in the build folder or my project. So after a bit less than an hour I added it in and it fixed the issue. also I spent a bit of time deciding how the different menus would actually look which ate up some time.

Challenges: ngl the font-loading thing was kind of the only hard part 😭most other stuff was solved relatively quickly and easily

AI used, if any: None, also most likely no AI will be used in the future since the future just holds visual stuff which should not be hard enough to merit the help of AI.

Plans for next time: Level select menu, add more stuff to main menu, also make it so the current level shows in the background when you go to the pause menu. also add mouse inputs so you can use those instead of kb inputs in the menu, and start on some more vfx and sfx.

I’m also really tired

0
0
8
Open comments for this post

9h 58m 19s logged

Unnamed Platformer - Devlog 16

Actually didn’t get a lot done over the last few days, let me explain.

What I did: The biggest and only new feature I added was a major adjustment to black holes. Earlier they were just 2 tile x 2 tile circles that killed you upon touching. I’ve reworked them to how they’re supposed to be: 6 px x 6 px black circles, with a surrounding 6 tile x 6 tile ring. now if you enter the ring, you

  • lose the ability to move normally (you can still jump tho)
  • get pulled toward the black center, which kills you if you touch it

Which is how it’s supposed to be (nevermind the astrophysical inaccuracy lmao). This took me 2 hours 😭 and then I designed levels 26 and 27. I also re-added the old texture system I implemented and then took down earlier cuz it was making things look hella grainy, but only for environment tiles cuz there’s no big changes visually compared to redrawing them every frame. Unfortunately it doesn’t seem to be doing much in terms of efficiency.

I also designed levels 28 and 29 (ss of level 29 attached), and playtested every level from 1 to 28 and adjusted each one to remove any unwanted ways you can cheese a level, as well as to just make some of them less punishing for small mistakes. I also (FINALLY) designed level 6. I added extra sections and polished up some elements that were making the level impossible if you didn’t play it perfectly.

I did 2 other things as well: I made it so blocks can’t be pushed by any character other than the square (before you could just push blocks w/ anything) and I reduced horizontal movespeed in zero-g. There’s still a lot more I have to do, mainly ui/menu stuff and visual polish.

Challenges: Black hole physics took me a while since my first few implementations were completely wrong, and then I locked in nd figured out how to make it pull correctly. Also, level design is proving to be surprisingly challenging, I rly didn’t think it would take this long, but what with conceptualizing + creating + playtesting each level, especially the later ones where I want to make them more complex and difficult, it eats up a lot of time per level. Even going back through older levels and tweaking them can take a while, cuz you gotta track down all the problematic sections and figure out how to fix them. I also have a humble 18 more days till school starts so I gotta lock in🙏

AI used, if any: None, level design is hard but its not THAT hard

Plans for next time: Finish level 30, playtest levels 29 and 30, and hopefully get started on + finish a main menu and level select menu.

Im so behind on my schedule it aint even funny so wish me luck

3
0
82
Open comments for this post

10h 0m 19s logged

Unnamed Platformer - Devlog 15

Actually got a lot done over the last few days ig
 
What I did: first off, I reset my old changes and made it so env tiles layer over obstacles. At first I tried to assign an individual character to each combination (spike in water, block in zero-gravity, etc etc) but that didn’t work since I couldn’t get them to lay over each other. So what I did is I split my statictilelist into two: statictilelist now held all non-moving entities like spikes, ground, etc. while envtilelist held all my environment tiles. Then I changed my map loading function to take two map strings: one assigned tiles based on entities and the other pass assigned them based on environment. And now I can lay environments over things without breaking my game! Yippee!

I also fixed an issue where blocks could clip through obstacles in zero-g when you moved them upward. The issue was blocks unconditionally being mtv-moved when the player was below them, so the player forced them through anything. I added an extra check before mtv-moving and made obstacle detection variables global to fix it. I also ran into an issue where spikes would incorrectly kill you even if you were not touching them, just near: the issue was that I wasn’t running SAT collision, just going straight to death logic if the initial AABB check turned out true (I run an AABB check first because running SAT for everything makes the game super laggy). both of these lowkey took me a while 😭

As for level design I reworked level 6 (still can’t play it) and level 17 (finished), and I designed levels 18-25 (I attached a video of level 24). Also in the vid I switched shapes randomly, that’s just because I had different keybinds earlier and it was js muscle memory kicking in.

Challenges: Aside from a bunch of small bugs, the biggest challenges were the issue where spikes would kill you even if you weren’t touching them and the issue with blocks being pushed up forever in zerog. Even then, for both issues it was still easy to fix since it was easy to diagnose and a few lines per fix, even if it took me a while to find those few lines 🥀🥀 However, there’s still an issue where blocks sink slightly upon spawning in zero-g. This makes it impossible to play level 6, so I’ll have to look into/rework/do something to zero-g logic because I really want to keep its existing level mechanic.

AI used, if any: None 🔥

Plans for next time: Finish levels 26-30, finish level 6, and test all the levels to make sure they’re not too hard/impossible/possible to cheese. Aside from that, I’ll most likely bring back the texture thing I implemented last time cuz it did actually make the game run a bit smoother, but I’ll only do it for environment tiles.

K bye guys

0
0
36
Open comments for this post

10h 4m 36s logged

Unnamed Platformer - Devlog 14

I’m genuinely so done

What I did: I designed levels 5 and 7-16 (ss of a few levels should be attached idk which they are). I have a cool idea in mind for level 6 but my current code makes it hard to implement, and I also have a cool idea in mind for level 17 but my code made it hard to implement. So I changed everything up like an idiot.

My 17th level features a massive pool, but that requires me to draw 1000+ water tiles. Since I redraw tiles every frame, it causes a big load on the computer. So I had the brilliant idea of creating an sf::RenderTexture. spoiler it’s not so brilliant.

That led to a massive chain reaction where there were a bunch of nullptr issues at first, which I spent about 40 minutes on before actually getting the game to run. Then everything was super grainy due to aliasing issues caused by drawing everything to a RenderTexture, PLUS since I was drawing everything at the start of the frame and not updating it, stuff like buttons and doors would never update. SO, my dumb ahh moved half my static/environment tiles to dynamictilelist, reserved for strictly blocks which are the only tiles that can change position, and I did this cuz these would draw every frame and they didn’t have the same grainy look as the ones drawn to a texture. the result is probably self explanatory. That caused SO MANY ISSUES that I can’t even begin to describe them all, so after 50 minutes I undid 50 minutes worth of changes, added some spaghetti code to make it a bit more presentable, and call it a day.

Challenges: Level design was fun, and easy. I did that for all of yesterday and the first half-ish of today.

The vain attempt at making my code more efficient by changing how static tiles were drawn and then going on to deeply regret it and consider undoing it all the next day, was not. Also I probably shouldn’t have bothered trying seeing as I was pretty tired anyway, but ig my stupidity/ambition/idek led me to try. I’m genuinely too tired to bother elaborating, but it goes somewhat like this: I started on the texture-caching thing -> I ran into nullptr errors -> I got those out of the way -> I ran into issues with rendering and updating -> out of frustration I undid all my progress and started anew -> I decided to implement anti-aliasing -> I will probably(definitely) reset my code to where I had been right before I decided to do this stupid implementation

AI used, if any: none. If I had I would’ve probably been done with this bs by now.

Plans for next time: Realistically I’ll likely just undo all the changes I made to drawing processes, find out how to draw environment tiles underneath other entities/obstacles (which will be useful for many of my levels with spikes or the like in environments), and…thats it. Also, for level design, I want to have all preliminary designs down by the end of this Sunday (3 more days), and then I can playtest and refine later.

I wanna cry

P.S. the level with the white room is level 6 and it’s currently unfinished lmao

2
0
70
Open comments for this post

9h 54m 50s logged

Unnamed Platformer - Devlog 13

No motivation…

What I did: I solved the issue of vertically stacked blocks clipping through each other and through the player, which was a pretty big chunk of my time since I went through like 10 different approaches and changed up a bunch of stuff along the way. I ended up taking out the SAT collision function I had built and just plugging mtvCheck() (which checks the mtv( )) and the movement logic straight into the collision loops instead. I had to reorder a good chunk of logic too since a lot of the clipping was coming from stuff resolving in the wrong order relative to other stuff.

Also did some cleanup: deleted the grounded member off the block class since entity already has one and I was just using two variables for the same thing like an idiot. I added an R keybind so I can restart instantly instead of walking into a spike every time I want to reset (useful for testing + as an actual game feature). I also made the player’s rotation reset on spawn so you don’t respawn tilted at some weird angle from your last death and shrunk the spike hitbox down a bit from 20x20 to 18x18 because I was dying to one-pixel overlaps that looked like it shouldn’t have counted and that are pretty frustrating to deal with.

Also did a bunch of level design. I’ve only done levels 1 through 4 so I lowkey gotta lock in.

Challenges: The stacked block thing took forever because the symptoms kept changing depending on how many blocks were stacked, which direction they were pushed from, whether the player was involved, etc etc, so it never felt like I was chasing ONE bug, more like four bugs wearing a trenchcoat. Eventually I just started brute-force testing every combo I could think of (2 stacked, 3 stacked, stacked + pushed, stacked + player jumping into it) until I ran out of ways to break it. Also I ran into some issues when designing levels: blockonhead, which makes it so you cannot jump if a block is on your head, was triggering if any block was lined up above your head, even if it was like on a platform way above you. I managed to fix that, and other than that + the block issue there wasn’t too many big obstacles this time.

AI used, if any: none, since I’m not using it at all for game design and didn’t need to use it to solve block clipping issues since I just brute forced a bunch of possible solutions.

Plans for next time: More level design…I’ll try to get most of the levels done by next devlog.

K bye guys

0
0
5
Open comments for this post

9h 51m 22s logged

Unnamed Platformer - Devlog 12

Man* Realizes True Meaning of ‘If it ain’t broke, don’t fix it’

What I did: First I ported pushable blocks to SAT collision so they use the same system as the player and it’s not split between two systems. Well. That broke blocks.

so I spent 2 hours or so cross referencing my old versions and adding and deleting changes till it started working again. After that, I made sure blocks moved properly in zero-g. (they didn’t so I had to fix that too) Aside from that, I made a bunch of miscellaneous changes, such as fixing level progression bugs and altering player constants, but most importantly making sure blocks worked properly.

Somewhere along the line I was investigating how stacked blocks interacted. I noticed they were clipping through the ground because of collision checks happening after the position of blocks was updated, and after some thought I tried adding another collision check pass to my main game loop. It worked like a charm! I added two extra checks for safety and it stopped working like a charm.

The issue is my checkCollisions function is hella inefficient. 500+ lines of searching through every character in the tilemap (36x64, plus an extra column for new lines making it 36x65=2340) 6 times(!!!) Not only that, in some cases (block/player collision detection) I was nesting full passes within full passes, which caused insane lag, especially with my SAT collision which does a lot of math each frame. So I decided I wanted it to be more efficient (spoiler: it’s not efficient yet). I split my old tilelist into static tiles and dynamic tiles…and instantly regretted it.

Challenges: Basically when I split tilelist into two separate vectors (statictilelist which is everything except for blocks + dynamictilelist which is just blocks since nothing else moves lmao), I think I accidentally deleted a lot of existing logic that was the duct tape to my spaghetti code**. Aside from that, when I passed through tilelist it always passed through every tile, but with my new logic I had to decide which one to use. my stupid ahh didnt realize that there might be a chance I have to pass through both of them though 😭 well guess what there were a lot more gaps in my logic.

All of these combined into the logic I had spent the last few hours working so hard to perfect, falling apart in 5 seconds. Similar to the whole block to SAT thing I worked out most of the issues just by adding, tweaking, and removing a bunch of checks as well as looking back at my old logic to figure out what I forgot. Among these general changes I also added a new grounded member to the block class, and tried to get it to register if it’s on top of a player. Unfortunately it didn’t work. It’s ok I’ll brute force my way to the root of the problem tomorrow. (Btw this doesn’t even cover the issues I faced prior to this😭 ✌️ )

AI used, if any: Now that the core elements of the game (physics) are out of the way, I’ve pretty much been grinding through bugs myself since it’s just existing logic and I’m not really adding much that’s new or unfamiliar. Honestly, I think it’s gonna stay this way because I don’t intend to use AI to design the game, I was using it more to help solve physics issues and the like.

Plans for next time: I’ll try to hopefully fix the new block clipping issues. then idek anymore. Maybe i shouldn’t have tried to build the engine from scratch.

K bye guys

*I’m not actually over 18
**Tuff line?

0
0
7
Open comments for this post

9h 52m 29s logged

Unnamed Platformer - Devlog 11

Rotation is finally working! Mostly. Anyway I have to post now cuz of the 10 hour limit per devlog.

What I did: I fully implemented rolling and rotation physics across all player shapes! Shapes now physically rotate based on movement speed, tip over cliff edges, and smoothly snap back to a flat face when you stop moving. I also added a feature where shapes automatically realign when entering water or zero-G. To make everything smooth and frame-rate independent, I overhauled the settling and snapping math using fmod for shortest-path rotation and wrap-around handling.

Challenges: Getting the angle snapping and tipping logic to work was the biggest hurdle. Non-square shapes were getting locked out of tipping due to floating-point issues, which I fixed with an epsilon tolerance check. There are still a couple of bugs that I’ll tackle later, notably the fact that shapes sometimes spin an extra time upon settling. but the core system is more or less functional now.

AI used, if any: I managed to work out the math myself but I needed to ask AI with help debugging.

Plans for next time: I’ll probably work on some visual effects for the next couple days + fine-tune and debug my physics a bit more.

K bye guys

0
0
26
Open comments for this post

7h 7m 59s logged

Unnamed Platformer - Devlog 10

I’m tired 😭

What I did: I ported the rest of my entities over to SAT collision. Every tile that can be collided with now uses SAT. I refactored some of my functions to handle the new logic properly across the board, and got rid of the old standalone AABB collision code for ground tiles. I also decided to make pushable blocks hybrid for simplicity: aside from general environment collisions which use SAT, I didn’t change much of the old AABB code.

I also added an O(1) center/radius projection for circles to fix random micro-stutters, and updated drawdebug() so it stops drawing every vertex and instead renders one dynamic vector targeting the nearest tile vertex. (Circles in SFML are actually 30-sided polygons, so earlier the collision checks were looking at 15 different axes + all those axes were being drawn in the debug overlay.)

Challenges: Thankfully most of the porting to SAT stuff was easy, I only had a couple of minor setbacks here and there.

However, the harder part was getting the circle center-to-vertex collision logic down. I had to find out how to do it + add completely new logic to my function + add checks in my collision code to determine if the shape was a circle + rewrite my drawdebug() code. It took a while and a lot of my sanity but I got it done in the end

AI used, if any: Used AI to help debug the updated circle collision detection system + its separate debug overlay code.

Plans for next time: I’m going to work on rolling physics for real. I hope it goes well 👍

K bye guys

0
0
7
Open comments for this post

9h 3m 19s logged

Unnamed Platformer - Devlog 9

I was “busy” watching the World Cup bronze/final matches over the weekend. No way we got a 10 goal third place game while everyone started throwing hands at the end of the final😭

What I did: I finally got started on SAT collision like I said I would, and it’s actually working! Mostly. I built all the fundamentals so far: vertex extraction, edge normal calculation, projection ranges, minimum translation vector (MTV) calculation, etc etc. I hooked it into checkCollisions for ground tiles, and the MTV push resolution actually stops shapes from clipping through geometry now, and it’s also sign-corrected and whatnot so it always pushes the right direction. I also made a debug overlay that draws vertices and axis normals directly in the game window, which saved my sanity countless times and looks pretty cool too.

On top of collision math I had to go back and fix 3 out of my 5 characters’ movement code because switching to SAT caused bugs in features that worked just fine under the old AABB system, aside from all the general bugs I had to deal with. The hexagon’s double jump stopped working entirely, circle’s acceleration started randomly resetting mid-sprint, and octagon’s wall jump turned into an absolute mess (more on that below). The main thing was that my old flags for checking wall collisions were set with assumptions that crumble once you switch from checking 4 fixed direction to a bunch of axes.

Challenges: Oh boy… The wall jump bug was hella frustrating: after switching to SAT, the octagon would do exactly one wall jump and then just slide down the second, no matter how many times I hit jump. It took me forever to figure out it was a chain of three separate bugs stacked on top of each other: wall contact flags getting cleared before the function ever read them, my walljumped flag never resetting between wall touches so it permanently locked my horizontal movement, and then once THAT was fixed, SAT was re-zeroing my wall-jump velocity on the same frame it fired because the player was technically still overlapping the wall geometry. So I fixed those and immediately got a NEW bug where wall jumping turned into a pogo stick that spam-bounced me up the wall, because a vertical MTV was getting misread as “landed on the ground,” which reset the wall jump lock and let it refire every single frame.

Also spent quite a bit of time before realizing this one line I had, if (grounded) velocity.y = 0, worked fine with AABB but not so much with SAT’s own grounding logic, since my SAT function sets grounded = true when it sees downward velocity, and that line was zeroing velocity before SAT checked it. Removed it and a lot of my bugs disappeared.

AI used, if any: SAT math I mostly figured out myself, after reading through a ton of Stack Overflow threads, articles, watching a lot of YT videos, etc. on my own time. I did use AI to clarify/debug a couple of parts though. However, I ended up needing it a lot more for debugging the problems that stemmed from it, i.e. the octagon, hexagon and circle issues.

Plans for next time: SAT works for ground tiles but I’ve still got all my other entities on the old AABB system so I gotta port those over. Although, probably the biggest thing is trying to make my code more efficient because sometimes the game randomly slows down/freezes and makes random clips occur. If this isn’t lag (which it might not be, I could just be stupid) I’ll still have to look into whats happening. Then, once ground collision is 100% finished: rolling physics, aka the reason I made this change in the first place. Gonna have to look into the math/physics behind that, but it should be pretty easy since I already got this down. Once this is done, the shapes should be tipping and rolling around instead of just sliding around like ice cubes. We’ll see how that goes.

K bye guys

0
0
7
Open comments for this post

6h 51m 9s logged

Unnamed Platformer - Devlog 8

Bro idk

What I did: I finally wrapped up the character roster by implementing and debugging the last two shapes: the hexagon and the octagon. The biggest milestone was completely overhauling and fixing the wall jump implementation for the octagon (which took me like 1.5 hrs out of which 50 minutes worth of changes were discarded). I ended up shifting all the wall-jump physics directly into the jump event handler, rather than splitting the logic between two different functions (my jump and updatepos functions). This allowed me to make it so I can properly maintain and destroy momentum for wall bounces

On top of physics stuff, I built the level progression system. When you touch the exit tile, the game increases your level index and loads the next stage. It’s finally starting to feel like a real game! Although, not really, since every level after the second is the exact same weird ahh testing level cuz I needed to make sure my system worked.

Challenges: The real nightmare was the octagon’s wall jump. I spent about 50 minutes writing changes because the physics wouldn’t cooperate, only to discard them because I got too confused 🥀I had half of the wall jump math in jump() and the other half in updatepos() and it was making the normal movement code immediately overwrite/neutralize the walljump code the very next frame. Another thing was making it so you couldnt just hold down the w or up key and automatically bounce up forever. I had to add an input debounce check so you have to release+re-tap the key to jump again. Everything else was honestly smooth sailing and any other bugs took maybe <15 mins to solve.

AI used, if any: I didn’t use much AI, since the two big features I added were pretty easy to implement/debug, but I did ask it to help me a bit with wall jump logic since I was pretty fried.

Plans for next time: Now that the physics is working, I’ve decided I want to get rid of it all.

Sliding shapes feel hella unnatural (also the hitboxes are pretty weird), so I’ve decided on making the shapes roll around/have accurate hitboxes using SAT (Separating Axis Theorem) vector math. I asked Gemini how long it would take and it literally told me to avoid it if I can 😭 so we’ll see how many hairs I lose over the course of trying to implement SAT. It’ll probably be all I do from now until around the start of August when I’ll be going on vacation

K bye guys

0
0
2
Open comments for this post

6h 28m 5s logged

Unnamed Platformer - Devlog 7

I typed words into a code editor and made shapes move around :shocked:

What I did: I finally took on the shape-switching system and got it working! I had to completely change how the player class worked, so I made it into a pure virtual class to handle polymorphism (which lets me switch between different shapes) and replaced the old static player setup with a dynamic shape-switching state w/ unique pointers. For shapes so far I implemented the circle with rolling physics and friction, and the triangle which can teleport forward a short distance. Also, keeping source code in header files was causing circular include errors, so I reorganized all the player class code into a brand new players.cpp file. And finally I made it so falling below the screen kills the player, which is a pretty small feature but still.

Pretty much what was happening was that I needed to access my tilesettings.h file in my players.h class for movement-related checks, but tilesettings.h also needed players.h for hitbox/collision stuff. So I had to take out my code from my player header file and move it to player.cpp, which was lowkey a nightmare since I ran into a bunch of compiler and linker errors that took me an hour to fix😭 Anyway, Gemini helped rescue me (since my Claude 5-hour limit somehow ended after the first question I asked it today), so thanks Gemini.

Challenges: Pretty chill today, since today was more designing and testing new features that were easy to implement; however the real nightmare was splitting my files. Moving code to players.cpp broke everything with a bunch of “multiple definition” linker errors. I didn’t define my global variables as inline at first, but since they were getting defined across many files I had mark them as inline. Also, the triangle’s teleport mechanic let you phase into solid tiles at first, so I made a position prediction system using swept AABB bounds. In fact, creating this swept check was the feature that needed me to call tilesettings.h in players.h in the first place, which led to my cortisol spiking when the compiler stopped working for an hour

AI used, if any: Used Gemini to help me figure out why the compiler+linker were throwing errors, and some basic debugging in my other features.

Plans for next time: I’m gonna design my other two shapes now (octagon and hexagon), then start making this into an actual game with multiple levels, progressing to the next level when you reach the finish, etc etc. Also, I feel like the sliding movement is kinda unnatural, but idk if I’m going to change it because I already have a whole system down and starting from scratch would be a chore. Anyway, I’ll think about it.

K bye guys

0
0
7
Open comments for this post

4h 38m 26s logged

Unnamed Platformer - Devlog 6

Guess what? More block physics issues! I’m gonna lose my mind!

What I did: Implemented logic with the buttons and doors; now, being on a button opens a corresponding door. Also fixed EVEN MORE BUGS with block pushing logic. I also resolved block-block vertical clipping and horizontal stacking bugs. I replaced the ground collision function I had made with a manual check for blocks landing on other blocks; groundCollide (that function) was not accounting for if a block landed on top of the player. This fixes vertical clipping through players and blocks and unintentional behavior with horizontally stacked blocks.

Additionally, I added a system to make sure you can’t get crushed by a door too. When I first discovered that could happen, I implemented a half baked system, but it didn’t work since it pretty much made the block/player fall through the door even if the button hadn’t been pressed prior. I replaced the old block-crush prevention logic with a new system. Now the button class has another variable, presscheck, which acts like sticky keys (idk how else to put it) even after you’re not on the button. It checks for if a player or block is within the closed door’s hitbox and if so props the door open until they leave, but it can only register that after you push the button.

Challenges: Buttons not changing color; color change logic was in my constructor and not the draw function so it never updated. Other than that, general implementation was also tricky to plan out because I had to decide how they were gonna work (how buttons would be linked to doors; decided on an ID system) and then how to implement that (using dynamic casts just as my button class uses). And then the block clipping glitch was another nightmare, though it did take me less than an hour which is nice. Also, it took me a while to think of how I would figure out how to make doors not close on players/blocks, but I thought up a solution pretty quickly which is nice 👍

AI used, if any: Used Claude to help me figure out the part that stops the block from falling through the player (I was genuinely™ too exhausted with dealing with bugs to try to solve it myself 😭😭) + used Gemini and a bit of Claude for general debugging.

Plans for next time: I’ll polish up some visual stuff, but I think I’ll leave block-related bugs alone for now. As you can see there are some clipping issues still with the door, but idk if I want to tackle those right now. Either way my main focus for next time (and like all of the next week or two) will be getting the shape-switching system down. I’ll also try to create some map layouts that force the player to utilize block placement on buttons to navigate doors, because it would be a shame for me to have spent all my sanity on a feature only like 5 levels use.

K bye guys
P.S. Last time, when I said I spent all weekend working on button-related stuff, I meant the pushable blocks too (since those can activate the buttons)

0
0
8
Open comments for this post

5h 2m 4s logged

Unnamed Platformer - Devlog 5

I pretty much spent the last weekend working entirely on button-related stuff. Turns out there were a lot of bugs and other physics-related issues I had to address. Anyway I think they’re all good now.

What I did: Day 1: I fixed a bug where nested loops using the same name (pos) caused only the first pushable block to register collisions. I also implemented a side-detection fix so the player doesn’t accidentally push blocks when standing on top of them + added a border/outline to pushable blocks for visual clarity. I also started work on button and door tile classes.

Day 2: I made it so you can push blocks vertically in zero-gravity. A really big fix was a global physics bug. I had been using a gravity called blockgravity for block physics, but since it was a global variable, one block’s position dictated all the other’s physics. E.g. one block in a zero-g tile meant everything else was now unable to fall. I moved blockgravity into the block class and now a block entering a zero-g zone floats without shutting off gravity for every other block on the map. I also decided on two new features: a button that can be stood upon/have a block placed on it, and a door that opens when its button is pushed. I added each one’s sprite and loaded them into my map. Also, I made another big change to my plans: having spend so much time on block physics, I’ve decided they’ll become a core feature of the game and not just a small gimmick of the triangle shape.

Challenges: The hardest problem (by miles) was the block push collision. the issue turned out to be one loop variable shadowing another, which meant only the first block in the list was ever processed. Another tricky bug was zerogactive being reset before the block push loop ran, meaning zero-g vertical pushing never triggered. Ironically I ended up removing the zero-g check because if you’re going to push a block vertically, you’re not going to be on solid ground anyway. Also I accidentally mismatched curly brackets so that made life a lot harder. Also, I faced a bunch of other bugs while trying to polish up collision.

Imma be honest, about an hour or so from this devlog was useless cuz it was me trying to implement a solution, confusing myself, and just discarding all my changes😭💔 Also, I spent like 20 minutes trying to get the button looking good (it’s supposed to be an octagon, but the sides are uneven).

AI used, if any: I used Claude for debugging my physics code, as well as helping me figure out why the upwards/downwards block push wasn’t working.

Plans for next time: I’m going to try and begin implementing the 5 player shapes and their power-ups. I’ll start with the circle probably, since it seems the simplest (just get faster over time). Also, I’m going to make it so that each button actually is linked to a door, since right now they’re just visuals.

K bye guys

0
0
3
Open comments for this post

8h 34m 22s logged

Unnamed Platformer - Devlog 4

I hate AABB with a passion. I spent 8.5 hours over 2 days (hardest lock in yet 🔥) on 2 features and Im pretty sure there are still bugs in each.

What I did: On day 1 I added collision detection for pretty much all my objects, added some custom physics (e.g. water and zero g now have custom physics), and implemented AABB collision. Since I got it working yesterday(mostly), I deleted the initial ground class I had for testing SFML and most features, as well as any related functions like the check ground function in the player class.

On day 2 I spent 4 hours trying to get the block to push. It took me a while cuz I initially tried to just copy the groundcollide() function and tweak whatever I needed to. However that didn’t work, so after hitting up Stack Overflow + Claude I realized I had to change up a LOT of my pre existing code. I added a master entity class for anything that is affected by physics (all players + the block + more features in the future probably) then added more functions and commands in my checkCollisions function in order to get my block mechanic mostly working. I also ended up adding many more features to my block class(velocity, gravity, and a grounded check) since it has to react to physics and the environment. Overall the introduction of an entity class that everything else inherits from was a big help in getting the game to work properly.

Challenges: my game crashed when I attempted to put the check collision function in main.cpp; then, implementing water and zero-g was a lot of trial and error not only to find physics that felt fluid but also because there were a lot of bugs in the logic as well as bugs that stopped the game from running at all. Also, it took me a while to wrap my head around AABB collision; I literally had to draw it out on a piece of paper and ask Claude to grasp the concept 😭

During bug fixes, I ended up breaking a bunch of stuff/realizing a bunch of stuff was still broken and spending a bunch of time fixing it. For example, while trying to fix collision, I ended up discovering a bug in my water/zero-g physics, and then while trying to fix that I broke my spring logic too. And creating the logic for pushing the block is a whole other can of worms. It took me 4 hours of implementing different strategies and adding different functions only to have a half baked block-pushing function. 😭 It does kind of work, but you can only push one block: any other blocks act like normal ground tiles.

AI used, if any: I asked Claude for help on how to tackle block pushing logic, as well as helping me understand AABB collision.

Plans for next time: I’m going to try and hopefully get all the block-pushing logic done without any issues, then fix up any collision-based bugs and work on implementing the rest of my player shapes.

K bye guys

0
0
2
Open comments for this post

4h 21m 52s logged

Unnamed Platformer - Devlog 3

My game is kind of coming together! It’ll still be many weeks, but I did something!

What I did: finished my tile map parser (I decided to use a unique pointer to parse through each tile type and draw the according one, after a bit of thought). I also started working on collision detection. I created a basic checkCollisions function and added getGlobalBounds to every tile class. Before I did that though I had to do some research on Axis-Aligned Bounding Box collision, and how to implement it in SFML. I’m still far from done, but that’s tomorrow’s problem.

Challenges: implementing the map drawing functions (couldn’t figure out how to get the draw functions in the classes to match up with the main class), and after that I was having a lot of trouble with the pointer logic I had implemented (had to use std::move, also there were errors in my file importing structure); then after I got that to work, and implemented the parser into main.cpp, it ended up causing my entire program to crash when I ran build 😭Ended up asking Claude for help for how to fix it; it turned out to be how I had formatted my levels and my level-parsing loop for assigning tile types to tilemap characters. Then lava, water, and zero-g block weren’t drawing properly either. After spending like an hour trying to decode why, I realized sf::Color’s transparency had to be an 8-bit integer rather than a decimal between 0 and 1. Also my doublespike was not drawing properly, so I made it 2 separate convexShape’s rather than 1. Apparently you can’t have mere points holding a single convexShape together, which kind of sucks.

AI used, if any: Like I mentioned, I asked Claude for help on how to fix my level loading feature (it ended up being like 3 minute details) and also used it when debugging my initial collision functions (I ended up replacing <10 lines total by its suggestion).

Plans for next time: I’m going to try to finish collision. That’s my entire goal, since I still don’t know entirely how I’m gonna deal with every collision possible and it might end up taking me a long time depending on the number of mistakes I make/bugs that pop up.

K bye guys

(btw the music in the background is because I was listening to music while I was working on this)

0
0
4
Open comments for this post

3h 59m 23s logged

Unnamed Platformer - Devlog 2

I was a little busy yesterday but we’re back on track now.

What I did: I think I got a solid amount done today and for a bit of time yesterday: I added a camera feature that scrolls with the player, created the tile map and tile types, and designed the first part of the tile map parser; also changed the background slightly and researched more on building tilemap loaders in SFML (YouTube videos + looking at Github repos and articles).

Challenges: For a zero-gravity section I’m thinking of adding, I wanted to put thin gray stripes in those sections. I couldn’t figure out how to do that, so I just decided to depict it as a translucent white block. Also determining the coordinates of the spring pad in the game took a while too. Overall, my other challenges were mostly small bugs and didnt stand out too much.

AI used, if any: Used Claude for debugging the switch case for my tile map parser. Also, not AI, but my camera system was more or less entirely designed using a YouTube video that I’ll credit in my readme later.

Plans for next time: I want to finish my tile map parser and get an actual level loaded. I’m also going to start deciding what the UI will look like for the main menu, level selects, and pause menu.

K bye guys

0
0
8
Open comments for this post

3h 25m 52s logged

Unnamed Platformer - Devlog 1

It’s finally time for me to lock in. This is gonna be a big project to which I hope to add a lot of content, and I’m hoping I can accumulate a lot of good hours from this project.

What I did: I set up SFML (the library I’m using to code this game), set up the required files, watched a lot of YouTube videos to get more familiar with SFML, and coded a basic thing where you control a square and jump around.

Challenges: This is like my second time using SFML (I used it once for a small project a while ago), so I’m not that familiar with it. No worries though, as it’s nothing a bunch of YouTube videos can’t fix. Also, today was kind of a refresher for my barely existent SFML skills.

AI used, if any: I used Claude for learning how to set up SFML and asking it for help on how to fix my jump button not working.
(I was missing two characters. :\)

Plans for next time: I’ll try to add actual platforms, maybe working obstacles as well. I’ll focus on adding a menu some other time, and actual styling will come much later so the game is gonna look ahh for now.

All my devlogs will pretty much follow the format of this one(accomplishments, challenges, plans, additional notes) so that I can lazily copy-paste the same template when I don’t feel like writing a whole new devlog each devlog will feel connected/cohesive and make it easier for readers to follow along on my journey.

0
0
3

Delete project?

Are you sure you want to permanently delete this project? This action cannot be undone.

All devlogs, followers, and associated data will be removed.

Followers

Loading…