Crawl Blog #1

Jul 7, 2024


Iā€™m working on a game. Iā€™ve worked on a lot of things that could have turned into games, but Iā€™ve finished virtually zero of them. I participated in a game jam in November of last year and finished a game in 3 (more like 2) days. I wasnā€™t really proud of how the game turned out. I appreciated that it functioned and that there was a semblance of a goal. But, the gameplay loop wasnā€™t properly conceived and wasnā€™t playtested enough. At the very least, you could strategize even the tiniest amount and you could lose, thatā€™s good enough I guess.

Now, I want to finish something else, but something a bit more advanced that can have more time dedicated to it than 2 days. Before I talk about what or why the game is, Iā€™ll just briefly talk about the engine Iā€™m using. As you may know from the landing page or the Projects page, Iā€™ve worked a bit on MIR. I started in April of 2023 but my tasks have really died down since the tail end of last year. However, it was a great experience, lots of fun, and a personal challenge. Iā€™m extremely grateful that I was given the contract to begin with so I canā€™t complain. I wish it turned out to be more of a foot in the door into dev work, but unfortunately that hasnā€™t been the case.

Walgelijk


The person who gave me the contract is ā€œzooiā€. The game also happens to be made using his custom C# engine built on top of OpenTK. I love C#, Iā€™ve used and enjoyed OpenTK, and I like custom engines, especially when they are written in C#. I have some experience in using/writing (mostly using) multiple custom C# engines so I had zero hesitation getting right into the work. The engine is called Walgelijk, which is Dutch for ā€œDisgustingā€. In my opinion it is anything but disgusting, itā€™s quite nice actually! It only took me about a couple hours to get acquainted with the overall structure and workflow. The engine is based upon the ECS paradigm, or as zooi has described Walgelijkā€™s version of it to me as: ECSU ā€œEntities Components Systems Utilitiesā€. The opinionated paradigm is basically ā€œpureā€ ECS with stateless systems but you arenā€™t even forced into using it. You could just have 1 system that instantiates a bunch of normal OOP classes and go from there, no need for ECS. A big pro to having pure ECS + stateless systems wherever you can is that it makes serialization for things like game saves much easier since you just serialize each component as data since itā€™s just that, data.

I like ECS mostly for the obvious highly-granular level of composition you have due to using components. Iā€™m not really concerned with the potential performance benefit it may or may not bring nor am I really strong on these opinions. I donā€™t really argue about this stuff, use whatever gets the job done and doesnā€™t get in your way. Anyway, the engine is cool and sits in a nice place between ā€œtoo large fully featured engineā€ and ā€œtoo barebones frameworkā€, exactly what I want.

Another key factor for me is a good UI system. Iā€™m spoiled by s&boxā€™s implementation of Razor for UI, but I donā€™t mind some immediate mode GUI either. Walgelijk uses a custom IMGUI called ā€œOnionā€. Itā€™s like Dear IMGUI but less complicated. Walgelijk seems to check all the boxes for me but there was an issue. Walgelijk uses SixLaborā€™s ImageSharp library. The engine would almost be entirely free for commercial use if not for this library. So, I replaced it with Skia which is MIT licensed. This wasnā€™t nearly as difficult as I thought it would be. Luckily image library APIs are pretty similar to each other. Now that I have this fork, Iā€™ve tweaked it and made it sort of my own offshoot of Walgelijk. Iā€™m sure zooi isnā€™t super comfortable with having someone else rely on his upstream changes now. Even if itā€™s just me, it might be a little bit more stressful having other people rely on you not breaking the thing.

The Game


Iā€™ve tried to make a roguelike about a dozen times. I donā€™t really know whyā€¦ they seem fun to make I guess? And by roguelike I do mostly mean ā€œtraditionalā€ in the sense of having a little ā€™@ā€™ character run around in tile-sized steps on a tile map bumping into ā€˜Sā€™ and ā€˜gā€™ characters. I think Risk of Rain 2 deeply cemented my enjoyment of roguelike mechanics, especially random items. Items are fun! I think I mostly enjoy the concept of having my own little emergent sandbox using item effects. Many times have I gotten a tilemap working with the ā€™@ā€™ character running around on it. But, when it came time to implement room generation, enemy pathfinding, field-of-view, I would quickly give up or lose interest. This time has been different. It has, if terrible, room generation, it has pathfinding, and it has tile-based FOV. At first I wanted to write my own AStar implementation for pathfinding, but I found the algorithm pretty difficult to understand and my version performed poorly. I found a good library that performs amazingly, so I solved the problem but I wish I couldā€™ve figured out the algorithm myself. The same thing happened with FOV. Iā€™ve implemented a form of FOV where you create a mesh based on raycasts from the viewer, but never a tile-based version. I mostly just grabbed the code from a popular example of recursive shadowcasting. As for dungeon generation, I wanted to try and do a BSP algorithm. I spent an embarrassingly high amount of days on this but could never get the math right. Room generation is just a basic brute force ā€œrandom-until-it-doesnā€™t-intersect-with-other-roomsā€ algorithm that I have done before, but this time I still just used GPT for help with it.

Hereā€™s what the game looks like at the moment: image

As you can see, the game uses almost only emoji as assets. I got this idea from ryleigh, a senior game designer at Facepunch. He had this project in s&box called ā€œRoguemojiā€. As you might have guessed, itā€™s a roguelike made with emojis. It was actually rendered almost entirely with s&boxā€™s Razor UI system. I really liked the aesthetic the game had, especially with those nicely outlined Windows 10 emoji.

Hereā€™s a screenshot of an early build of roguemoji from a video ubre kindly sent me: image

Another screenshot from when I tried to port the game to the then freshly new scene system: image

You can surely see the resemblance. The next visual effect I need to steal are the drop shadows. Theyā€™ll be a bit more difficult considering all he had to do was apply the css drop shadow onto the emoji text. I wish it were that easy for me! They definitely make it look way more pleasant.

But, what do you actually do in it?


So the project came to a point, which I have never previously reached, where I needed to actually think about the game and not just implementing the barebones engine stuff. At this point, Iā€™m not sure what it is and Iā€™m definitely sure it wonā€™t be fun. I may have also realized that making a traditional roguelike may not be as fun as I had expected. I only thought as far ahead as having a dungeon, fighting monsters, and progressing through to another floor. To be fair to myself, I just wanted to finish something regardless of what it is. But, I really want to make something thatā€™s actually fun. This is extremely difficult. I strongly believe that game design is much harder than game programming, and game programming itself is pretty hard. Iā€™ve sorta pivoted into a ā€œcollect things on the floor and try to dodge enemies but maybe you can buy items with the money you get from selling the items you picked up when you leave the floor to buy effects which make you stronger and give you abilitiesā€ kind of thing. Iā€™m really unsure, itā€™s all super hazy and formless right now.

What comes next


Iā€™ve spent a week as a break from working on the game to work on this site youā€™re looking at now. Itā€™s a bit ironic that today when I opened up the project for the game I lost a bit of motivation. Thereā€™s those strange bugs I mentioned in the previous blog post, the codebase is pretty expansive for what very small amount of actual game there is, and the whole ā€œI donā€™t know what to make the game intoā€ thing. It would be a crime that I took a break to make this site with the purpose of writing blogs about the game, only to give up on it after just starting the blogsā€¦

I donā€™t think Iā€™ll be giving up on it, I donā€™t have the sort of despair that usually precedes giving up on something like this, so thatā€™s good. I think itā€™s just been kind of compounding from: not writing my own AStar like I wanted to, copying the FOV algo, not being able to write the dungeon generation algorithm I wanted, plus the things mentioned above coming together to bring me down a bit. I still want this to be a finished thing, but I canā€™t stand it not being fun in some way, which makes this process a lot longer and more difficult.

Youā€™ll just have to wait until next week to see what happens.

Hereā€™s an extremely relevant gif in the meantime: image