Wicklog 31: Connectome Explorer for remote classes

Hello, it is I, Olive, still alive. Since the last update, I’ve started HRT (or as I like to call them, my ~titty skittles~), restarted blasting my unsuspecting follicles with lasers (going back to a doctor was scary, but my house has started using microcovid.org which has hugely helped us quantify what we should be afraid of). Gender euphoria is a helluva drug, let me tell you. Highly recommend it. 10/10 ⭐ ⭐ 👌

I also just devoured Gideon the Ninth series and ~had~ to dress up as her for Halloween. If you want a sorta-juvenile space necromancer lesbian mystery story, hoo boy buddy you’re in for a treat. Highly recommend it. 10/10 💀🌺

Re: Crescent Loom, development has been slow because of a wrist injury (it’s doing a lot better since I started using a brace) and I’ve fallen victim to the “perfect being the enemy of the good” fallacy. I kept pushing back this update because there’s still bugs to fix (there’s always more bugs to fix) and more content to add (there’s always more content to add). The only thing that has brought me to finally write this is that I’ve gotten so doggone stumped on a particular bug (more on that later) that I’m using this a form of productive procrastination.

So here we are! This is a hefty update. The full changelog is here. Let’s hit the highlights.

Connectome Explorer

For some reason there’s suddenly a need for neuroscience activities for students that you can do online? Weird.

Anyway, Crescent Loom is basically ready-made to be a digital neurobiology lab for remote classes. In collaboration with my undergraduate thesis professor, I’ve made another micro-version of the game that 1) hides the identity of the neurons and 2) gives you tools analogous to what you’d have in a lab, e.g. by blocking certain neurotransmitters or exploding neurons with a laser.

It also lets you record and save a cell’s activity to a .csv file to be analyzed in other software. (I picked up this AMAZING cassette sound effect library in the itch.io racial justice bundle earlier this year, and so this recorder is now the most auditorally-satisfying part of the whole game.)

We’re planning on writing this all up as a resource for other teachers to use early next year. You can play the connectome explorer online here, or download it here.

Channel Panel

In the spirit of filling out the neuron side of things, I put together a panel where you can see the rules that govern the ion channels.

I’m planning on making this more of an editor; being able to add and remove ion channels from neurons to see how they behave differently would go a long way to change this from neurobabble to something people can understand.

(I also added the ability to change the ion concentrations of the neuron, but other simulations have already done a great job at that so I don’t think it’ll ever be a focus)

Plugging Memory Leaks

One of the downsides of being mostly self-taught is that I fall into programming gotchas that someone on a larger team/with a mentor would have taught me to avoid, as seen in my post on draw-calls.

Today’s version of this is memory management — specifically, deleting things from stacks. Naively, I assumed you could do this:

But alas, nay, this does not behave as expected. Here’s the error, step-by-step:

To avoid this, you have to either traverse the stack backwards or make a copy of the original stack, like so:

Why these fix the problem is left as an exercise for the reader. 🙂

Since I did the naive thing in crescent loom, I’ve been plagued by ghosts from almost the start of the project; phantom physics objects left behind by old, dead creatures. They were invisible to the player, and could only be sensed if they bumped into something or blocked creature sightlines.

Since I never successfully called the Kill() method on all the branches of creatures I was getting rid of, they left behind their ghost-bones in the physics engine even after I had dropped them from the game proper.

I was REALLY HOPING that fixing this across my entire codebase would have helped with the killer lag that accumulates as you play the game for more than like five minutes. Alas, it seems to have maybe helped a little but not completely. More work to do here, but hunting down memory leaks is borrrrring, frustrating, and I’m totally unmotivated to do it. So hi, I’m writing this instead.

I did get some neat graphs out of it, though. Scratches my running-science-experiments-by-changing-one-variable-at-a-time itch. Y axis here is memory used as seen in the task manager.

Look at some pretty creatures

I added rainbow colors and lights!!!

Also, a dedicated individual has been making some really cool lil buddies an posting them in the reddit. I’ll leave you with this beauty:

<3
Olive

Leave a Reply

Your email address will not be published. Required fields are marked *

By Olive Perry | © 2020 Wickworks
Proud to be a member of PIGsquad, Playful Oasis, and Explorable Explanations.