My First Game Jam
Recently I participated in my first game jam. I took part in the Autumn Lisp Game Jam 2022. My main motiviation in participating was to excercise my soon-to-be-released scheme library for bioinformatics called (harebrained scheme). I took inspiration from e.g. Chris Lemmer-Webber which created the game Terminal Phase to showcase the features of spritely goblins.
The results are now in and my contribution Metabolize! came in last. However, I had a lot of fun participating and want to summarise my experience. First off, I really liked that the jam took place over ten days. Other game jams are 72 hours or shorter. I cannot block 72 hours to focus on a single thing. I can however plan the next ten days in a way to make room for developing a game. Since I wanted to use as many functions as possible from my bioinformatics library, the game theme should be anchored in biology. I had a few ideas but settled on mining amino acids from a DNA terrain to buy enzymes that will catalyze substrates. My original idea was to replicate the complete Citric acid cycle and making the player try to buy all enzymes with the goal to generate ATP. Due to time constraints I quickly pared this down. In its final version the goal is to mine all amino acids required to buy a single enzyme, a pyruvate kinase.
Initially I had planned to use Racket and the terminal art library raart. However, after just a few lines of code I came across weird behaviour: functions that should return a list, threw errors when using list operators. (harebrained scheme) is coded in R6RS compliant scheme. And while Racket supports such libraries through #lang r6rs, there are some caveats. In particular, lists from R6RS code are represented as mutable pairs instead of standard racket lists. This was my first take-away from the jam: while I thought my library is compatible with Racket, Guile and Chez Scheme, Racket compatibility will need some more investigation. For the game jam I then moved to Guile and the chickadee game library.
First I created a procedure to get all open-reading frames from a randomly generated DNA sequence. There I found that I had no procedure to get all start or stop codons of a particular codon-table. So the game jam has already contributed to improving (harebrained scheme). After this I spend some time animating the translation of open-reading frames into proteins. Coupled with enabling the player to change DNA bases at any position (that I have now decided not to include in the library), this would form the core of the game dynamics. After the first or second day, I became focused on creating a fun game and less on exercising the API from (harebrained scheme). So in the end I used much fewer procedures from (harebrained scheme) as I could have.
I will cut to the end: prior to the final weekend of the jam, I had some form of a game. But it is very challenging to play. Changing bases in overlapping open-reading frames is difficult to anticipate. So in the end the winning strategy is to focus on a single open-reading frame (actually the best way I found was to have a single codon included in the translation and change that in turn to generate all the amino acids required to buy a pyruvate kinase). I had travel plans for the last weekend so could only spend little time. In particular I was not able to get any feedback from friends and family prior to submission. On the last day of the jam I had to package the game up. This proved quite difficult. I had not given this much thought, because at the very beginning I was hoping to use Racket which is available on Windows, Linux and Mac OS and can also generate self-contained executables. Chickadee has a ‘bundle’ command however, that was challenging to use as I used GNU guix to install the libraries and it would not find the shared objects in the right places. So I had to simply upload the code as a tarball and ask the players to install guile and chickadee. As expected, many were not able to run, trial and rate the game.
After submissions closed, we had 3 days to try all the 14 submissions. That was also a very fun part of the experience. I noticed that the games that were easiest to run were the ones using LÖVE2D through the Fennel language. A few games written in Common Lisp I could not get running, even though they were distributed as binaries. With no experience in Common Lisp I was unable to debug. This is another key takeaway for me: software packaging and distribution in the Lisp World is not easy and really needs to be improved.
So in the end, I ranked 14 out of 14 submissions. The criteria were entertainment, presentation and creativity. I had hoped to score high on the last one at least. I suspect one reason of ranking last was that not everyone could get the game to run. Then I think the game was difficult to understand and play and also not particularly fun.
For future game jams, I want to read-up on packaging (perhaps using ‘guix pack’ to generate containers). Also I should have focused more on using as many functions from (harebrained scheme) as possible. I did enjoy the experience and have some more biology inspired game ideas for future jams. I hope to release (harebrained scheme) by the end of this year (will be announced here). For completeness and posterity I post below my devlog from the itch.io platform in reverse chronology:
Last day! I was unable to properly bundle the game with ‘chickadee bundle’ due to the fact that some dependencies were install with guix and some via the host linux distributions and that somehow created incompatibilites. So I am distributing the game as source code with all assets. It also includes a copy of the required files from (harebrained scheme) which I have not release for public consumption yet.
I hope this will still allow enough people to try the game. Also could not get anybody to play test because I had only little time available this last weekend.
The game is very difficult. It is difficult to understand if you are not a biologist (in particular with regarads to open reading frames) and difficult to play. I have found 1 winning strategy that guerantess success. The game dynamics did not play out as expected. Hope people rise to the challenge.
Looking forward playing all submissions!
OK, the UI is more or less frozen. We have a game over screen. Now I can focus on the game dynamics. I set a new goal: metabolize a fixed amount of pyruvate before your ATP runs out. Need to see what are challenging start values for each.
There still seem to be some bugs in translation of proteins. Also I still think the game is too hard for people with no background in biology. Will try to get some people to test play over the weekend.
package so that others can test
I re-wrote the draw routines for the DNA. Now all 3 open-reading frames are shown and also the amino acids align nicely centered inside the ORF marks. Found a way to sample key-presses less oftern which makes navigation easier. Fixed a few bugs as well. Next up is to really tackle the user interface/game screen which I have been putting off. I needs help screens or a permanent way to see the codons associated with each amino acide. Also need to show which enzymes have been bought and what they do. Last work on gameplay. Then package game.
Latest version is attached.
We have enzymes
Many elements implemented: player can now change to DNA sequences to optimize amino acid yield. Amino acid resources are shown on screen and translation now cycles. I tried moving to a monospace font but not sure I succeeded, still issues with properly aligning elements on screen. Also implemented the ability to buy enzymes that will then metabolize their substrate.
My main concern currently is whether the game mechanic really makes sense and leads to a fun game. Will need to get a version ready for my friends and family to test play.
urgently fix slecting position on DNA issue with sampling rate of key-press events.
Some graphics and movement
Second day of the game jam. I managed to animat the protein translation process. However, I still have to figure out how to ensure proteins get translated again after the first time. I should move to a fixed size font for the display of nucleic acids.
Also the game now reacts to keypresses and we can move around the box to select which base to mutate. Implementation of mutation is still left over from task list. New tasks:
move to monospaced font for DNA
restart protein translation after stop code
implement tranversion and transition
print resources (amino acids). Generally map out where to display all the information.
First day of working on my first game for the Lips game jam. My goal with this game is to exercise the procedures from my yet unpublished (harebrained scheme) library for computational biology.
My idea is that you play a cell, that has DNA. This DNA translates into proteins/amino acid sequences. These can then be used to purchase/create enzymes that metabolize substrate and generate energy (as ATP). Each translated codon will substract ATP and each enzyme will then generate ATP. This needs to be in balance for the cell to survive. You can change the DNA sequence to optimze your amino acide yields.
I hope that this concept can also be understood by people with little knowledge of biochemistry.
Today I created the framework to mine amino acids from a DNA terrain in a step-wise fashion. This should be the core and most difficult part.
put this process into a game loop
substract ATP for each step in the translation
implement transition and transversion operations to alter the DNA strand
mockup user interface