Ludum Dare(ish) 56: BugShine

Ludum Dare? That’s been a while!

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.

  • main.rs - creates the window and handles input
  • 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. 😄

Onward!


AoC 2022 Day 17: Tetrisinator

Source: Pyroclastic Flow

Part 1

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?

read more...


AoC 2021 Day 21: Dicinator

Source: Dirac Dice

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.

read more...


LD46: Tetris Life Scoring

And so it ends.

Results

CategoryPlaceScoreRatings
Overal282nd3.68826
Fun408th3.43826
Innovation17th4.2827
Theme290th3.91726
Graphics608th3.31326
Audio436th3.18224
Humor761st2.20524
Mood529th3.20826

read more...


LD46: Tetris Life v1.0

Controls:

  • Left and right to move the block and forth
  • Z and X to rotate it (or crash into things)
  • 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:

Speaking of which, per the Ludum Dare rules (and because I would have anyways), the full source code:

MIT Licensed. I would appreciate a comment if you do anything cool with it.

Ludum Dare page, if you’d like to see my entry:

Some updates since last time:

  • Music!
  • More elements!
  • Polish!

read more...


LD46: IT'S WORKING!

IT’S WORKING!

The performance is terrible (sub 10 FPS on a pretty decent desktop and I want to try to run it in a browser…), but it’s working.

read more...