This last weekend, I participated in Micro Jam #043 in which participants had 48 hours to make a video game. The theme for this particular session, open to interpretation, was Colors. The prerequisite was that the player must not stop moving. I wrote my entry in MiniScript for Mini Micro.
Having done two previous game jams last year, I figured this could be another case of stress and deadlines where I might spend more time on the engine than the actual game. In order to mitigate that, I decided to work on my MiniScript library bclib ahead of time. When that was done, I used it to implement Pong as a test, which was simple enough that I could make a basic implementation in an afternoon.
Despite some wonky physics in my Pong clone, I decided my library and I were both ready to venture into Micro Jam #043.
Color Smash Tank
I settled on making a game inspired by an old, arcade classic -- Smash TV. My game is a top-down shooter, where you play as a runaway tank that can turn left or right. Different colored shapes would come out and attack the tank. The player would need to load the correct ammo (associated by color) to eliminate the enemies. I named it Color Smash Tank.
Reflections
I went into coding battle with an arsenal of classes that proved entirely useful to me. The main four I'll address are:
- Enum
- Timer
- TextLabel
- Machine
Enum
I wrote about this one previously.
While using this class did help me easily keep track of enumerations, I learned that I needed to be careful about similarly named types. eState.GAMEOVER
could be confused for eEvent.GAMEOVER
, despite being entirely different enum types altogether. Thankfully, I caught this bug fairly early when nothing happened instead of something.
Timer
If you are developing for Mini Micro, you should probably have a Timer class in your arsenal. I had been writing timer code manually in MiniScript previously. This library gave me the freedom to spin up a timer whenever it made sense.
One interesting thing that I learned is that, in MiniScript, inner functions are very powerful as callbacks. I hadn't been sure when I had designed the Timer class if I wanted to use callback functions or callback objects -- so I decided to support both.
TextLabel
I wrote about this one also previously. Its API has changed a bit, and more changes will probably be on the way in the near future. I took advantage of maps as parameters for TextLabel.Create
's parameters, which were growing in number as I was adding more features.
What I learned during the game jam was that I desperately needed alignment options for these TextLabel instances to make the most of them. For example, if you want text centered in the middle of the screen, but you are writing messages of different lengths to the same row and column, then what was once centered in the screen may not be centered later on.
Unfortunately this was something I couldn't address during development of my entry. My text was a bit misaligned, but the TextLabel class proved very handy to me. With alignment added, the next game jam should be even easier.
Machine
Over a year ago, I wrote AXR-100: Operation First Wave which was my first game jam entry in MiniScript for Mini Micro. I ended up writing a lot of state code for it by hand, and it was very messy to me. Without timers, enums, or a state machine, this meant there was a lot of repeat code in order to do similar things all the time.
With the implementation of this state machine class, I was able to model small state machines quite easily in MiniScript. It scaled well enough that I was able to model the basic lifecycle of the game itself as states, such as loading, displaying the title screen, actually playing the game, and displaying a game over message.
What I learned during the game jam is that the code that I supply for my states can be rather complicated. States, transitions, and events should definitely be well thought out -- and indeed this library made it very easy for me to describe what I wanted -- but after that I need also to do my best to keep my state code neat and tidy. Although this might be obvious in theory, in practice this requires the programmer to think very carefully about design choices, such as how certain game objects will interact with other game objects.
Summary
If you'd like to play the game, you can do so here: https://bibleclinger.itch.io/color-smash-tank
If you're developing a game for Mini Micro, and feel that these libraries might help you, feel free to check out the library at: https://github.com/BibleClinger/bclib
Just please be aware that this library is still under development and may change as time goes on.
Top comments (1)
Thanks for sharing your experience!