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.


  1. Hi there! Sorry if this is the wrong place, but I couldn't find anywhere else that didn't require either facebook or twitter to report a bug.

    I can't launch the game on my linux bumblebee-enabled laptop. Bumblebee is graphics-switching software allowing me to use an nvidia optimus graphics card by doing all the rendering on the card and pushing it to screen :8 on X, which is then handled normally. When trying to run JustTactics I get this:

    [VGL] ERROR: Could not open display :8.

    Only game I've had (including minecraft, which is also java) which has this happen.

    1. Hi James,

      First off, sorry about the support email not being up on the website. We've added a mailto link on the front page.

      Next: nVidia Optimus.

      Optimus support in Just Tactics is actually a problem we've been working on. I suspect that it's related to our particular usage of OpenGL. In fact, our problems with Optimus are probably rooted in the same errors that prevent Just Tactics from running on OSX at the moment.

      Basically, we're using a mixed mode of OpenGL where advanced shader features (GLSL 1.5) are supported, but vertex attribute and framebuffer setup is retained from the deprecated OpenGL 2 defaults. Standard, single-card configurations on Windows and Linux tolerate this mixed mode, but the OSX drivers do not; and apparently, neither do the Optimus drivers.

      Unfortunately, I didn't discover these problems until fairly recently when we purchased some Apple hardware for testing. This defect has been at a low priority for us because fixing it requires rewriting the jMonkeyEngine renderer code to fully comply with OpenGL 3.2. During that rewrite, I will be unavailable to improve gameplay or fix bugs. I'm the only hacker here.

      Nonetheless, we've escalated the priority, and I will be starting on the rewrite on Monday. I suspect that it will take me several weeks to make the necessary changes without disturbing all the work we've already done.

      P.S. - to any JME folks dropping through, I promise you can have the renderer when I'm done.

  2. Hey James,

    I just did some research in preparation of replicating your bug.

    If you browse over to the bumblebee troubleshooting wiki, you can see that the problem is listed.

    It says:
    [VGL] ERROR: Could not open display :8 with certain programs

    Some programs quit optirun by running detached. Workaround: run a shell with optirun and start the program from that shell:

    optirun bash
    $ yourprogram

    When done, you can exit the shell with exit. The idea is to keep at least one optirun instance running.

    This is the likely culprit because Just Tactics spawns multiple processes in order to run the updates, the chat client, and the game client.

    I hope this helps!