Snakebird

Snakebird

View Stats:
NohatCoder Jul 23, 2015 @ 11:02am
Fan-edition - with level editor
My Snakebird implementation now has a simple text-based level editor, and supports sharing levels as links. Check it out, and post a link if you have designed a good level. http://ebusiness.hopto.org/snakebird.htm

Update: 5 levels now included.

I think the editor should be mostly self-explanatory, but I'll go through it just in case:

Every level is stored and edited as a JSON string. The primary map is made from an array of strings where one character represents a block in the level. Space for nothing, X for ground, F for fruit, S for spikes, E for exit, P for portal (if used, there must be exactly 2 portals) and O for object. These strings must be upper case.

An object can be either a snakebird or a movable block. The array objects must contain an object for each O in the map. The objects in the array must be arranged in the order they appear on the map, when reading the map one line at a time from left to right.

In order for an object to be a snakebird it must have the property "type":"snake". It must also have a property "color", set to a CSS color name, or a CSS # color. Further it must have a "shape", the snakebird's head will be where the O is located, the body will then grow backwards in the directions dictated by the shape string. The shape string must be composed of the letters N, S, E and W, for up, down, right and left respectively.

In order for an object to be a movable block it must have the property "type":"block". It also must contain a "positions" array, this array must contain length-2 arrays with coordinates specifying the positions to occupy, relative to the O location. While any shape can be built, there is currently no visual cue to indicate that disjointed blocks are connected, so don't go too crazy.

Also beware that in order to share the level you must share the given link. You can click the link in order to store the level, but it is only stored on your own computer.
Last edited by NohatCoder; Jul 26, 2015 @ 2:50am
< >
Showing 1-11 of 11 comments
flesk Jul 23, 2015 @ 11:16am 
That looks pretty neat. :)
Namekujisennin Jul 24, 2015 @ 12:15am 
You know the mechanics of a puzzle game are really great when it still is so addictive even devoid of all the charming visuals and sounds :KSmiley:

Bridge was pretty neat! I gave up on Tunnel since for some reasons, upon death I was sent back to Bridge, without a possiblilty of undoing my wrong move.

Sorry for not going to contribute creatively though.
NohatCoder Jul 24, 2015 @ 1:15am 
You contributed with a bug report. It is actually a bug in Firefox, but it was easy to work around, so it should work now.
edderiofer Jul 27, 2015 @ 4:08am 
Here's my level that uses a rather odd feature of this implementation. I vote that the implementation should stay like this. http://t.co/W6q7pnDjWT

You should probably consider shortening your URLs. Unshortened, the URL takes up about 6 lines of text. And no, goo.gl doesn't work because Steam removes it.
Last edited by edderiofer; Jul 27, 2015 @ 4:10am
NohatCoder Jul 27, 2015 @ 8:00am 
The rather odd feature that length 1 snakebirds cannot move has mysteriously disappeared. In order to avoid that edderiofer beats me to death with a stop sign I have implemented fruit crates. They work like blocks, but can't tolerate spikes, and must be brought to the exit along with the birds.
edderiofer Jul 27, 2015 @ 8:41am 
Well, at least this implementation is more flexible.

Still, the old implementation at least seemed like something that might be more dramatic, story-wise. "The snakebirds, unwilling to leave behind their immobile brethren, had to escort them through the dangerous landscape..."
Originally posted by main_gi:
Originally posted by eBusiness:
Seems like there is going to be competition in the field.

My implementation, for now with one original level: http://ebusiness.hopto.org/snakebird.htm
I think Z and Right Shift should be undo keys, because they are much closer to WASD/Arrow Keys, while Left Shift and Right Control should switch birds.
flesk Jul 27, 2015 @ 1:50pm 
Originally posted by eBusiness:
A hard level designed by a committee consisting of edderiofer and me:

http://ebusiness.hopto.org/snakebird.htm#Alb_rnwk4mQvI-ikwf3ElEqXv6MuilgmwmgH-INmF847t4LVgjNd_wUOgHoH85FeGliPuFPFpCmzFlzrhMWuoSyKk6pNwFnDtKP1rzG5o4dUdz0gIkFco0Y_66dD_Ecg0Qwn4glwWEo_YkDtUFgnA495zX9qM-hfzMkE5mw0A_kIkFG2EFpxm5kx4mxiWgjM-COvHlIFoWwBnRdMMiIOO3gPOvw5eh2EwzWqH1iH3HJ8m4O9wOPkNw_E47MGg8E5sQSn5otBmJ1xH_4JhtFHomGVlC11g5owFo2GvwXuOGKnQvqH34

There's no fruit showing up in that level for me, but on reaching the exit with all three snakebirds, I still get a message saying that fruit was left behind.
NohatCoder Jul 27, 2015 @ 11:34pm 
Originally posted by flesk:
Originally posted by eBusiness:
A hard level designed by a committee consisting of edderiofer and me:

http://ebusiness.hopto.org/snakebird.htm#Alb_rnwk4mQvI-ikwf3ElEqXv6MuilgmwmgH-INmF847t4LVgjNd_wUOgHoH85FeGliPuFPFpCmzFlzrhMWuoSyKk6pNwFnDtKP1rzG5o4dUdz0gIkFco0Y_66dD_Ecg0Qwn4glwWEo_YkDtUFgnA495zX9qM-hfzMkE5mw0A_kIkFG2EFpxm5kx4mxiWgjM-COvHlIFoWwBnRdMMiIOO3gPOvw5eh2EwzWqH1iH3HJ8m4O9wOPkNw_E47MGg8E5sQSn5otBmJ1xH_4JhtFHomGVlC11g5owFo2GvwXuOGKnQvqH34

There's no fruit showing up in that level for me, but on reaching the exit with all three snakebirds, I still get a message saying that fruit was left behind.

Sorry, the code got ahead of the game description. You have to get the pink crates to the exit.

@main_gi I have mapped the controls to the Snakebird default, so you can undo with Q. I hope I'll get to custom remapping.
flesk Jul 28, 2015 @ 1:33pm 
Thanks for explaining. :) I'll give it another shot later.
< >
Showing 1-11 of 11 comments
Per page: 1530 50