Deltarune Connected X
- 3 Devlogs
- 16 Total hours
A port of Deltarune Connected, originally made on Roblox, to computers. Inspired by the evils of Roblox moderation and the urge to use C for something. I will hopefully port it to web, too.
A port of Deltarune Connected, originally made on Roblox, to computers. Inspired by the evils of Roblox moderation and the urge to use C for something. I will hopefully port it to web, too.
Today, I actually got a lot working, even though it didn’t feel like much to me. I added the ability to move and change the size of hitboxes and image boxes; I added a image-file-path storage system and functions to deal with it; biggest of all, I finished the file-exporting function!!! Now, you can grab an image box’s edge and change its size and shape. The part of its edge you grab matters; if you grab the middle of an edge, you’ll only change its size along that axis because you’ve only got the edge in hand; if you grab a corner, you’ll change its size along both axes. I finished the file-exporting function!!! It’s very big; 67 lines long, in fact. Don’t say it.
In order to make the levels look… like anything, one needs to be able to place images. So I got to work on the ImageBox stuff in the code. I did a lot of coding for the images without actually testing it, most of which worked first-try! But the part that DIDN’T work first-try was the images’ actual appearance. When I tried placing some, their positons were totally off-kilter and I had to figure out why. As it is so frequently with my code, it was a silly error that honestly makes very little sense as an attempt at all. Apparently, I had made the source rectangle of the texture the same as the DESTINATION RECTANGLE. My error did cause a very interesting tiling effect, which I might want to remember for future use. Then, I fixed it, lol. After thet, it was all working smoothly. I found myself doing a lot of array manipulation, like deleting a chunk of an array or adding something only if it’s unique. To make this easier, I made two functions to do it all for me each time. The first one I made was for deleting a part of an array. It takes in a starting index and a number of elements to delete. I had to look up how to use arbitrary array parameters, which was actually easier than I thought; I just needed to understand it all better. Another important thing one needs to make the levels is to be able to export them as readable files. That’s important because the game needs to store and load them a lot. I got to making a function that creates a file encoding the level and exports it, but it is not finished yet. I’m going to continue it next time, of course.
I’m using CMake for this project so that the project is widely compilable, which is obviously important if it is to be playable by everyone who wants to. Installing CMake and its dependencies was the hardest part simply because it was boring.
I’m new to CMake, but the rest was easy to do using an online tutorial from CMake themselves. I got CMake running with Raylib.
I coded the player movement for about 3 microseconds before realizing I need scenes for players to walk around in!!! This obviously meant that I need to make a level builder first. That’s what I’ve done today, just setting up the very basics of a level editor.
The first feature I made was placing rectangular hitboxes. The placing and drawing of them was easy; what was hard was making them work with camera movement. For some reason, I couldn’t figure it out for a good while, but it suddenly clicked after a while and I made it work perfectly.