Category Archives: Dev Blog

Valley of Bones Global Server List!

One of the more pressing items on my list of “things to do before releasing VoB on the Play store” is to set up a global server list such that “public” servers can be discovered by clients. This way, to try the game out against other humans, you don’t have to convince them to play with you, help them install the game, and set up your own server.

This is a cool problem, because it gave me an opportunity to create a REST API and learn about how to deploy apps on Heroku. At any rate, the first iteration of the API supports the following features:

  • Public servers POST to /server to let the app know they are online
  • Public servers DELETE to /server/:id before closing to let the app know they are offline
  • Public servers POST to /game when a game is complete and upload a json document containing all the actions taken during that game and the result (anonymous for now)
  • Clients GET / to receive a list of active servers
  • GET /game retrieves a list of all games played

Right now the implementation is extremely simple, the posted games are the only ‘persistent’ item, so if the app sleeps, the server list is lost, but the games remain in a PostgreSQL DB. I’m really excited by this, as I think it will provide an opportunity going forward to adjust game balance based on real data rather than what “feels” right.

I intend to add more detailed server info, such as how many people are currently on the server and whether the server is waiting for the game to start or the game is underway. Once that occurs, the sleeping problem will go away on its own. In the meantime, active public servers send a GET request to / every half hour to prevent sleeping.

I also morphed the ValleyOfBonesServer into a server management tool. Instead of simply spawning one server when started and closing it when closed, the Server can now spawn multiple servers on different ports, each of which can be “public” (listed on the global server) or not and can be monitored and killed individually.

For the moment, I’ve created two AHS Gaming servers that should be up pretty much 24/7 – now that it’s cold outside, running my desktop constantly helps heat the apartment instead of wasting energy like during the summer.

Maybe next week I’ll have a cool graph or something to show from the game data collected so far.

Oh, and I almost forgot – I added a new unit:

Light Mech

Light Mech

Meet the Light Mech. It will probably be the namesake of the next VoB release, and is intended to be a slightly cheaper mech unit for a more specific anti-personnel function. I have a few other unit changes that might be coming soon, so keep on the lookout.

Download Valley of Bones (Source)

Valley of Bones for Android Coming Soon

Last post I gave a run-down of some of the performance issues I ran into with Cordova/Canvas on Android. While I’m sure newer hardware would probably have no problem, since my poor phone is ancient and, obviously, I’m stuck with it until I get a new one, I decided to give the ol’ LibGDX a try.

Luckily, unlike my cell lines, Java code doesn’t go bad if left unattended for a few months, so a little configuring and adding libraries and I was off to the races deploying to the android emulator. And…2fps. Better than cordova, and there’s quite a bit more going on, but still, that’s obviously unacceptable. It was a little better on my phone, but not by much. Undeterred, I spent most of my spare time during the Thanksgiving holiday optimizing and trying various things to squeeze a few more fps out.

I learned some valuable things, like how to trace processes on Android, etc, and I learned a few valuable lessons:

1. If something didn’t change since the last frame, don’t update it!

2. That goes doubly for the map. Seriously.

3. LibGDX’s stage2d is a little slow, so I used it sparingly (ie: only for the UI). To be fair, most of my improvements were due to not updating things every frame.

4. (Edit: added this) Also, changing all the texturefilters from Linear,Linear to Nearest,Nearest helped a lot (probably can go to MipMapLinearNearest for the min filter).

With all that, I’m up to ~20fps on the emulator and ~50fps on my phone, which is much better, to say the least.

I’m now working on cleaning up the UI to be (a) more awesome and (b) look better on the variety of screen sizes. Right now, being a debug build, I’m mostly focused on making sure everything is readable/touchable on small devices. Hopefully I’ll have an apk ready for people to try in a week or two.

Screenshot from 2013-12-04 17:46:04

New UI!

Download the latest build!

Apache Cordova for Games?

So, I’ve been intrigued recently by the idea of using Apache Cordova to write android games using HTML5. I decided that perhaps Valley of Bones would be more awesome as a cross platform browser/android game, and that I should rewrite it in CoffeeScript.

After making some good progress on the UI, I decided to see how it fares on Android using Cordova.

First, I tried the emulator via cordova… ~.25fps. Yikes! But, it’s just the emulator, real hardware should be better…

So, I tried my phone, admittedly not the greatest hardware (LG Enlighten running 2.3.4), but it can still play things like fruit ninja well enough. Through Cordova? 7fps. Better, but still, ugh. This is after disabling the performance hogging colorfilters/cache redraws that I was using to shade the map. Through the browser? Still 7fps.

I’m not sure what I’m going to do just yet. One option is to switch away from EaselJS and Canvas and go to a pure HTML5/CSS3 layout. Possible, though I will lose some of the awesomeness of canvas. A more conservative option would be to stick with EaselJS and only update when something changes. The problem is that the poor fps still means that dragging the map around is laggy.

A final option is to go back to LibGDX. Maybe the web exporter is good enough to give decent desktop/browser results. I guess I could always have a web version and a Desktop/phone version. That’s annoying, but if its all I have…

Anyway, I’ll post some more updates when I figure something out.


Cats vs Zombies Post-Mortem (GameJolt Contest 10)

As promised, I’m going to blog a bit more. One thing I’d like to do is a post-mortem for my GameJolt contest 10 game, Cats vs Zombies.

I blogged a bit along the way, so I don’t want to spend a lot of time rehashing those things as you can read them here:

I initially planned lots of features that ended up getting cut, probably the biggest reach, and the one that the ‘MD5sum craziness’ post is about – using the GJAPI to store player data. I had planned to use persistence through the GJAPI to award trophies, track card collections, etc and implement randomly generated levels for the players to play through. None of that made it in though, for one big reason…

Getting the interface right! I started out using the CreateJS library and HTML5 canvas. This works really well for games that have moving parts independent of user input, such as Space Domination. However, it may not be the right tool for something as simple as a card game like Cats vs Zombies. Unfortunately, I didn’t figure that out until sometime around Day 4, so I spent a significant amount of time completely revamping the structure of the game into HTML5/CSS3/jQuery.

That said, I’m quite happy with what came out, and I think I learned some valuable lessons about how to design games and how to ship a product.

What went right:

  • The basic gameplay mechanic is fun, IMHO
  • Submitted a game before the deadline (albeit incomplete)
  • CSS3-based interface is awesome!

What went wrong:

  • ‘Story line’ was hacked together at the end, basically an afterthought
  • No time for balancing
  • Didn’t quite get the deck building tool ready for the contest deadline

Play Cats vs Zombies!

Epic comeback win in the latest Valley of Bones build!

Pixel and I face off in the latest build of Valley of Bones (with control points!), and despite being pinned down at my base for most of the match, I pull off a stunning upset!

Watch the clip on

As you can see, the development of Valley of Bones is coming along quite nicely, I’ve added a new “Sniper” unit and I’m currently experimenting with control points (the towers in the video above). So far, I think the game is quite fun and interesting, but I suppose I might be biased.

Anyway, the control points build is in the nightlies (still experimental) here.

And you can also check out the “weekly” stable release here, though it doesn’t include the control points.

Until next time!

April 1GAM: Valley of Bones

Remember that one time I said I was going to stop releasing a new game every month and focus on iterating on one game? I lied. Or maybe was just “mistaken.” Technically, I did spend some time iterating on Legend of Rogue the first couple weeks of April. Then, with the Ludum Dare coming up I was inspired to take some old code I had laying around for a space RTS and do a massive overhaul to turn it into a small multiplayer turn based strategy game. I’m pretty happy with the result, which I call “Valley of Bones:”

Valley of Bones

Valley of Bones

Again, I’m planning to further develop this in May, but who knows when and how inspiration will strike, so no promises! Anyway, the game is quite simple: you start with a home base that looks very much like a castle. The base provides an income of $100 per turn and allows 15 supply (you can see your current money/supply in the top right corner). On your turn, you may build, move, and attack with units in any order you’d like, though you only have 1 minute to do so.

If you select a unit, an information panel will pop up at the bottom of the screen to show the unit stats including:

  • hospital-cross health
  • crossed-swords attack damage
  • archery-target range
  • checked-shield armor
  • radial-balance moves per turn
  • rune-sword attacks remaining this turn
  • walking-boot moves remaining this turn

Those last two symbols also appear on the unit itself when there are attacks or moves remaining that turn – to make it easier to tell which units you can still work with.

If you press ‘b’ or click on gear-hammer in the lower left corner, this will bring up the build menu, which only displays building options that you can currently use. Mouse over these options to see the money and supply costs.

The game ends when one player destroys the other player’s home base. To play multiplayer, one player or the other will also need to run the server that is packaged with the game.

I’ll try to write up another post this week detailing my future plans for the game.


Download Valley of Bones

1GAM January: UberBlocks 2

All right, so this is a few days late. But in my defense, I didn’t decide to participate in the 1GAM challenge until January 30! So without further ado, I give you my January submission: UberBlocks 2.

UberBlocks 2, the successor to UberBlocks (written back in the day…2006ish? Maybe I’ll post it someday as well for nostalgia) is a falling blocks game of epic proportions! It’s written in Java using the LibGDX library. And a special thanks goes out to who released the pixelated font that I used. Also I should mention that I actually had this mostly finished in Python awhile back, but ported it to Java and changed the way the blocks fall (smoothly rather than an entire tile all at once) which gave me some fun times adjusting the collision detection to work exactly like I wanted it to. Download the game or grab the source. Controls are standard: left/right/down move and up rotates counter-clockwise.



Charity Game Jam Entry: Unmei & The Princess

Well, it took me a little more time than was technically allotted for the jam, but I managed to polish off a submission for the Charity Game Jam. The theme was 8-bit NES-style retro games, so without further ado, I give you Unmei & The Princess:

Title Screen

I’ll do a more in-depth post-mortem type post later. For now, let me just say that the game jam was lots of fun, and it looks like it was a smashing success to raise money for the Make A Wish foundation. Enjoy the game!

Charity Game Jam

Well, I’m going to participate in my first game jam…and for charity!

The guys over at Ludum Dare have organized a mini-competition to create games as a benefit for the Make-A-Wish foundation and Kiva (micro loans for small businesses in impoverished areas). If you’re interested in participating, donating, or playing the submitted games, check out:

Oh, did I mention the theme is 8-bit retro (NES-style) games? Pretty cool.

I’ll probably tweet with updates on my progress.

NetPong Screens and Update

Well, I basically got a skeleton of NetPong working, then I decided that, in the interest of developing a better understanding, I should rework it to use more features of LibGdx. Anyway, I promised screenshots, so here are some of the newer, prettier (though not yet complete) version:

Main Menu

NetPong Main Menu

Multiplayer Setup

Multiplayer Setup

Game view

Game View