You see these ideas pop up, especially in game dev or animations, things like “let’s shoot a character from a cannon!” Sounds like a breeze, a fun little afternoon project. That’s usually the hook. I remember one time, I actually went down that rabbit hole, thinking it’d be a quick win.

This was years ago. I was slogging through some mind-numbingly dull corporate software thing. You know the type, where creativity goes to die. My brain felt like it was turning into grey sludge. So, one weekend, to just do something, anything, different, I decided to build a tiny circus cannon scene. No real reason, just to make pixels fly and feel like I actually created something tangible for a change.
So, How’d I Make My Pixel Dude Fly?
First up, I grabbed a really basic character sprite. Nothing fancy, just a little blob with eyes. Let’s call him “Fearless Freddie.” Then I drew a simple cannon shape. Just a tube, really. Plonked it at the bottom of the screen.
The “shooting” part was where I started tinkering.
- I threw in a basic button. You click it, Freddie goes flying. Standard stuff.
- For the actual launch, I didn’t mess with complex physics. Just gave Freddie an initial push upwards and forwards when the button got hit. A bit of `velocityX` and `velocityY`, you know?
- Then came gravity. Every game tick, I pulled Freddie down a tiny bit. Had to tweak this so he didn’t just zoom off the screen or drop like a stone. Finding that sweet spot for the arc took a bit.
- To make it feel more “cannon-y,” I added a little puff of smoke. Just a few expanding circles that faded out. Found a “thump” sound effect too. Amazing how much difference a tiny sound makes.
- Landing was crude. Freddie would just pass right through the floor at first. So, I put in a check: if he went below a certain line, he stopped. Sometimes he’d land awkwardly, which was part of the charm, I guess.
I must have spent a solid couple of hours just playing with the launch power and angle. Too much, and he was a goner into the digital void. Too little, and it was more of a sad plop than a launch. Getting that perfect, satisfying arc was the goal.
And what came of it? Well, that little cannon project didn’t change the world. It certainly didn’t make that awful corporate project any better. But it did give my brain a much-needed scrub. It was a reminder that making something, anything, even if it’s just a pixelated character being fired from a cannon, can be oddly satisfying. It’s the small, silly projects that often stick in your memory, more than some of the “serious” work. Funny how that works, isn’t it?
