Console support?

Console support for libGDX is a hotly debated topic. This page tries to give a broad overview of how you might go about getting your game to work on your favourite consoles, including Xbox, PlayStation and Nintendo Switch.

Porting the Code Base Manually

A straight-forward, but quite time-consuming approach of getting your libGDX game to run on consoles is to (manually) port your code to a different language & engine. Usually this is done by dedicated teams. Successful examples of this include Slay the Spire as well as Orangepixel’s games (check out his devlogs for more information).

Compiling/Transpiling

A more user-friendly (but technologically complex) way of porting your game is to compile/transpile it to code that can run on your targeted platform. This involves writing a custom backend for the platform in question. Inspiration can be drawn from libGDX’s Web (see GWT) and iOS (see RoboVM) backends, which already do this.

This approach was successfully employed by Robotality to port Pathway to the Nintendo Switch platform. For this, they used a custom fork of RoboVM and their own SDL backend. See here for a short write up.

Other options may include:

  • CodenameOne’s ParparVM; TheLogicMaster has a working PoC for this over at SwitchGDX
  • IKVM (which was used by libGDX in the past) & a SDL backend; see here for IKVM’s main fork and here for Ark’s SDL backend
  • GWT/TeaVM -> UWP; see here and here
  • A similar goal is being pursued by the mini2Dx project.