Homebrew SwitchGDX: A LibGDX Switch Backend

TheLogicMaster

Active Member
OP
Newcomer
Joined
Dec 28, 2021
Messages
38
Trophies
0
Age
23
XP
483
Country
United States
This is a Nintendo Switch homebrew and Xbox/UWP backend for the cross-platform Java game framework, LibGDX. This is accomplished using a Java to C++ transpiler. It uses a custom, stripped down Java runtime library that provides the APIs needed by the framework and the accompanying native code to provide features like file system access. LibGDX provides platform agnostic APIs for OpenGL based graphics, audio, networking, and input, which are mapped by this backend to the Switch using SDL and LibNX.

Features
  • Full LibGDX library
  • Music and sound effects
  • Controller input
  • OpenGL GLES20 based graphics
  • Java 7 support plus Java 8 features
  • One click NXLink deployment with standard out redirection
  • Desktop application builds for debugging
  • Xbox/UWP targets
  • File I/O
  • Box2D
  • FreeType

Links
Source code and documentation
: https://github.com/TheLogicMaster/switch-gdx
Java to C++ transpiler: https://github.com/TheLogicMaster/clearwing-vm
LibGDX compatibility: https://github.com/TheLogicMaster/switch-gdx/blob/master/TESTS.md

Screenshots
ShatteredPixel.png

Screenshot_20220527_005111.png
PixelWheels_screenshot_gameplay.png

yellow1.png
 
Last edited by TheLogicMaster,

TheLogicMaster

Active Member
OP
Newcomer
Joined
Dec 28, 2021
Messages
38
Trophies
0
Age
23
XP
483
Country
United States
I wonder if we can have vulkan api backend by using this method.
This backend contains a Java wrapper around the GLAD based GLES20 bindings since that's what LibGDX requires, but making a similar wrapper for deko3d, for instance, would be pretty straightforward. Probably wouldn't be very useful without bindings for the rest of LibNX, though. This project is primarily based around the abstraction layer that LibGDX uses for making cross platform games, but the Java to C transpiler it's based on is portable and could be used to make a generic Java homebrew framework.
 

TheLogicMaster

Active Member
OP
Newcomer
Joined
Dec 28, 2021
Messages
38
Trophies
0
Age
23
XP
483
Country
United States
Will those nokia NGage java games work too like Space Impact?
More power LM
Those seem to be based off of J2ME, so making something similar to J2ME-Loader should be possible, but definitely out of the scope of this project. This project mainly converts Java bytecode to C then provides enough of the standard runtime library for games to run, with bindings for things like OpenGL and SDL input. Most of the work takes place at compile time, so each game would have to be transpiled beforehand, rather than the typical homebrew scheme of just popping them onto the SD card. The main challenge would likely be in supporting the J2ME runtime, to provide support for all of the graphics and other I/O that the games require.
 

TheLogicMaster

Active Member
OP
Newcomer
Joined
Dec 28, 2021
Messages
38
Trophies
0
Age
23
XP
483
Country
United States
Thank you so much for the port!..

Btw, is there any way to use the stick (Left Stick) to move the character? Would very appreciate it!
Yep, that can definitely be added. The LibGDX core library only has support for controller buttons, so it's just a matter of adding the controllers library then adding a tiny bit of code to map joystick inputs to digital values.
 
  • Like
Reactions: mathew77

Site & Scene News

Popular threads in this forum

General chit-chat
Help Users
  • Xdqwerty @ Xdqwerty:
    It was fun
    +1
  • Xdqwerty @ Xdqwerty:
    Also i'm back at my house
  • Psionic Roshambo @ Psionic Roshambo:
    Smash bros sounds like gay incest lol
    +1
  • BigOnYa @ BigOnYa:
    And Mario Wonder sounds like a Mario with old timers disease walking the streets lost.
    +1
  • K3Nv2 @ K3Nv2:
    Shove a gerbil through a tube
    +2
  • Psionic Roshambo @ Psionic Roshambo:
    Warp pipe Ken lol
    +1
  • K3Nv2 @ K3Nv2:
    Ring actually helped and I didn't have to cuss out the guy in arabic
  • BigOnYa @ BigOnYa:
    They help you delete some incriminating videos?
  • K3Nv2 @ K3Nv2:
    No you asked for proof that your wife was finally leaving
    +1
  • BigOnYa @ BigOnYa:
    Nuh I had her chipped, I always know where she is.
  • K3Nv2 @ K3Nv2:
    I found where it was
    +1
  • Psionic Roshambo @ Psionic Roshambo:
    If I could halucinAte this is what I imagine it would look like?
  • K3Nv2 @ K3Nv2:
    Featuring Taylor swift
    +1
  • BakerMan @ BakerMan:
    guys, pubg should've never blown up
  • BigOnYa @ BigOnYa:
    Wut do you mean? Pubg is alright, I play it with a few buddies online.
  • BakerMan @ BakerMan:
    the game itself is ok, but it's influence is the problem
  • K3Nv2 @ K3Nv2:
    Call of duty is a good Fortnite skin
  • BakerMan @ BakerMan:
    call of duty and fortnite, ex-fucking-actly
  • BakerMan @ BakerMan:
    without pubg popping off, fortnite wouldn't add battle royale, and call of duty wouldn't go even shittier than it did before because of blackout, warzone and dmz
  • Psionic Roshambo @ Psionic Roshambo:
    Make a porn based spoof of it, Pube G
  • BigOnYa @ BigOnYa:
    Just play My Pony online. Its better than Fortnight or COD.
  • Psionic Roshambo @ Psionic Roshambo:
    FPS porn games sound fun lol
    +1
  • K3Nv2 @ K3Nv2:
    Call of duty got close with that by using Nikkie Minaj
    K3Nv2 @ K3Nv2: Call of duty got close with that by using Nikkie Minaj