I don’t ever want to get ahead of myself here, posting half-baked successes as if they were all star performances. Yet, back nearly two months ago now when I sat down at the computer and worked myself up from a “Hello World!” introduction to Rust Language programming to a rudimentary game loop, it was a long road ahead of me to a day like today.
What’s special about today?
Well, besides the fact that it is the day of St. Valentine and I am yet again sitting in a cafe writing about code, there is the simple success that as of a few more minor tweaks this morning I am about to hit an interesting sort of milestone.
When I wrote that rudimentary code two months ago the thing that I wrote in a game loop was quite simple: a time-based cycle, looping through and counting off seconds passed, and at specific increments of time applying changes to data in a table. That is an abstraction, tho. What I was actually trying to model and represent in code was the aging of a bundle of carrots.
Yes, carrots.
You can put two and two together I assume. I’m building a game about a Science Fictional Supermarket and as such my game would obviously have something resembling a bundle of carrots and given that time passes in even most science fictional universes, said carrots must age.
Thus is the foundational premise of my game after all. You sell things in a store and the those things sell based on their quality and their quality is affected by what’s going on in the universe. So, things like aging are one of those obvious things.
Could I model an aging carrot? A carrot, getting stale and decreasing in quality and value is little more than a set of numbers representing those things, but the short answer was yes. Yes, I could. My little proof of concept code counted off the seconds and minutes and even an hour when I let it run, and after increments of time changes applied to those numbers representing my carrots changed to other numbers. Math. Imagination. Code.
Then I dug in.
If you’ve read any of these writings you already know that I’ve been plugging away and building rooms and doors and game clocks and npcs and art and sound checks and code efficiency debugging tools and piecing it all together.
I’ve built a store and a warehouse on my screen, I’ve given controls to the little character to run around that space as time passes around him. I’ve given him virtual money and a place to spend it. I’ve enabled him to pick things up and carry them around, and then to set them down again somewhere else. I’ve put little virtual customers in the store walking around and getting in the way. I’ve layered a story over top of that with discoverable beats and unlockable help tips and a world stuffed with books that detail interesting backstories. And then this week I added a sales loop that checks when the store is open and takes stuff that exists on the shelves and slowly sells it turning it all into profit.
And then today arrived.
I have one open ticket left in this milestone phase of my project tracking tool wherein I manage my efforts to make this silly game. I’ve worded it a bit different than this, but basically the ticket is: make the carrots age.
Yeah, yeah. My proof of concept two months ago started with that first. But then I went back and built it all right building up to this point and…
I need to make my carrots get old. And everything else, too, obviously. Age, go stale, decay, rot, et cetera. That is the one last underlying pretext of the game to complete the great big circle of my alpha-minimum-viable product game loop.
After today I don’t just have a part game. I have a game.
I mean, it may not be very good and it needs a lot of content and polish and tuning and tweaking, but the core of it will be there.
Everything that follows will be enhancing that loop. Everything that follows will be making the loop more challenging and interesting as a game, adding obstacles to slow progress or challenges to keep it interesting or story to give it context or art, art, art so much art to give it depth. Yes, there will be bugs. Yes, there will be inefficiencies that need to be tweaked. Yes, it will grow and shift and improve, but at the very core of my code there will be a game by the end of the day.
That’s what’s special about today.