Over the past couple of weeks, I’ve spent entirely longer than I probably should have falling down the rabbit hole that is the game Turing Complete.
In a nutshell, you start with basically nothing, build up simple logic gates, create memory cells and 1-bit addition, build that into 8-bit math and logic, read instructions RAM, implement loops, and function calls (in hardware!), and eventually use your very own custom built CPU to solve a few programming challenges.
I didn’t actually enter the game jam. Honestly, I wasn’t sure I was going to write anything. But I had a bit of an idea and spent a few hours only on Sunday hammering something out:
Yeah, I did another cellular automata thing 😄
It’s not at all complete, but the basic idea is:
Generate a random level
See it with multiple players (colonies of bugs)
Each bug will send out waves of ‘shine’, expanding their territory
Take over the map to win
It’s sort of got that?
I’m using Rust as I’ve been doing a lot recently.
The main libraries are:
pixels for the rendering; it gives me direct access to a pixel buffer, which is my favorite
winit for windowing; this did require the feature rwh_05 to be properly compatible with pixels, which took a minute to track down
Other than, that, it’s straight custom code which you can see in it’s entirety on my github.
world.rs - runs the simulation mostly in an update function; with generation in new
I think that perhaps the only really interesting bit about the code is how the ‘shine waves’ work. Basically, I have a grid of the state of each cell, but I also have a Vec that tracks ‘active’ pixels. Those are the only ones that can update–which both helps performance and makes the simulation appear the way it does.
Overall, a nice quick project. More than anything, it actually convinced me to try setting up something that can render pixel buffers on Rust. And with a (very minimal) GUI, too! Both things I’ve been meaning to learn.
I probably won’t do anything more with this code, but it’s got the seeds of something more interesting. Keep an eye out. 😄
Simulate Tetris on a 7 wide board with a given (infinitely repeated) series of left and right inputs to be applied on each frame before dropping the block and a given (infinitely repeated) set of blocks. Once 2022 blocks have been dropped, what is the total height of the placed blocks?
Part 1: Play a simple game (describe below) with a loaded D100 (that always rolls 1, 2, 3, … 99, 100, 1, …). Return the score of the losing player times the number of times the die was rolled.
If a block gets stuck, you can hit ENTER to lock it in place
ESC to quit the current level
Goals:
To win: Get the plants to the top of the level
To lose: Kill off all of the plants #keepitalive
EDIT: I have included a v1.1 update that fixes a few minor bugs. Feel free to play either the official v1.0 build or the slightly updated (~10 minutes) v1.1 build with:
Add a ceiling
Correctly scale target
Scale control speed by difficulty
And there you have it. This page will serve as the main entry for Ludum Dare. If you’d rather download an executable for Windows/OSX/Linux, you can do so on the GitHub release page: