About stevejohnson

I work at a startup writing a massively multiplayer HTML5 game called Buildy (playbuildy.com). My personal web site with more interesting information is steveasleep.com. You can contact me at steve@steveasleep.com.

Entries

 
Ludum Dare 26
 
Ludum Dare 19

stevejohnson's Trophies

The Everyposter Whaward
Awarded by asiekierka
on December 20, 2010

stevejohnson's Archive

In for a roguelike

Posted by
Thursday, April 20th, 2017 8:19 pm

I’ll be coding like a fiend this weekend on a roguelike! I’m going to use it as a practice run for another roguelike idea I have in mind, and as an excuse to work on my roguelike library, Club Sandwich.

Tools:

LD38 Cross-Platform Packaging & Testing Guild

Posted by
Wednesday, April 19th, 2017 9:42 pm

(Partial repost with updates)

In the past, it’s been a pain to chase down people to help me package and test my Python games for Windows and Linux. I’m sure many of you have had the same problem.

That’s why I’m making the LD38 Cross Platform Packaging & Testing Guild! Here’s how it works:

  • You add your name, contact info, and packaging/testing capabilities to the form.
  • When the compo is underway, I will publish a secret static site so members can contact each other. We’ll have a mailing list and an IRC channel.
  • When voting begins, I’ll publish a PUBLIC list of members’ games for extra visibility!

In my case, I’m willing to package people’s Python games for OS X, and test on OS X. I could probably do the same with other free tools if they don’t require too much setup or reading.

If this interests you, fill out the form and then leave comments with your suggestions. Your opinion will hold extra weight if you are joining up!

clubsandwich, a BearLibTerminal framework for Python 3

Posted by
Sunday, April 16th, 2017 6:18 pm

(Cross-posted from Reddit)

In preparation for Ludum Dare 38, I spent this weekend writing a bunch of utilities for BearLibTerminal that will make your life MUCH easier! (If you’re a Python 3 developer, that is.) It’s a Cocos2D-iOS UIKit mashup, for ASCII.

Check it out here

API docs (in progress)

screenshot1

screenshot2

Features:

  • Event loop
  • Scene manager
  • Geometry data structures
  • Convenience functions
  • UIKit-like interface framework
  • Script runner to help you iterate quickly

I’m still working on nice documentation, but the Readme should give you a general idea and start a discussion. I love writing docs, so I can safely promise that there will be some good ones very soon.

Motivation

LD38 is next weekend, and I’m thinking about doing a roguelike. BearLibTerminal has gotten a lot better for OS X lately, so I started playing around and decided to stick with it.

The first thing I did was write an asynchronous event loop and scene manager, Cocos2D-style, to make it easy to transition between game screens. It was simple, and you could probably do it yourself in fifteen minutes, but at least I’ve saved you some typing.

CataclysmDDA has given me high standards for roguelike UIs. I knew I’d never be able to make both a nice game and a nice UI in 48 hours. But I’m a champ at iOS development, and decided to try implementing the important parts of UIKit from scratch, in Python, for ASCII. And it worked! It will take a while for me to explain the concepts, but I’m confident people will be able to wrap their heads around them.

While writing all this, I added some geometry data structures and utility functions for BearLibTerminal. Stuff like a transform stack for drawing, convenient state access for Python, and a little script to help you iterate quickly by continuously relaunching your program.

If you post a mockup UI, I will write a demo in clubsandwich! I tried to make the UI framework as general as possible, but really only played with a couple of layouts. If you want me to prove the utility a bit, you could help me out by posting an ASCII or MS Paint mockup of what you want your UI to look like, and I’ll see if I can build it quickly in clubsandwich.

LD38 Cross-Platform Packaging & Testing Guild

Posted by
Saturday, April 15th, 2017 7:56 pm

(Partial repost with updates)

In the past, it’s been a pain to chase down people to help me package my Python games for Windows and Linux. I’m sure many of you have had the same problem.

That’s why I’m making the LD38 Cross Platform Packaging & Testing Guild! Here’s how it works:

  • You add your name, contact info, and packaging/testing capabilities to the form.
  • When the compo is underway, I will publish a secret static site so members can contact each other. Maybe we’ll make a Slack or IRC channel or something. Maybe a mailing list. I love those.
  • When voting begins, I’ll publish a PUBLIC list of members’ games for extra visibility!

In my case, I’m willing to package people’s Python games for Mac. I could probably do the same with other free tools if they don’t require too much setup or reading.

If this interests you, fill out the form and then leave comments with your suggestions. Your opinion will hold extra weight if you are joining up!

LD38 Cross Platform Packaging Guild

Posted by
Wednesday, April 12th, 2017 12:15 pm

In the past, it’s been a pain to chase down people to help me package my Python games for Windows and Linux. I’m sure many of you have had the same problem.

That’s why I’m making the LD38 Cross Platform Packaging Guild! Here’s how it works:

  • You add your name, contact info, and packaging capabilities to the form.
  • When the compo is nearing its end, I will put up a quick static site so people can find you.
  • A week later, I will take it down again so people don’t keep bothering you indefinitely.
  • If you package a game, I’ll have some way to add it to the page, so we can congratulate each other. :-)

In my case, I’m willing to package people’s Python games for Mac. I could probably do the same with other free tools if they don’t require too much setup or reading.

Don’t use Joy.js.

Posted by
Saturday, August 24th, 2013 1:52 pm

What a disaster.

My  LD26 entry, We Dreamers, is a collaborative minimalist art piece. Aside from a small start, all of the content was created by players. I thought it would be fun to extract all of the notes and collect a few here to give you a taste of what people have been doing in the abstract space that is the “game world.”

5b

I should mention that each one of these notes was left in a specific context. They were surrounded in 2D space by colored rooms and other notes. I callously dumped out all the text without the position information. To compensate, I’ll try to respect the wishes of the original authors, and not give away too much.

People Who Mark Territory

hey look in the next room!! 😀

IGNORE THIS PATH, MISCREANT.

LEAVE THIS PLACE, IT WAS NOT MEANT FOR ONE AS FRAGILE AS YOU

this Is my humble abode welcome

don’t go into the next room

PLEASE ENTER MAZE FROM OTHER END

~ Society for Protection of Mazes and Puzzles

People Who Think Deep Thoughts

Solitude. I sit here in a populated room, but I am alone in my thoughts, as they are in theirs. I am now more comforted by the text on my monitor than the activity around me. I itch the back of my neck.

“My legs hurt, my color is fading… but I’ll follow you to the end of all colors if I must!”

What are those 3 ancient sculptures ? Surely an ancient civilization wrote those long before us. I’m sure it’s some kind of message for some supreme being watching us from another dimension.

My note, an abstract scribble of ink on a worthless slip of paper, taken from the wall and discarded, is now an inextricable part of someone’s mind.

And here it was. A brand new color illuminated the adventurers, and they realized that the world was bigger than they thought. They wanted to bring the new color back with them. But instead, they left it there. Someone, one day, will come here with his own color and dig into this new world even further, and illuminate the world.

People Who Tell Stories

HEED YOU NOT OUR WARNINGS?

Traveler’s note, page 496: I lost my pickaxe in the tunnel below. I must go deeper. I wonder what horrors and wonders await me down there; I may never come back alive.
Chonodrax

Once Upon a time, there was a foolish man.

(You’ll have to play the game to read the rest of that one! It’s a proper short story.)

People With Different Ideas Altogether

My name is Inigo Montoya, you killed my father… Prepare to die!

Easy West-African-ish stew (from friends who were in the Peace Corps): heat up peanut butter, water, tomato paste, and chili powder to make a sauce. Serve on roasted sweet potatoes or winter squash.

—,===,”<   crocodile

Never go full Zen.

Oh God oh God this whole game’s a trick don’t get to level 4 DON’T DO IT

To everyone who’s left an interesting note,

Thank you! I am delighted, as I’m sure other players are, by the random bits of humor and thoughtfulness scattered around We Dreamers.

During the final voting round for Ludum Dare 26, I spent a couple of hours coming up with good ideas for every possible theme…except minimalism. No way that would get through, right?

When that theme was chosen, and I had to throw out all of my wonderful schemes, most of which were single player pseudo-roguelikes. Instead, I picked a vague idea: a web-based multiplayer world where you dig out rooms underground in a grid. Maybe there would be shapes and colors and stuff. Genius! I figured out the rest as I went along.

Here’s the game. (The compo version is here, only difference being 400% more data to make your web browser slow.)

You can do a few things:

  1. Move with the arrow keys or WASD.
  2. Harvest color with space.
  3. Dig out new rooms by bumping into walls. You need color to do this. The new room will be the color of your dot, which is affected by the color in your bucket.
  4. Dump color with r, g, and b (or 1, 2, and 3) to change the color of your dot.
  5. Leave notes on rooms (if you are level 2) that appear at the bottom of the screen when you enter the room.
  6. Put down big block letters (if you are level 3) that you can use to spell [sometimes naughty] words.

You gain levels by adding content. If anyone else is online at the same time as you, you can see their dot and any content they add, all live-updated.

2m

That sounds weird. How did it do?

Voting’s still in progress, but I do have some user responses and some numbers.

People tend to have one of two viewpoints. They’re either like wrongcoder:

Neat. Quite unique. Technologically a marvel for the available time. To be honest, though, I don’t get the purpose of it.

or they’re like BlennosoftGames:

There is something very cheerful about this game. As far as I can tell you don’t “win” you just smile :)

Most players were in the second category, so I’m very happy with how it turned out. People seem to understand what I’m trying to do: create a virtual canvas where contribution is easy, bad behavior is difficult, and quirky things can be found given a few minutes’ exploration. Hegemege said it “felt a bit like geocaching,” which really tickles me.

The numbers are encouraging as well. When I checked earlier today, there were 3,019 rooms dug by 147 users. 54% of players dug 5 or more rooms, with some people digging over 100 rooms. 11% had a note on them. 18% had a stamp. So people were definitely doing more than running around and bumping into walls!

At first I was surprised that more rooms had stamps than notes, since you have to be level 2 to write a note, and level 3 to place a stamp. But it was pointed out to me that a stamp is just one letter, and you have to think a lot less to put one down. Want to spell DOG FART in huge letters? It’s only seven easy pieces!

I got a friendly nod from a post on Indie Statik with their Ludum Dare highlights. They compared We Dreamers to Peter Molyneux’s game Curiosity, which I have mixed feelings about, but it’s still nice to be noticed. They have a second highlights post as well.

Technical details

You might be wondering, like StuStutheBloo in We Dreamers’s comments, “How did you even put this together in the time available?”

The short answer is that I used Firebase, “a cloud database designed to power real-time, collaborative applications.” Put another way, it’s a magic, event-driven Javascript object that updates instantly across all clients. I didn’t have to write a server, or even deal with much multiplayer logic at all; I just designed all interactive objects to listen to Firebase events. The only thing special about the dot you control, as opposed to those controlled by others and displayed on your screen, is that your client is updating a Firebase subtree for your data. Those updates are reflected instantly for you, and very quickly for everyone else.

If you want to try your hand at a multiplayer online game for Ludum Dare, I strongly recommend that you try Firebase. There are half a dozen two-player games I haven’t been able to rate because I’d need to have another person sitting next to me to play with. You don’t even need to get all crazy and realtime – it’s also perfect for turn-based games. I hope to try something head-to-head next time.

Now for a longer answer to StuStutheBoo’s question. Although Firebase was essential to having the technical ability to build this kind of online experience, it was even more important that I knew my tools extremely well. My day job is to work on Buildy, an online multiplayer realtime building sandbox where you can make just about anything. For LD26, I brought out the same tools we use to make Buildy: HTML5, CSS, CoffeescriptGrunt, Bacon.js, SoundManager2, jQuery, Mousetrap, and underscore.js. The whole game is a bunch of static files hosted on Github Pages, just like the rest of steveasleep.com. To deploy, all I had to do was push to the gh-pages branch.

I didn’t do anything I hadn’t done before. All of the rendering is just styled <div> elements. I’m familiar with each of those Javascript libraries. I’m comfortable with the Chrome dev tools. Static files are incredibly easy to deploy and serve without paying a dime. As a result of using all these familiar pieces, I spent almost no time debugging simple (or even complicated) issues.

If you’re looking for advice about how to do Ludum Dare well, here’s mine: LEARN YOUR TOOLS. Make sure you know how to write, run, and deploy your game. Don’t give yourself any surprises. (Python developers have a particularly tough time with this one. There are still a few that ask you to install PyGame to play and rate their game. I sympathize, having used py2app for LD19.)

If you spend any time in Javascript, try to get your head around Bacon.js. It can decrease game logic complexity by quite a lot if you’re willing to invest your brain resources in it. We Dreamers would have had 30% more code and been 30% buggier without it.

Downsides and difficulties

There’s another, secret reason why I was able to write We Dreamers so fast: I didn’t give a damn about scale. I had no idea how much data users would generate (currently 2.8 MB) or how well browsers would deal with 6000+ DOM elements moving around (not very well). Buildy partitions its worlds into squares, so it’s easy to only load a piece at a time. We Dreamers has no such wisdom, so every user loads the entire world when the page loads. Threeish megabytes isn’t so bad for a game, but DOM performance turned out to be a huge issue once things got big. To help players deal with the speed, I now provide a stripped down version that web browsers can handle better.

I had a tiny bit of trouble with cross-browser compatibility. requestAnimationFrame still hasn’t been un-prefixed in Firefox or Safari. Safari didn’t like any of the CSS gradient variants I tried either, so the doors are all white when viewed in that browser. In the end, though, I was able to make it widely compatible and consistent.

There was one aspect of distributed computing I did have to deal with: syncing the time across all clients to get the color harvesting to look right. I thought I was being clever by using a public web service that gives you the current time in JSON. Unfortunately it’s hosted on Google App Engine and blew through its quota soon after voting started, so now all the players’ clocks are wrong anyway. It doesn’t affect the game much, but I should have seen it coming.

In closing,

I had a fun and intense time this year. Of my three attempts so far, We Dreamers is far and away my best Ludum Dare effort. I hope to do as well next time!

I know a thing or two about it. Send me an email: steve@steveasleep.com

How It Do What It Do

Posted by
Sunday, April 28th, 2013 3:28 pm

We Dreamers is a [potentially] massively multiplayer online…thingy. It’s under 1,100 lines of Coffeescript and runs entirely on static files and Firebase. And for the purposes of LD26, it’s done!

Secret weapons:

  • Bacon.js: Functional Reactive Programming in JS/Coffeescript)
  • Firebase: A magic event-driven data structure in the sky that live updates across all clients in real time
  • Good old-fashioned HTML and CSS know-how (all graphics are pure HTML and CSS, not a <canvas> element to be seen)

Other stuff:

I’ll write up further thoughts when I’m less burned out. It’s been a successful but draining couple of days.

Entry page

Play the game

Help text

Posted by
Sunday, April 28th, 2013 1:00 pm

Here’s what’s up.

This is an abstract multiplayer art piece. Things you can do:

  1. Move with the arrow keys or WASD.
  2. Harvest color with space.
  3. Dig out new rooms by bumping into walls. You need color to do this. The new room will be the color of your dot, which is affected by the color in your bucket.
  4. Leave notes on rooms (if you are level 2).
  5. Put down big block letters (if you are level 3).

Watch the sidebar for how to level up.

Enjoy yourself…and be at peace.

Basic feature set is done!

Posted by
Sunday, April 28th, 2013 12:53 am

You can play it here: http://steveasleep.com/we_dreamers

Basic mechanics are:

  • Press Space to get some color.
  • Press r, g, and b (or 1, 2, and 3) to release color to get the hue you want.
  • Bump into walls to make new rooms with your circle’s current color.
  • If you make enough rooms, you get the ability to write notes on your rooms.
  • If you write enough notes, you get the ability to put down single letters on any room.
  • The world is shared among all users and updated for everyone in real time.

All I want to do now is add strange audio effects, maybe some zen koans to find, and polish up the UI.

Final screenshot of the day, what you get when you zoom out with your browser:

2k

Features???

Posted by
Saturday, April 27th, 2013 9:22 pm

Look carefully.

2j

Screenshot time!

Posted by
Saturday, April 27th, 2013 12:20 pm

2g

 

You can knock out new rooms in the world by bumping against a wall ten times. Other users’ bumps count.

The day is saved?

Posted by
Saturday, April 27th, 2013 10:56 am

I came up witha reasonable idea. It’s already multiplayer. I’m not using canvas at all, just minimally (heh) styled <div> tags.

I came up with at least one idea for every possible theme

Posted by
Friday, April 26th, 2013 3:40 pm

…except Minimalism. Planning to use HTML5 and Firebase to serve up some multiplayer goodness using only static files. Grunt, Coffeescript, Pixi.js, and…some other stuff.

[cache: storing page]