7DRL Day 6: Technically, A Game


I began the day in the traditional manner of people up against a deadline: accidentally oversleeping. It seems life was totally on board with this idea, as it immediately generated a host of automotive-related troubles that kept me well-occupied from 9 am to noon. Then from noon until 12:30 pm, I was smothered by the desperate affection of the household pets. Finally, I got to work.

I worked my butt off trying to teach all the chunks of the city blocks in Leerie to recognize each other so the roads would lay their sidewalks and streetlamps in the right place.  I ran the code I had spent the last 3 hours toiling over, and it looked like this:


Damn. I needed this to work the first time. The sidewalks and lamps are going all over the place, I don't have the necessary debug architecture to figure out why, nor the time to add them.

It was now 3:35 pm on the first to the last day of the event, and I decided it was time to close the lid on this fancy notion of streets that rearrange themselves spookily. As cool as it would be to define the shape of a city as you play, I'm not good enough to make it a reality within a 7-day event.

Instead, we're going to make it a lot easier by simply having one long, horizontal road and buildings that spawn on either side. That went off without a hitch. However, losing my favorite feature also cost me much enthusiasm for this project.

I ended up watching a lot of You Suck At Cooking videos. That's right me, wallow in self-pity, "♪ You suck at coding, yes you totally suck! ♫" Alright, enough of that. Let's get back to wangjangling the code. Just a few more pomodoros, and I can at least say I did 8 for the day!

I revisited my minimum viable product list and reviewed what I had left to do:


First up, "Lamp lighting action lights lamps." What does a Leerie do? They light lamps. Now that the street lamps were going in the right place on the map, I needed to make them lightable.

I finished that inside of half an hour.  It seems past me had left present me a lovely architecture to add roguelike actions that went off without a hitch. "Lamplight action lights lamps," done!

It was even easier to add a "win state upon lighting enough lamps." It was just a matter of finding the right places in the code to look. Here's where we can count the lamps. Here's where we can check if we have enough of them lit. Bam. Maybe 5 minutes work. Now, I need to make a Unity scene the player gets shunted over upon attaining win state.

"Lose state on running out of lamp oil" took a little more work. I had to add a bit of lamp oil mechanics to the player. Since it's not always necessary to burn lamp oil, we'll make it so the player can turn the Leerie's lamp off. There's not yet a UI readout of how much lamp oil they have. Speaking of UI, the way I added a lantern-toggling mechanic muddled the player input mechanism. Leerie had abruptly become a real-time game, so I had to figure out why that was happening and fix it.

The "Lamps reveal new terrain in illuminated area" goal was already done. Vastly-in-the-past-me had imported Adam Milazo's FOV code. Much-more-recently-present me had added a C# interface to Leerie for light sources. Getting street lamps to operate on that interface was child's play. As for handling illumination, Leerie already does that. Although, I would like to add a tile underlay that reflects overall brightness.

That's as far as I got today.


Alright, so I now have a winning state, a losing state, and the player has some agency in deciding if they'll get to either. Technically, Leerie is now a game (at least by many conventional definitions). But it's not a very interesting game, and the user interface is virtually nonexistent. (The roguelike map is technically a user interface and no slouch when it comes to the work involved, but it's not exactly being presented to the player in relatable terms right now.)

Tomorrow, the last day I have to work on this game, I will need to flavor it up and make it fun and approachable. When making a 7DRL, it's ideal to have reached this point far sooner, but I'll see what I can do.

Get Leerie

Leave a comment

Log in with itch.io to leave a comment.