As you might know from following me elsewhere online, I have been designing a new adventure game with some light puzzle and resource management mechanics. The working title for the project is “Fungi Garden”, and you can learn more about it on my website here: https://mindcauldron.com/fungi-garden The game is inspired by the fascinating interactions that occur in nature between mycelium, mycorrhiza and tree root systems.
Currently, I have many ideas for the game. They are unfinished, incomplete ideas. It’s kind of like looking at something, but you can’t focus on it - it’s there, but it’s blurry, undefined.
In his book “Spelunky” about the development of that very game, Derek Yu described something that I feel resonates with my current situation:
“The creative mind is like a big pile of jigsaw puzzle pieces. Some pieces were made by other people - inspirational words of advice, an intriguing screenshot from a game you’ve never heard of, a haunting melody - and some are gained through life experiences. Some pieces are already connected, either because they came that way or because while you were walking down the street or taking a shower they somehow found each other. Sometimes a single piece is missing, and once that piece is uncovered, two other pieces from different ends of the pile are finally connected.”
Derek Yu, Spelunky
I recommend the book. You can pick it up from Boss Fight books here: https://bossfightbooks.com/products/spelunky-by-derek-yu
During 2019, I accumulated a lot of these puzzle pieces. Here are a few events that provided them:
- I worked as a freelance sysadmin managing a network of animator workstations for a wonderful animation studio in the West of Ireland. The people I worked with were positive, creative and professional. It was a trial by fire for my Linux knowledge, and I did quite well from start to finish, even training in additional staff.
- I worked as a freelance web developer and further developed my web platform.
- Whenever I could, I worked on gamedev. I made game prototypes using PICO-8, continued working as an event organiser for the local gamedev scene with monthly meetups, a Global Game Jam, and with three Galway Game Jams.
- I also attended GamesCom for the first time in my life, and helped a friend to demo their adventure game at Adventure Treff Party during a meltingly hot day - melting point for Irish folks like us is around 26 degrees Celcius. I think it was about 32 degrees C that day. We probably drank 4-6 litres of water over a few hours and somehow managed to avoid melting.
- I started to make a small bit of music again. The desire was there, but I didn’t give it much time!
- I also started a little personal project to create my own scripting language inspired by the Irish language. It’s called Cód (pronounced “code”), and I used Lua to build the interpreter since I was familiar with Lua from PICO-8 and fancied learning more Lua. I put the project on hiatus soon after started. This project has become a puzzle piece I am now returning to more recently, at least in spirit. I guess that’s why I mentioned it specifically.
That year gave me a lot of these creative puzzle pieces that Yu talks about.
Now I am doing the difficult part of sitting down and sifting over all these pieces to see what fits. For this new game, I want to make something more significant than I have before, something complete. I recognise that I need other people to help make this game and have put together a winning team, (although an unconventional composition), to make this. Two artists and a Programmer! These artists have worked together on many projects, and each person has an excellent ability to finish projects.
While this is our first decent size game project, we are passionate about the topic and passionate about games - even if we are not experts we hope that our enthusiasm and will to learn will be enough to overcome the challenges ahead. It has worked for my friends in the industry, so why not us? We have to try.
Tackling a more substantial project than before, I have my doubts about my ability code it all. So I turn to some trusted reading materials and get stuck into research. I need to train.
One of those books is Game Programming Patterns by Bob Nystrom, and it’s fantastic. I’d already implemented some of these patterns by re-inventing them myself before I knew what they were when I was doing experiments on PICO-8. At the time, I was relieved to discover I was at least following the right path with a bunch of decoupling patterns. Validation like this is few and far between for the autodidact! So what was I missing? The book reveals a lot more to me each time I come back to read it.
The book has some interesting patterns, but one caught my attention - the bytecode interpreter. With the context of Fungi Garden swimming around my head, this pattern suddenly lit up a great big lightbulb of an idea. I had to sketch it out and think about it more carefully.
The idea was there, but I was not satisfied with my understanding of the example code. Before I could happily share the concept with the team, I had to be sure I could even make it. If I’m going to be learning more about data structures, bytes and types, I’m going a bit out of my range of knowledge (pun intended :P). So I decided to start learning C++ to see if I could get a better understanding of the example code in the book and a clearer view of my limitations. Then I could more confidently share the idea with the team at our next meeting.
So one night I set about learning C++, using tutorial resources from http://learncpp.com and courses from https://edx.org to help get me started. It was a good idea to start with multiple sources since they conflicted and approached teaching differently. I could test them and pick my favourite, and compare their explanations to get a more robust understanding.
C++ is an old language, and it has an “always trust in the developer” philosophy, which allows you to do unsafe things. The people who teach C++ and the developers who use it are very opinionated about the “correct” way to do something, and there are a few official standards. I started going through language programming tutorials. Bob Nystrom’s recently published the online version of his book “Crafting Interpreters”. So I got stuck into making the bytecode interpreter and virtual machine in that book. Wow, that guy knows his stuff (the bytecode examples directly contradict the advice from learncpp.com, but I trust him!).
After a while, I understood the gist of the code and was slowly building up the program. I think typing out the code - instead of copy-paste - helps builds up crucial muscle memory, especially if you don’t comprehend it at first. Luckily a lot of programming languages share a similar syntax with C, and C++ is apparently C with hacks. Unsurprisingly it was not too complicated there. Understanding the low-level workings is a bit tougher for me since I doubt my self-learned understanding.
During a 1GAM Galway meeting a couple of days later, I went through the code I was writing (Nystrom’s code that I was copying) and discussing why I was learning this stuff. A mix of interest, curiosity and a painful dose of impostor syndrome. I rambled out of nervousness and vulnerability. Talking about your weak points in front of your peers can be terrifying. I can remember my hands sweating. They never do that. Oh god.
Luckily, the folks in the meetup offered up some supportive feedback and gave me some great advice. The advice came from an experienced senior dev who I trust. She could probably make a computer with 3d graphics from first principles starting with only her bare hands and some unusual rocks. Her advice was to scope down and make a more straightforward program first - a token-based procedure dispatcher.
She described a program that reads a source file, identifies tokens, and runs them through a switch statement that calls procedures written right there in C++. That doesn’t sound too bad at all. No need to go all bytecode interpreting and virtual machining just yet - even if it seems like I understand those concepts! After the simple procedure dispatcher, I can add more features to it if I want. The main thing is to get familiar with the language, and finishing something small would help soothe my impostor syndrome a bit.
In any case, this bytecode or interpreter pattern seems like it would help solve the various mycelium inspired game mechanics that I was designing. And it could solve them in an elegant way that would also allow for easy modification by a designer (or modder). A piece of the puzzle seems to be in my hand - what a fantastic feeling.
Time to step back from this puzzle piece a bit and reassess what it is we are making.
We want to make a wholesome feeling game, with a world that feels alive. We want the player to experience being an essential lifeform that connects the life of the forest, interacting with it, healing it, becoming the backbone of a vibrant and complex ecosystem. We want a sense of discovery. We also want to have some darkness, some threat in the game that can be overcome by the player through their growing mycelium network.
While the details and exact mechanics are somewhat incomplete, we are churning this around in our heads and talking about it regularly on our Discord server with weekly meetings. The concept has already taken many steps from our initial ideas and prototyping. Now it is beginning to coalesce into a game design document, which we hope to use to secure development funding.
Given my significant drop in energy and mood over the last three months, during the pandemic and madness going on around the world, I find it very challenging to get focussed and productive. Having kept up the monthly meetups with our local gamedev community using Discord and Zoom, I am not alone. Creative people all over the world are struggling to get their work done. Since we are not 100%, the more elbow room we have, the better.
During this month is the deadline for the application to development funding. It also happens to be a significant milestone for my contract work, and because of that, I will be SUPER busy. I think I will just have to grin and bear it. I hope I can find the energy somewhere!
When I get that client project done, I can survive for another few weeks. If our team wins the funding, it would be a dream-come-true. I wouldn’t have to worry too much about getting new web design clients for a while since we could pay our wages for a couple of months and focus on developing the prototype from our latest game design document.
Now is the time to take care one oneself, get proper sleep, keep hydrated, chat with friends and walk about in nature if possible. I’m so grateful for the place I live, the people I live for being chill and awesome. I’m so grateful that my partner is caring, understanding and supportive of my weird gamedev obsessions.
For the next month, it’s time for me to knuckle-down and pray to Chaos for a good outcome in all things.
This blog post was originally posted on my Mind Cauldron Patreon page here: https://www.patreon.com/posts/37869094