Getdown

Getdown is a deployment library like Java Web Start, which provides also an integrated update process for your game. It was started to replace Java Web Start based on the premise that using Java Web Start has a lot of downsides. Getdown is mainly designed to launch games in the desktop like Java Web Start does, aditionally, it creates an installation folder structure and a launch icon on your desktop if you want.

We've talked about it a bit on our deployment ways blog post, but now we are making a deeper article based on the experience from testing it a bit with one of our games.

Getdown library is used as a game's launcher, which updates your game by downloading all required specified resources before the game starts.

You could use the getdown applet to perform all download and installation process from a web browser or you could create a platform specific installer and, after the game's launcher is installed as a desktop application, derive to it the rest of the process.

It uses a text file named getdown.txt to configure all your application needed resources, natives, custom jvm parameters, etc, and a digest.txt file to check integrity of all downloaded resources before launching the game. If you deploy it as the getdown applet, then you need to sign the digest.txt file with the same certificate used to sign the getdown.jar in order to run the applet with privileges. Here is the getdown.txt of Puzzle Pirates as an example.

Pros

  • It uses a single file to configure the application in a similar fashion Java Web Start does with the JNLP file, with some extra options. This is good because it is independent from the deployment option used, you can use the installer or the browser applet and use the same configuration file.
  • Provides a way to specify platform specific resources to be downloaded only if you run the game on that platform.
  • The loading screen is customizable like the LWJGL Applet Loader. Java Web Start provides a way to customize loading screen but you need at least Java update 18 (haven't tried it yet).
  • It validates all dependencies using the signed digest file. This is very interesting because you only need to sign one file with all the resources digests, without having to sign each file.
  • It provides a way to update your game by downloading a patch and applying it in the client machine. It requires you work with versions to use that feature (docs about versions are not ready yet).
  • Open source project with good documentation.
  • It is being used by professional games.

Cons

  • It only uses RSA for the certificate private key, so if you already own another type of private key it will not work.
  • Doesn't handle pack200-gzip encoding and stuff. It doesn't even have a way to force to download a .pack.gz either, like the LWJGL Applet Loader does.
  • It is very slow for checking files to download info, like the LWJGL Applet Loader it is not using concurrent HTTP requests for that. Java Web Start and New Generation Plug-in Applets does and it starts faster.

Note: we don't know exactly how it is doing all the cache stuff, from the wiki page it seems like it doesn't use Java Web Start cache, but from the practice it seems it is using it. It seems to be a bug, for that reason we didn't want to comment the cache stuff in the pros/cons section.

The Getdown developers have a lot of other useful libraries for Games development, take a look at them at Three Rings code page. Some games using Getdown are Pets Vs. Monsters from Sweet Robot, Puzzle Pirates, Bang! Howdy, Spiral Knights from Three Rings and Tribal Trouble 2 from Oddlabs.

We have one game deployed using getdown to test it, however if you accepted our certificate before, it will ask to accept again as it is using a new one because the second cons we mentioned before. If you want to test it, click here.

Conclusion

The user experience when playing a game deployed using Getdown with a customized loading screen is really professional and it feels like you are playing a non Java Game (hate to say that, but we can't avoid bad Java preconceptions).

References

UPDATE: added a new entry in the pros section about an update game feature by applying a patch

VN:F [1.9.22_1171]
Rating: 0.0/5 (0 votes cast)

Ways to deploy a Java Game

When you develop Java games for PC, you have different ways to deploy them. We want to talk a bit about some of them.

Downloadable

The user has to download the game to run it on his machine, probably it comes with an installer to install the game before he can play it.

Pros

  • The game can be played offline when it has no online requirements.
  • User knows where the game is installed and sometimes decides where he wants to install it. They also can uninstall the game.
  • It is the only way to deploy a game in portals like Steam, Altitude Game is an example of that.

Cons

  • Users have to download a patch each time there is a new version. As a developer, you can implement something to download patches and apply them.
  • As a developer, you have to implement an installer. Also, you have to make different installers for each platform, an example of that is Revenge of the Titans (ROTT) from Puppy Games.
  • You have to create patches and deploy new files to be downloaded each time you have a new version of the game after a bug fix or new feature. Else, you force people to download large files each time you have an updated version.
  • Java Runtime Environment (JRE) must be installed or you have to embed JRE with your game. In the second case, your game file becomes bigger, for larger games that is not a problem but for small games embedded JRE could be, for example, 300% of the game size (at today, JRE weight is about 20MB). Even though there could be a JRE installed, being able to execute your program directly depends on a good configuration of the JRE within the OS. To solve that, developers usually generate a native wrapper that detects where the installed JRE is, and if it is not installed prompts the user to download one, or reports the error to the user.

Applets

Java Applets works inside the browser, as well as other web technologies like Flash and Unity. Users only have to open a page with a Java Applet inside and it is loaded by the web browser. Minecraft is an example of a successful Java Applet Game (it has other deployment options as well).

Pros

  • Users only have to follow a link to play the game. No game install is required.
  • Users are always playing the latest game version, because it is being downloaded from the server.
  • As other web technologies, you can add information or even ads to your applet page without having to put that inside the game.
  • Java Applets are as powerful as a Java Desktop application.
  • New Generation Java Applets accepts Java Networking Launching Protocol (JNLP) files (more info on next blog posts).
  • Pack200 and GZip compression support to reduce jar download sizes (only using plugin2).

Cons

  • JRE must be installed on the client machine. However, nowadays you can assume the required plugin is installed on most of the client machines.
  • You need a web server to deploy your game jars or you have to use a games portal like GameJolt or Games4j.
  • Dependning on the Java Applet technology you are using (plugin2, etc), firefox can freeze when the applet is loading, or could not work on Mac OS (more information on next blog posts).
  • As a developer, you need to sign your jars with a certificate if you want to have full access (to do extra stuff like writing a configuration file on user's home folder).
  • If you ask for full access, a security dialog box is displayed. It tends to scare users, if you have a valid certificate then it is a bit less scary.

Web Start

Java Web Start is some kind of mixing between the last two. As developer you use a JNLP file to describe which resources must be downloaded. Users only have to click on a JNLP link and then the game is opened automatically by Java Web Start.

Pros

  • Users only have to follow a link to play the game. No game install is required.
  • Automatically downloads the latest version of your game from the server each time the user wants to play a game.
  • It has a cache for downloaded resources, so if you only update one jar then it is the only one downloaded by the user's machine the next time the user opens the game.
  • As a developer you can specify to run the game offline.
  • It has a clean way to specify your game's resources using the JNLP file.
  • Pack200 and GZip compression support to reduce jar download sizes.

Cons

  • Some browsers are not configured correctly (for example, Google Chrome) and they don't open the JNLP automatically using Java Webstart, they just download the file.
  • Same thing with certificates and signing as the Java Applet.
  • As a developer you need a web server to put all your game's resources, we don't know any portal which accepts JNLP games yet.
  • Java Webstart Cache and Log files are difficult to find on user's machine.

Getdown

Getdown is a custom solution made by Three Rings in order to replace Java Web Start technology due to its limitations, as it is explained on Getdown's project Wiki. We lack experience and information about this solution, so the pros/cons section could be a bit empty.

Pros

  • Open source, that means you know what is happening, and you can collaborate, something impossible with Java Web Start.
  • Working examples of mmo games like Sprial Knights from Three Rigns and Tribal Trouble 2 from Oddlabs.

Cons

  • It is custom made. That means, as a developer you have to be aware that if something goes wrong you may have no support (note the conditional). But can't say it is really a cons because with Java Web Start you don't have any support at all from Oracle's team.

References

  1. Altitude Game - http://altitudegame.com/
  2. GameJolt - http://gamejolt.com/
  3. Games4j - http://games4j.com
  4. Getdown - http://code.google.com/p/getdown/
  5. Java Plug-In Technology - http://www.oracle.com/technetwork/java/index-jsp-141438.html
  6. Minecraft - http://www.minecraft.net/
  7. Oddlabs - http://oddlabs.com/
  8. Pack200 - http://download.oracle.com/javase/1.5.0/docs/guide/deployment/deployment-guide/pack200.html
  9. Puppy Games - http://www.puppygames.net/
  10. Revenge of the Titans - http://www.puppygames.net/revenge-of-the-titans/
  11. Sprial Knights - http://spiralknights.com/
  12. Steam - http://store.steampowered.com/
  13. Three Rings - http://www.threerings.net
  14. LWJGL Wiki - http://www.lwjgl.org/wiki/index.php?title=General_FAQ#Distributing_LWJGL_Applications

UPDATE: added link to LWJGL wiki page about how to distribute LWJGL Java Applications (most of them applies for Java Applications in general)

VN:F [1.9.22_1171]
Rating: 5.0/5 (1 vote cast)