• Rebuild: Sales abound as winter’s come early

    Rebuild mobile’s on sale for 99 cents as part of the indie #superstrategysale. If you’re looking for real mobile strategy games, now’s the time to get Rebuild, Hunters, Call of Cthulhu, and Tactical Soldier – Undead Rising for a fraction of their usual prices.

    Rebuild’s been on sale quite a bit lately. October marked the one-year anniversary of Rebuild 2 (Oct 6th to be exact, with the mobile version on Nov 17th). To celebrate I did my first big content update for Rebuild, and ran a 99 cent sale for most of the month. The main new addition was seasons – now you could start the game in winter and play with an extra challenge: farms produce no food (no, not even winter melons!).

    Of course, although it’s possible to get through by just tightening your belts and doing daily scavenging trips to food-marts, that wouldn’t be as exciting as, say, eating human flesh. For example. So I made that an option: if it comes down to it you can eat your fallen comrades. Of course, once you try the other-other white meat it’s hard to be satisfied with anything else, and cannibalism has a tendency to escalate to much darker places. You’ve been warned!

    Another advantage to this winter mode is that it comes up naturally if you start a fort in spring and make it to day 200 or so, well past the point that the game gives you interesting content. So you can now try to save up enough food to feed your 100-person fort until spring (hint: you’ll need 100 * 30 * 3 = 900 day’s rations). Or, you know, just see what happens. Winter might be a good time to get in that helicopter and get the hell outta Dodge.

    The October sale and new content afforded Rebuild a round of press mentions and a New & Noteworthy feature on iTunes. It surprisingly didn’t make it into any Halloween-themed features which was what I was aiming for with my brazen new pumpkin icon. Downloads slowly petered off after the initial spike, and the curve didn’t seem to change when I put the price back from $0.99 to $2.99. In all the event doubled my expected profit for October. Probably it was worth the trouble, although the iPhone5 release and some Google Play bugs made it far more stressful and time consuming than it should have been. Not to mention that month I had to finish Incredipede with Colin!

    By happenstance Rebuild also got rolled into Google Play’s 25 cent sale in September which was rather interesting (55k downloads in one day whaaaow). It seemed to have no effect whatsoever on my iOS sales, but Android sales appeared to triple because of it. It was interesting to see them try such a daring “Steam sale”, but I hope to hell players don’t get used to it and start waiting for 99 cent apps to “go on sale”.

  • How to Make a Spider in Incredipede

    This is a quick tutorial on how to make a Spider in Incredipede. Spiders are my favorite thing to make in Incredipede.

    It took me a while how to figure out how they work, but like most things in nature they are surprisingly simple and elegent.

  • How to Beat a Level in Incredipede

    I had some requests for a more structured playthrough of Incredipede. I couldn’t just play the game since I know how to beat all the levels so I made a new level and beat it for the first time on video.

    This was risky, because you never know how long it’s going to take to beat a level. Here it is!

    I actually thought up this level on the bus. I also thought up a nice solution to it. Unfortunately the solution I thought would work didn’t work at all so I tried various things in this video until I got it. It’s not a great level and didn’t have the showiest solution but it gives you an idea of how to play.

  • An Ink-Bleed Fade

    I wanted to do something nice in Incredipede for transitioning between screens. Instead of just flipping boringly from the title screen to the game map, for example, I wanted it to look like the ink was being pulled off the paper and then reprinted with a map. Like you could see the press pushing the ink into the paper.

    You can see what I came up with by watching the begining of the video in my “How do You Play Incredipede” post.

    I asked my friend at Gaijin Games, Andrew Hynek, who wrote an amazing looking ink game called Drift Sumi-e for some suggestions. I ended up mangling his ideas into something more me. That is, something simpler and easier to implement.

    Incredipede is written in Flash using Stage3d. I use the Starling 2d API because it makes my code simpler and faster. One of the things I love about Stage3d is that I get to write shaders! In assembly! I find this really fun and I wrote a few posts on pixel shaders here.

    This fade effect is all with the shaders. The basic idea is simple: I just take the brightest pixels and don’t draw them, then I take the next brightest pixels and stop drawing them until I’ve stopped drawing even the darkest pixels. The problem with doing that is it ends up looking kind of shitty. Here is how it looks if I just take out half of the brightest pixels:

    Kind of awful. If you click to enlarge it you can see how individual pixels end up being pulled out of solid spots of colour. The fade ends up looking super pixely, like something from the 80s. Another problem is that all the black pixels just disappear all at once at the very end of the fade.

    This is pretty bad but it was a good enough idea to start with. Sarah and I happened to be in Nice with our friend Marc ten Bosch while I was working on this and while we were all walking along an old aqueduct we discussed how to make it better. We thought about using noise to make the effect more organic but eventually came up with the genius idea to use a blurred mask.

    The shader code to do the bad, pixely effect is something like:

    //get the pixel
    tex ft0, v0, fs1 <2d,repeat,linear,nomip>
    //save a copy of the pixel in ft3
    mov ft3, ft0

    //brightness of a pixel ~= (R+R+B+G+G+G)/6
    mov ft1 ft0.x
    add ft1 ft1 ft0.x
    add ft1 ft1 ft0.y
    add ft1 ft1 ft0.y
    add ft1 ft1 ft0.y
    add ft1 ft1 ft0.z
    div ft1 ft1 fc2
    //ft1 now holds the pixel brightness

    //if the brightness is less than our fade constant (which moves between 0 and 1)
    //then make ft1 = 0, otherwise make it = 1
    sge ft1, fc0, ft1

    //multiply the saved pixel by ft1, which will zero it out if it isn’t
    //darker than our fade constant
    mul oc, ft3, ft1

    Even if you don’t know agal assembly this shouldn’t be too hard to read. Most of the code is getting perceived brightness of the pixel with a formula from some friendly people over on Stack Overflow. All it does is take the brightness, check to see if it’s greater than our fade constant and doesn’t draw the pixel if it is.

    Now, here is the clever trick that makes it look good. Instead of looking at the pixel in the image I look at the pixel of a blurred version of the image. I still draw the pixel of the normal unblurry image but I use a blurred image to decide whether to draw it or not.

    Here’s what the image looks like not faded at all (wonder at the amazing art of Thomas Shahan!):

    And here’s what the blurred image looks like:

    Now, the player never sees this blurred image, only the graphics card does. We use the pixels from this blurred image to decide what pixels to draw from the unblurred image. Only one line of the shader code has to change. We used to do this:

    //get the pixel
    tex ft0, v0, fs1 <2d,repeat,linear,nomip>
    //save a copy of the pixel in ft3
    mov ft3, ft0

    Now we do this:

    //grab the pixel from the blurry image to check the brightness
    tex ft0, v0, fs1 <2d,repeat,linear,nomip>
    //grab the pixel from the unblurred image to actually draw
    tex ft3, v0, fs0 <2d,repeat,linear,nomip>

    We pass both images into the shader and use one as a mask to draw the other. This gives us beautiful unpixely fades that look like this:

    The Map Half Faded

    So that’s how the Incredipede ink fade is done. I admit that there is a little hand-waving magic here. You have to know how to render-to-texture and write custom shaders in Starling. Which is not terribly easy. And you have to be able to blur your image on the fly. The blurring is actually way harder than the ink-fade transition. I based my blurring on the work of Lars Gerckens.

    Mostly I hope this inspired you to try some cool shader tricks of your own! They are pretty fun and you can get some great effects.

    This example is taken from my game Incredipede, if you don’t already know what Incredipede is you can head over to Incredipede.com to check it out.

  • How Do You Play Incredipede?

    Have you been wondering exactly how you play Incredipede? How do you make limbs? How many muscles can you create? Here are some answers for you.

     

    You can get more information about Incredipede as well as pre-order it at Incredipede.com.