So it turns out that I can't have multiple levels without major reconstruction of the code. C# spoiled me with it's lack of import/include statements and Python was dynamically typed which meant I didn't have to declare the object type right away, so now I have to deal with avoiding recursive includes.
Ugh!
gamedev
Got a camera to work. It's manual but if I plan to actually finish this game, I would probably have it scroll based on the player's position and movement. You can also see that there are tiles outside of the camera bounds. Those were left in by mistake.
SFML has a built in camera called sf::View. It's pretty weird. I'm used to having a 2D camera origin being at the top-left corner just like sprites, but the origin is actually in the center which is something I need to get used to.
I mean, it's kind of justified because it also has support for rotation and zooming (things I have never used). I'm just used to implementing my own camera system and just drawing sprites based off of their positions and the camera offsets, but that not an option here because sprites are automatically drawn based on their position (no manually drawing here).
gamedev
gamedev
gamedev
@ne Changed that just now. Thanks for the tip. This kind of stuff was much easier in MonoGame because C# had built in getters and setters. C++ on the other hand, makes it a bit more cumbersome.
gamedev
@ne I also shaved off some pixels from the hitbox horizontally. I've noticed that Link's Awakening has smaller hitboxes than the sprites. It makes it much easier to fit the characters in 1 tile long corridors.
re: gamedev
gamedev
Created collision detection with solid tiles.
#gamedev #sfml