Dino! Dino!

Y’all I made a game!

Well it wasn’t just me, my two-year-old and 12-year-old helped too. Ok, yeah and Niklas did a lot since none of us know how to program.

Dino! Dino!

Dino! Dino!

Niklas: The code should be pretty straight forward to follow. It loads the source art from creation graphs into renderer images and draws everything using the tm_draw2d_api (the same API that draws the editor UI). The data is kept in simple arrays — static arrays for the configuration data and dynamic ones (with a fixed maximum size) for the runtime data.

At Our Machinery, we decided to dedicate a Friday each month to do whatever we want with The Machinery. Some people worked on voxels, research, scene commands, etc. Niklas and I worked on building a really simple dinosaur collecting game. LIKE REALLY REALLY REALLY SIMPLE. First we consulted with Ragnar, (the two-year-old) on what dinosaurs he would like to “catch”, which he gave us a list of. This was a bit problematic because some of the dinosaurs needed to be in water, so we had to consider how this environment would look like.

Then we hired Kaia (the 12-year-old) to design the dinos. We paid both of them properly: one got 3 Trader Joe’s peanut butter cups and the other got $3 per drawing. I drew the background (FOR FREE, because I am nice like that). At first, we tried to make the whole thing “realistic” to the Mesozoic Era, using “these plants that the herbivores would eat”, or “we can’t have the ocean near this type of terrain because this dinosaur would never go there”, etc. In the end, we scrapped that idea to keep it cute and simple. My friend and FAMOUS GAME DESIGNER, Erich Schaefer, sent me a cool way to design the game using Excel. I found this method super easy to design and it made it easier for Niklas to code out the game and also for him to organize lines of codes associated with the dinosaurs. Thanks Erich! At the end of the day, we got the game playable.

Niklas: You can find the game design spreadsheet here: https://docs.google.com/spreadsheets/d/11sT_7U7IMrL_BpgIoLGul436z4L0lZe-oSCdbEn09DU/edit?usp=sharing. It comes with simple formulas that convert the design tables directly to C code to be pasted into the project like this: https://github.com/niklas-ourmachinery/dinosaur-collector/blob/main/src/dinosaur_simulate.c#L234.

We think it’s cute and a nice way to get the whole family involved in making something. We want to share it with you. If you have time to make improvements or put your own twists on our game, we would love to see it.

Finally, my idea was for the gamer to play this and when all the dinosaurs/mementos got collected, the screen would turn in a realistic 3D scene with a meteorite crashing down destroying everything on site, GAME OVER. Niklas laughed, but the kids thought it was a bad idea as it made them sad. I decided against it because it would have cost us probably $100k to do what I had in my head. But if you’re a badass animator and you have time PLEASE DO IT!

You can download the game here! Make sure you have recent Vulkan drivers for your GPU (you need Vulkan 1.2 support).

You can also run the game (and edit it) inside The Machinery. To do that, you need the latest The Machinery January 2021 Beta. Then, download the game project from GitHub. The project file is in project/project.the_machinery_dir, so open that file in the editor and then start a Simulate tab to run the game.

by Tricia Gray