A Shocktopus History – Part 3
Posted in: Electric Shocktopus | November 22, 2016 | No Comments
(The Electric Shocktopus is coming to Steam on November 30th, so I figured it was a good time for a history lesson. To learn about the first inspirations for this electromagnetic game, see the first or second parts of this series.)
The Physics Strikes Back. (Wait… I guess… Revenge of the Griffiths?)
Right from the get-go, I knew I wanted The Electric Shocktopus to have both electricity and magnetism. And they both seemed so easy to simulate. That’s why I picked this branch of physics, after all. Let’s start with the second one first…
Magnetism
In that first, blocky prototype from January 2013, the game already included magnetic fields – though, unlike with electricity, I defined the fields directly (instead of calculating them). Certain tiles were field arrows pointing *into* your screen, and other tiles that were field arrows pointing *out of* your screen. Simple as that. As you moved through those fields, you’d feel a force from them, turning you the appropriate direction.
But by May 2013, I’d bumped that up a notch, by including current tiles. And as you recall from elementary school, playing around with electromagnets, electric currents can create magnetic fields – which I calculate using the Biot-Savart Law. It’s a bit mathy, but pretty straightforward to calculate.

If the magnetic fields above are *out* of the screen, and the fields below are *in*… which way are those negative charges moving?
Phew! Not bad – we can check magnetism off the list. And we all know that electricity is even simpler…
Electricity
No. No, no, no, no, no, no.
Simulating electric fields started off so easily. So easily. There were electric charges, and I calculated the fields using Coulomb’s Law. An easy equation, and simple to calculate, even with a bunch of charges on the screen.
But. I got greedy. I wanted to add conductors. And that’s where the wheels came off a bit.
Conductors are materials where electrons are free to flow, the charges can move and rearrange themselves. And they do so in complicated ways that depend on what’s around them. There’s no equation you can use to determine how they affect the electric field.
But there is an algorithm you can use. A set of steps ironically called the Relaxation Method. (Aaahhhh….) You break up the space into squares – which, nicely, my tile-based game already does – and then you guess the voltage for each spot. Pick zero, say. You then cycle through all the tiles, changing the voltage depending on what’s around them (charges, conductors, voltage, etc)… repeating this process for all the squares. This gets you a slightly better guess for the voltage. Then you repeat, cycling through all the squares, slowly but surely getting closer and closer to the true answer – converging on the array of voltages for all the squares in the space. And from that, you can get the electric field.
But there are problems with this. For one thing, you need a boundary – an edge all the way around the screen with a well-defined voltage. Which is something I didn’t have… and couldn’t easily add. For by adding in a ring of grounded conductors around the whole level, I’d be changing the result. It’d warp the very fields I was trying to calculate. And losing accuracy, you may know, is something I don’t take lightly! (I don’t have the space here to describe how I *solved* this problem, but if you’re interesting in getting into the weeds with the calculations, let me know, another blog post may be in my future.)
Another problem I had with the Relaxation Method was dimensions. I figured that, since my game was 2D – I could do the calculations in 2D. The screen is 30×24 tiles – so rounding up to allow for some off-screen border, that’s around 1000 tiles that I’d need to run through the calculations. Turns out, that’s fairly manageable, if you write the code well.
And after I added the conductors into the game in May 2013, I went along for some time, not realizing there was a problem. But there was a big one, that had to do with the third dimension – which it turns out I could not ignore. It took me until August 2013 to discover that one, and I summed up the problem and solution here. By having to do the calculations in 3D (with about 30x as many tiles, or cubes, to consider), it slowed the calculations down a lot. Gone was the hope to have the levels calculate the fields in real-time. Charges and conductors would have to be set in place.
By this point, I had the theme in place, the title and place, the physics in place – though hadn’t entirely solved that conductors problem, as it turns out. And I had a bunch of levels in the game. Surely I must almost be at a finished game. Right?
(Tune in next week for a look at the stumbling blocks TES hit coming to market…)
Post a CommentA Shocktopus History – Part 2
Posted in: Electric Shocktopus | November 15, 2016 | No Comments
(The Electric Shocktopus is coming to Steam on November 30th, so I figured it was a good time for a history lesson. To learn about the first inspirations for this electromagnetic game, see the first part of this series.)
We left off last time with the first playable (by me, at least) prototype of The Electric Shocktopus, called, at the time, Magnetoad.
Puns and animals in my titles. Guess I can’t resist ’em.
Pinning Down the Theme
I knew Magnetoad wouldn’t last forever as a title. What other characters would you expect to hop around and hold on to walls? Perhaps, a Monkey?
That was the working title (and title screen) of the game for a month or so. I had sprites (a cute little running monkey), and bananas for the monkey to pick up. It was on its way. But, there were two problems. I wasn’t a big fan of the title. Where’s the pun? Who would recognize the game as being about electromagnetism? Bah. And second, as someone pointed out to me – not knowing I was working on this game yet – “Monkeys are so cliche. Every game is about monkeys!”
Uh-oh.
It was moments after that interaction that the title of the game came to me. In one glorious pun. It was time to throw out all that art, because I was working on The Electric Shocktopus!

He looks kinda like a hand with eyes.
And by March 2013, the game’s title and theme were set. Except for a few assets here and there that needed to be replaced… (unless octopuses like bananas, maybe?)
With some punching up, by May 2013, the game had a bunch of levels, new art, and was being playtested left and right.

Recognize this level? (May 2013)
The level pictured above made it into the final version of the game, in fact.

Recognize this level? (November 2016)
Do you notice the difference between those two images? Yes, yes, the second one looks a *whole*lot*better*, sure. But there’s another difference perhaps even more important, lurking in the physics.
(Tune in next time to discover how the physics simulation of the game has had to change over time…)
-Andy
Post a CommentA Shocktopus History – Part 1
Posted in: Electric Shocktopus | November 8, 2016 | No Comments
With the upcoming Steam release of The Electric Shocktopus, it seems like a nice time to reflect on the long, winding history of this game. For before we could get to B,
we had to start at A:
The Prelude
In July 2012 – I released Agent Higgs, my first iOS game. It was a relatively quick dev cycle, just a few months, and I was looking for my next project. And I decided to leap in head-first and make the Quantum Mechanics game I always wanted to. I even posted a sneak peek! But… after prototyping it, I had to shelve the game. I was having too much trouble mixing the content into a fun, educational game. (It remains my white whale to this day.) Something that’s inherently chance-based doesn’t necessarily make for good puzzles, while at the same time quantum mechanics (with no precise positions or momenta, say) resists an easy visual representation. I decided I needed to save it for later.
I then turned to prototyping an evolution simulator, and you can play around with the prototype of that here. Stick creatures walking along, evolving and getting better with each generation. I wanted to turn it into a game, but again, had to shelve it after testing out several prototypes that didn’t click with me. A simulation was straightforward, but building a game around something like evolution, where the whole point is that it happens on its own, free of some outside influence… (and taking a long time to see changes, to boot)… didn’t make for an easy game.
So I was looking for a winner. Looking for a game concept I knew I could deliver on. And in January 2013, I had it! Electromagnetism!
It fit the bill. For starters, it was visual – you can draw the field lines right on the screen and show how individual particles move around. It was useful – lots of people learn about electricity, which means it wasn’t too esoteric of a topic. And most importantly, it made for fun gameplay. You, the character, are an electric charge, running around a world of fields. You get to repel and leap high into the air, fling yourself through fields, and curve around magnetic fields. A game of both thought and skill.
I present to you that game:
Ah. Well, then. The first version of the game, with possible trademark issues… and maybe, just maybe in need of some polish?
But the core parts of the game were there, if a bit blocky:
You, the character (a toad, clearly), on the left side. Black platforms to jump around. And the blue and green electric charges, creating those arrow-less field lines. The game worked, roughly. And even at this stage, I was having a blast playing around with it. Navigating an electric field was, dare I say, fun. A few weeks into development, and the heart of the game was there in early 2013. But it was far from finished…
(Tune in next week to learn what happened to Magnetoad)
-Andy
Post a CommentShocktopus Steam Release – Nov 30th
Posted in: Electric Shocktopus | November 3, 2016 | No Comments
Ah, The Electric Shocktopus. A game with a storied history here at TestTubeGames – not to mention one that’s given me some wonderful afternoons of frustration. And now, for its next journey – Shocktopus will be coming to Steam!
The release date – November 30th.
The game will have Steam-integrated achievements, Trading Cards, emoticons, you name it. I’m going all-in Steam (after I read up and figure out what all those things are…) Keep your eyes watching here, as I share the latest developments.
And if you missed it from a few days ago — here’s Shocktopus’s Halloween costume (hope he’s not letting his Greenlight success go to his head…)
-Andy
Post a CommentThe State of Things
Posted in: @Evolving_Art, Electric Shocktopus, General News, Gravity Simulator | October 18, 2016 | No Comments
Hello! It’s a beautiful fall out in Boston, little Max is walking and talking, and I figure we’re long overdue for a report on the latest hap’s at TestTubeGames. Let’s go!
Gravity Simulator is on the move!
After making all sorts of updates to the Gravity Simulator – which you can read about here – I decided it was *finally* time to post the web version on a site other than my own. So I brought it over to Newgrounds, excited to get some fresh eyes looking at the sim. And I was not disappointed, the game made it to the front page, and has been played more than 20k times. I’ve gotten some really helpful comments from people, and hope that we might see some creations from them in the forums.
I’ll be posting the simulator to other games portals now that I’ve shaken out a few new bugs, though am contemplating posting it on Steam Greenlight, too. Which brings me to…
The Electric Shocktopus is coming to Steam!
After sitting around in Greenlight purgatory for a while, The Electric Shocktopus made it through, and is going to be up on Steam soon! (I’ll be announcing the release date shortly.) I’ve been spending a bunch of time trying to learn all the ins and outs of Steam – and feel a bit like an out-of-touch person trying to understand what the kids are into these days WHICH I AM CERTAINLY NOT. Trading cards, badges, achievements, all sorts of bells and whistles to connect in to the game. So there’s a fair amount of research and work on my plate to prepare for the Steam release. (I’ll remind you that TES is already out, and you can download it, as always, here.) And speaking of storefronts…
Upcoming release on TeacherGaming Store!
I’ve been working with TeacherGaming, a teacher-facing games website, to get my projects posted on their site. The site is run by the fine folks that brought the world Minecraft EDU, among other educational projects. They are building a site that gets games into the hands of teachers, and provides them with some lesson plans connected to the game, to boot. They’ll be selling both The Electric Shocktopus and Gravity Simulator, with a release date within the next couple weeks.
Our Site Revamped
I went through, this past week, and cleaned up the TestTubeGames website, which, having grown organically, had some weeds in it. New fonts, new images, an updated footer, and fresh images for sharing to Facebook. (The default images that would pop up before when you shared a link were… not good.) I’m pretty pleased with how much fresher the site looks — and, as luck would have it — it got a test drive its first day out, when someone shared Velocity Raptor on reddit. Let’s put those new share-images to work!
Little Entropy Project
I worked on a fun little project recently, based on a puzzle posted over at Quanta Magazine. (A great site to check out for in-depth science news.) In their puzzle column, Pradeep Mutalik described a simple model of a universe, with finite states, and challenged the readers to answer some statistics questions about the entropy and evolution of such a world. Entropy is one of those topics I’ve been batting around, never really finding a great idea for, so I figured I’d go ahead and build a simulation of the world they described. You can read the puzzle here, and test out the model universe here.
@Evolving_Art on hiatus
I didn’t end up getting enough people interested in the art simulation on Twitter, so I’ve put it on the back burner for now. I might change it a bit and bring it to a web portal like Newgrounds — since, after all, the project only really works if we’ve got a lot of people contributing their opinions. But, with all that I’ve got on my plate (as well as a bit of contract work here and there), this won’t be happening anytime soon.
So, there you go, that’s what’s been keeping me busy lately. And kudos to you for making it through that uncharacteristically long post! As a reward, go play Quantum Marble Maze – a rad game by Crispin Cooper.
-Andy
Post a CommentFeel Bad Friday – E47A
Posted in: Electric Shocktopus | September 9, 2016 | No Comments
Well – it has been a while, hasn’t it? Time to get back on the Feel Bad Friday wagon — ‘weekly’ has kind of gone out the window, but I’m still enjoying making videos when new levels come along!
This time I took on E47A by NealCruco — which is hexadecimal for “äz”… there, doesn’t that make more sense?
It’s a great, complex level, that really put me through my strides after being a bit rusty at taking on FBF levels. I had a lot of fun (which, admittedly, looks a lot like this). Give it a watch and find out.
Or even better, give the level a play. Can you beat it? How many deaths did it take you? You can find the code here. Thank you to NealCruco for sharing this level with us!
-Andy
Post a Comment@Evolving_Art
Posted in: @Evolving_Art | June 14, 2016 | No Comments
I have a new project to unveil: @Evolving_Art – a Twitter Bot that evolves art.
Huh?
Long story short, go here and check it out!
Short story long:
For a while, I’ve been trying to figure out an interesting way to showcase evolution. The closest I got was in the creature-walking simulator The Fittest (check out that prototype here). It’s fun to watch, and I find it really compelling – but it’s not terribly interactive. And of course it isn’t. Evolution is all about letting things run their course. Creatures are born. The ‘best’ creature reproduces. And, over time, the creatures tend to get better.
In the back of my mind I’ve been brainstorming other projects that could balance the interaction and the lack-of-interaction a bit better.
And a few weeks ago one of those ideas bubbled up to the top: why not let people be the selective force of evolution? Instead of picking winning creatures based on how far/fast they run… people could just vote on their favorites. It could be something as human as “which work of art is the prettiest?”
A Twitter Bot felt like a great fit. A couple times a day, the bot could post the latest generation of creatures (works of art, in this case) up on its Twitter feed, and whoever wants to can vote. After 12 hours or so, votes are tallied, and the winner makes some similar – but mutated – ‘offspring.’
It makes people a core part of the project, while at the same time involving them only very little. You don’t stare at creatures evolving for hours on end… you just send a tweet and get on with your day. And, slowly but surely, over time, the art will evolve.
Into what? I have no idea. Maybe it will make something beautiful! Maybe it will just be random. Maybe we’ll find out that people seem to prefer the color green?
There’s only one way to find out… keep an eye on @Evolving_Art, and if you are so moved, feel free to join in and vote!
-Andy
Post a CommentThe Two Sides *rematch* – FBF
Posted in: Electric Shocktopus | June 13, 2016 | No Comments
Every now and then – I… fail… at a Feel Bad Friday. I know, I know – how could I? I built the game — I should be able to beat every level you could throw at me.
But sometimes, I don’t.
I’m not above a rematch, though. So this “week” I took on The Two Sides by A Random Player again – a level that didn’t go so well before. But this time? Well, you’ll have to watch to find out:
Thanks to A Random Player for sharing the level, and also for giving me tips for how to beat it 🙂 If you want to check out the level yourself, head here.
-Andy
Post a CommentNo Waste (FBF)
Posted in: Electric Shocktopus | May 27, 2016 | No Comments
This week for Feel Bad Friday, I had been planning on playing through 69F4 again — flipping that red switch finally. But, as you’ll see in the video, that doesn’t quite pan out.
So instead, it’s No Waste, by A Random Player. And oldie but goodie – this is a level from a simpler era. Does that mean the level itself is easy? You’ll have to watch to find out…
A big thanks to A Random Player for sharing the level with us. If you’d like to try it yourself, you can grab the code here. (If you dare!)
-Andy
Post a Comment69F4 (Feel Bad Friday)
Posted in: Electric Shocktopus | May 20, 2016 | No Comments
We’re back again – reaching some semblance of consistency perhaps in this weekly endeavor? This week for Feel Bad Friday – I take on 69F4 by, who else, NealCruco. Enjoy watching me squirm:
If you want to try out the level yourself, you can grab it here. Thank you, NealCruco, for sharing it with us! As you can tell, I had a lot of fun.
-Andy
Post a Comment