7DRL Challenge 2017

I’m doing the 7DRL Challenge again this year. The game is going to be kaiju themed. I’ve actually done a lot of planning for this one. Still undecided on a lot of things but I’m sure it will shape up during the week. Starting now, 10:30 PM EST on Sun, March 5th.

ASCIIbotics Labs

I’ve drawn a lot of ASCII art robots over the years. Now you can see them all in one place. I’ve made asciibotics.org into a browsable gallery of all my ASCII art robots and ASCII art robot projects. You can also follow ASCIIbot updates on Twitter @asciibotics. Enjoy!

Cool Stuff I Made in 2016

Collage of cool stuff I made in 2016

2016 wasn’t all bad. I made some cool stuff at least.

Games

So, I fell short of my goal of making five games this year. But I did make three! I think they’re pretty neat.

Bisby’s Escape

I’ve been calling this one a turn-based digdug-like. I made it for this year’s 7-day roguelike challenge. It’s really hard! For me at least. I’m actually not even sure it’s always winnable but I’m not good enough to tell.

Bisby's Escape Screenshot

You can play it here.

yoctoPets

This is a simulated virtual pet where you can glitch out the game by feeding the pet weird food. I made it for this year’s js13kGames competition.

yoctoPets Screenshot

You can play it here.

Runjumpers

This is an automatic runner where you have two different jump buttons. I really just wanted to make a character creator and then I added the game after, but I think the game part is pretty fun too. I made this one for GBJAM 5.

Runjumpers Screenshot

You can play it here.

Other Stuff

I made some things that aren’t games too.

ASCIIbot Advent Calendar 2016

Another year, another collection of ASCII robots.

Screenshot of 2016 Asciibot Advent Calendar

Check it out in its full 7-bit glory here.

Hey, look at this

I made a poor-man’s-Storify tool called ‘Hey, look at this.’.

Paste a few links like this:

Screenshot of 'Hey, look at this' app

And get a link that shows the embeds like this:

http://walsh9.github.io/hey-look-at-this/#t=811568140408721409&t=812285042038865920

You can try it here.

NanoKONTROL2 fractal tree controls

I put together a thing where you can play with fractal trees with the Korg nanoKONTROL2.


Plans for 2017

You can call them resolutions if you want.

Runjumpers Update with Background Music

I have two tunes done, but I still need to make a song for the actual gameplay part. Here’s the music for character creation:


Unnamed Print Shop Clone

I’m working on a Print Shop-like greeting card creation web app. I still haven’t even named it yet but you edit a card like this:

Making a new years card

And it prints out a quad fold card page like this:

Print Preview of new years card

Hypermolen

I have an unfinished game where you control a hyperdimensional mini-golf windmill that I need to polish up and finish.

Screenshot of Hypermolen

More game jams

I plan to do at least the 7-day roguelike challenge again assuming real life doesn’t interfere with that week. Would like do some other game jams too. I’m going to try to keep on top of things this year so I can work them into my schedule instead of being caught by surprise.

Hardware hacking

I’d like to mess around with hardware a bit more this year. Want to do at least one or two of these:

Until next year…

Runjumpers Post-mortem

I made a game for GBJAM 5 called Runjumpers. It’s an action jumping game with a 4 color palette for the graphics. Here’s a few interesting things I learned while making it.

Game designy stuff

Music is important

I knew it would eat up a lot of my limited time, since I’d never done it before, so I decided in advance to not add any music. But half of all the feedback I’ve gotten so far has mentioned that it would be nice if the game had music.

So I’ve been looking into how to make music. I don’t ever expect to make a masterpiece, but being able to create some passable catchy tunes will come in handy for future game jams.

I’m planning on a post-jam update for the game with some music. So far, I’ve only got this track for the title screen. Making something suitable for the running part has proven trickier. I’m gonna keep trying though.


Small gameplay changes can make a big difference

When I first started making the game it only had one jump key, and you could only jump one height. I thought about having a variable height jump based on how long you pushed the key, but first I tried just adding a hop key for small jumps. The game instantly became much more interesting and challenging.

I played around and started building levels based on choosing between hop and jump. As I tested them I would get frustrated and think things like, “Oh come on! I almost had it… Just one more try and I’ll get past that part!” I was having fun. This was working.

So this change only increased the available player choices at any given moment from 2 (jump / don’t jump) to 3. Sure that’s still a 50% increase in complexity, but it’s also the smallest change possible. Sometimes that’s all you need.

Technical JavaScripty stuff

JavaScript at 60 Frames Per Second is tricky

I was getting some lag when testing my game in Firefox on a different computer. After some investigation I found one interesting place for optimization.

I don’t usually worry about the details of garbage collection when writing JavaScript. It’s just something that happens automatically. But when you only have 16.6ms to update each frame, any garbage collection step that takes longer than that means dropped frames and choppy animation. Now, modern browsers are actually pretty good at scheduling garbage collection between frames, but it can still add up quickly and slower or busier machines can still fall behind.

How do we reduce garbage collection? Just reduce the amount of garbage we create. What is garbage exactly? In this case we mean creating objects that are never used again. The browser has to do some computation to free up that memory.

Here’s a great stackoverflow answer with a list of things that cause browsers to allocate memory.

So for example:

update() {
  //...
  player.pos = { x: newX, y: newY };
  //...
}

Whoops we just created a new throwaway object every time our update code runs.

update() {
  //...
  player.pos.x = newX;
  player.pos.y = newY;
  //...
}

Much better.

In general, instead of creating new objects during the game loop, create your objects at init time and make changes to those.

Here’s a profile of 6 seconds of gameplay in Chrome from before I refactored to avoid this.

Screenshot of a graph of JavaScript heap allocation showing dozens of jaggy sawtooths spread over 6 seconds

And here’s after.

Screenshot of a graph of JavaScript heap allocation showing only two smooth increases and sharp drops spread over 6 seconds

Check out those heap allocation graphs. Also notice ‘Minor GC’ drops from 17.3ms to 0.4ms. And this is just a simple running game with no enemies or items. In a game with bullets and enemies flying around the difference would even be more dramatic.

KeyboardEvent.key is cool

Modern KeyboardEvents are great.

Instead of something like this:

window.addEventListener('keydown', function(event) {
  if (event.keyCode === 38) { // Up
    player.jump();
  }
});


we can write this:

window.addEventListener('keydown', function(event) {
  if (event.key === 'UpArrow') {
    player.jump();
  }
});

Unfortunately this isn’t currently supported by Safari, but that can be fixed with a polyfill.

One more issue is that Edge uses some non-standard key names (still not fixed since IE9!), so you will actually have to write:

window.addEventListener('keydown', function(event) {
  if (event.key === 'UpArrow' || event.key === 'Up') {
    player.jump();
  }
});

Check the footnotes here for more details on those.

Even with these drawbacks, it’s still a lot nicer than littering your code with arcane keyCode numbers.

Don’t forget to play the game

https://walsh9.itch.io/runjumpers