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.

The General Idea

To get your libGDX game running on consoles, you need to port your code base to a different language. While (in theory) this can be done manually, a considerably less time-consuming (but technologically complex) way of porting your game is to compile/transpile it to code that can run on your targeted platform. Inspiration can be drawn from libGDX’s Web (see GWT) and iOS (see RoboVM) backends, which already do this.

In addition, you need a custom libGDX backend with bindings for the device in question.

Successful Examples

There are a couple of games, which have successfully done this in the past:

Different Approaches & Other Resources

  • TheLogicMaster has a working PoC of a Nintendo Switch homebrew backend over at SwitchGDX, which uses a custom fork of CodenameOne’s ParparVM
  • IKVM (which was used by libGDX in the past) could prove as another viable option; see here for IKVM’s current main fork
  • Anuken’s Ark has a SDL backend here; SDL has a working port for Nintendo Switch
  • GWT/TeaVM could be used to transpile code to Javascript, which could then be used in a UWP app; see here and here for some thoughts on this approach
  • A similar goal is being pursued by the mini2Dx project.