Monday, September 30, 2013

Mark of the Old Ones: Early Days

There hasn't been any activity on this blog in months. But there's been plenty of activity at the Hit the Sticks office. You see, we've been working our asses off on our new project: Mark of the Old Ones.

Here's the capsule description: you play as Thomas Lyle, a surveyor in 1920's Alaska. Thomas suffers a plane crash at the beginning of the game, rendering his legs useless. He's then bonded to a grotesque symbiotic creature with long, powerful tentacles. Gameplay consists of controlling the creature's tentacles to swing about the environment and interact with physical objects in the world. It plays a lot like an upside-down platformer. There's literally nothing out there like it. Go grab the demo at the project page I linked above.

There's no real art in demo game yet; that backdrop is just a concept image. But nonetheless, I want to take this moment to crow about something of which I'm already quite proud.

At its core, Mark of the Old Ones revels in its unique movement mechanic. You swing through the world on a pair of physically modeled multi-jointed limbs. We chose Box2D to provide the core of our simulation due to its robust support for joints and motors.

Layered on top of Box2D is the part I want to talk about: the SquiggleIK Toolkit.

SquiggleIK is the name of our in-house implementation of inverse kinematics. Inverse kinematics (IK for short) is a technology used to create animation in real time. So, instead of an artist creating an animation by hand, the IK system works out the motion just when it's needed, based on some complex math and a target position.

Before I implemented IK, Mark of the Old Ones was based on a simple rope-like movement mechanic. To build momentum, you were simply "thrusted" in the desired direction. It was simple, but it didn't feel "real" in any meaningful way. And because of how non-physical the implementation was, it made it impossible for Thomas to interact with the world in any meaningful way--he couldn't pick up or carry objects, for example.

With SquiggleIK, however, we can keep Thomas 100% in the physical world. SquiggleIK works out ideal motor speeds for each tentacle joint, and Box2D solves the interactions between Thomas, his tentacles, and the environment. The result is that Thomas moves, lifts, pulls, pushes, and swings like a real creature.

The SquiggleIK Toolkit is available for license at our website.

Saturday, May 4, 2013

Testing out LaTeX rendering

Is this thing on?

$$\Delta V = J\Delta\theta$$

Or not? Does ##i## inline work?

Wednesday, April 17, 2013

Updates: 4/17/2013

General changes:

New animation has been added which plays at the end of a match.

Card changes:

'Ditokous Minor' (Attached to Hulugu) has been nerfed from [+2 AT and +4 DF until your next upkeep.  Only target yourself.] to [+2 AT and +2 DF until your next upkeep.  Only target yourself.]

'Orbital Scan' has been buffed from [[Area:3] All units in target area are tagged "revealed".] to [[Area:3] All units in target area are decloaked and tagged "revealed".].

New card 'WASS' [[Area:5] All units in the target area are tagged "revealed".] has been added to the Satellite Deck.

'Null Field' has been buffed from [[Field:3/0] A field that does nothing.] to [[Field:6/0] A field that does nothing.].

New card 'Collimator' [+4 AT and -2 CC until your next upkeep.  Only target yourself.] has been added to the Hulugu and Ortona. 

New card 'Dirty Bomb' [[Area:3] All units in the AoE lose 3 HP instantly. A "-3 HP on your upkeep" effect is attached to each unit.] has been added to the Satellite Deck.

New card 'Nano Swarm' [[Field:3/3] Units in the field gain 3 HP during EVERY upkeep.] has been added to the Satellite Deck.

New card 'WASS' [[Area:5] All units in the target area are tagged "revealed".] has been added to the Satellite Deck.

Unit Changes:

Fairsyke's stats have changed from [HP 35 and VS 8] to [HP 45 and VS 6].

Hulugu has received the card 'Collimator'.

Krav's stats have changed from [HP 30 and VS 7] to [HP 35 and VS 6].

Ortona has received the card 'Collimator'.

Rorion's stats have changed from [HP 20 and VS 6] to [HP 25 and VS 5].

Bug fixes:

Fixed a bug involving -AP cards used during combat.

Friday, December 21, 2012

Just Tactics on OS X?

People keep asking if and when Just Tactics will be available for OS X. And it's a fair question. I figure folks deserve a straight answer.

When we started Just Tactics, we planned to support Mac OS X. We chose Java, with its cross-platform strength, for just that reason. But, things didn't quite come together as we had hoped.

First off, a Macintosh capable of running Just Tactics is a pricey machine, since the game needs a 1GB graphics card. The cheapest option available today is the $2,000 27-inch iMac. That's almost three times as much as my development workstation on Linux, and almost twice as much as one of our artists' Maya workstations running Windows 7. So we didn't buy one early on in the project.

My assumption was that, out of all the libraries and frameworks we were using, OpenGL would be the one to give us the least trouble. Especially if primary development was happening on Linux. And so we planned to buy one of those pricey iMacs when we got closer to our main quality assurance phase. I figured that we'd have plenty of time to fix the little bugs I expected in the periphery.

So we worked on the game for a year. I fiddled to get the rendering system doing identical stuff on Linux and Windows, with both ATI and nVidia cards. I wrote a bunch of GLSL shaders, and modified some of the stock JME shaders. All of that stuff worked fine in the office.

And then we tried Just Tactics on a Mac. Black screen. Didn't work.

The exact reasons why are arcane. But, the short version is this: on Linux and Windows, you can freely mix OpenGL 2.x and 3.x features. On OS X, you cannot. Due mainly to my own inexperience, Just Tactics is not cleanly OpenGL 2 or 3, but a mix.

Fixing Just Tactics so that it's properly OpenGL 3 requires some sophisticated modifications to the JME rendering system. It also requires that we translate a bunch of shader code. And this has to be done in such a way that it doesn't break Linux or Windows support, and in such a way that hundreds of special effects scripts don't have to also be rewritten. Then all of that has to go through quality assurance on three different operating systems. This is at minimum several months of work during which it's virtually impossible for me to maintain or improve the game experience for existing users.

So while it's possible to make Just Tactics work on OS X, we came to the conclusion that it wasn't the best use of our limited resources.

Out of all of the different computers Apple sells at the moment, only 4 iMacs and laptops have a graphics card that will run Just Tactics. It is true that the Mac Pros all have a good enough card, but I don't know anybody with a Mac Pro. None of the machines at the low end of the price range have an acceptable card, and those are the machines that people seem to buy.

For some less anecdotal evidence, have a look at the Steam Mac hardware survey. Only about 14% of Mac gamers have 1024MB or more of video RAM. Given that OS X only makes up only a tiny percentage of the gaming market (about 1% of Steam), and given that only about 14% of those Macs meet our minimum system requirements, it's pretty difficult for us to prioritize the several months of work it would take to bring Just Tactics to OS X.

It isn't 100% off the table. If there's enough demand, we're certainly willing to reconsider the issue. But before you start emailing us, keep in mind that fixing Just Tactics so that it runs on OS X isn't going to change the minimum system requirements. If you have an Apple laptop, and it isn't a top of the line MacBook Pro, OS X support isn't actually going to help you.

Tuesday, December 4, 2012


Yesterday and today we've been putting the finishing touches on our Live Beta release. Here are the highlights.
  • Initial price for a paid account set at $5 US. This will go up as we add more content.
  • Snazzy professional website.
  • Payment integration, so we can take your credit card. We're using Stripe, which makes it as effortless as possible to do safe and secure credit card transactions.
  • Added some initial sound effects. You'll notice movement sounds on a few of the units, as well as a few sounds on card effects.
  • All of the area of effect cards now have visual effects.
  • A base coat texture was added to all the dark units.
  • Several dark units have concept preview versions of the sweet style we're working on for the dark units. Check out the Atropos, Wheeler, and Keres.

Thursday, September 20, 2012

Giving Back

Our first game, Just Tactics, is built on a lot of open source technology. From our graphics engine (jMonkeyEngine 3) to our networking library (kryonet) to our chat client (Spark), Just Tactics would not have been possible without untold hacker-years of labor.

So, we've been sure to give back when we could. Our fork of the jme3 game engine will be available soon (although I'd recommend you go get the real thing instead of ours anyway).

But, for now we have three useful modules available on GitHub. All are available under the BSD license, meaning that you may use them in both closed- and open-source projects.



Alamode is a super-lightweight continuous update framework for Java applications. It requires no server-side infrastructure beyond a standard web server. It quickly scans indexed local files at startup and downloads those that differ from the server's version.

We use alamode to push out updates to the Just Tactics match and chat clients.



Simmons is a thin Java wrapper around native exec()/CreateProcess() functionality. The Java version of exec (Runtime#exec) requires that the parent process manually drain the stdout of the child process. If the parent JVM exits, then the child process will eventually stall out when its output buffer fills up. Simmons offers an exec() that truly separates the parent from the child.

We use simmons to chain between the alamode updater and the Just Tactics chat client. (Bonus nerd points if you catch the joke in the name.)



Sploosh is a pure Java implementation of game-grade fluid dynamics. It uses a vorticity model to compellingly simulate vortices and swirls in the fluid medium. Since the problem is embarrassingly data-parallel, it makes use of all available processor cores to update fluid state in real time. Seriously, you should get hundreds of frames per second with thousands of vortons.

You can see sploosh-based effects throughout Just Tactics, especially in explosions.

Wednesday, September 12, 2012

Customizing a Tinycore Linux Image

In preparing the backend network for our new turn-based strategy game, Just Tactics, we architected it to be able to easily scale up as the game becomes more popular. Step one was designing an automated netboot operating system environment, to allow us to bring up new servers without having to sit through an install procedure, and remove our dependence on mechanical storage devices.

As such a minimal Linux environment, Tinycore provides a great starting point for a low-overhead server, but some applications will inevitably need to be added to the base install. They distribute packages as Tinycore Extensions in compressed .tcz files, and provide some great methods to dynamically load them on boot or as needed. This works great for a desktop or virtual machine appliance, but for a constantly-running server, this provides an unnecessary level of complication and overhead.

Initial Attempt

Initially, we started using the recommended Dynamic Root Filesystem Remastering method. This method decompresses the extensions into a second initial ramdisk, which is loaded by one of the Syslinux bootloaders alongside the tinycore ramdisk. This is how it worked in our environment:
  • TFTP load and boot the tinycore ramdisk
  • mount an nfs share inside the tinycore ramdisk
  • load the secondary ramdisk from the NFS share
We were having problems with consistently mounting the NFS share inside the tinycore ramdisk, so we decided to simplify, and integrate the extensions directly into the primary image.

Final Config

We ended up using the method outlined in this guide to decompress the tinycore image and all relevant extensions, and rebuild it with the additional packages integrated. This way, everything is integrated into the root filesystem, just like it would be with a standard local install.

Download necessary extensions:

All tinycore extensions for the current release are listed here. I manually downloaded extensions for all necessary packages, including the dependencies listed in .dep files.

Unpack extensions:

After installing squashfs-tools, you can unzip each .tcz extension using the following command:
unsquashfs -f filename.tcz
The extensions will be unzipped into a filesystem tree in squashfs-root in the current directory, for example /tmp/squashfs-root

Unpack tinycore:

You will want to unpack tinycore into it's own directory, for example /tmp/tinycore. Unpack the tinycore ramdisk using this command:
sudo zcat tinycore.gz | cpio -i -H newc -d

Merge everything:

To integrate all of the extensions into the base install, you simply copy the uncompressed files into the right place. This will give you one filesystem tree with tinycore files and extensions in the same places. Sudo is necessary to preserve permissions in some of the system files.
sudo cp -Rp /tmp/squashfs-root/* /tmp/tinycore

Recompressing the Tinycore Image:

I use the following commands to update the dynamic linker and build the image. The advdef command  is optional - it simply compresses the image a little more.
sudo ldconfig -r /tmp/tinycore
sudo find | sudo cpio -o -H newc | gzip -2 > /tmp/tinycore.gz
cd /tmp && advdef -z4 tinycore.gz

Additional References:
Integrating Extensions into an ISO