libgdx

Android/Desktop/iOS/HTML5 game development framework.

License

License

GroupId

GroupId

com.github.tommyettinger
ArtifactId

ArtifactId

gdx-backend-jglfw
Last Version

Last Version

1.912.0
Release Date

Release Date

Type

Type

jar
Description

Description

libgdx
Android/Desktop/iOS/HTML5 game development framework.
Project URL

Project URL

http://libgdx.badlogicgames.com
Source Code Management

Source Code Management

https://github.com/tommyettinger/gdx-backends

Download gdx-backend-jglfw

How to add to project

<!-- https://jarcasting.com/artifacts/com.github.tommyettinger/gdx-backend-jglfw/ -->
<dependency>
    <groupId>com.github.tommyettinger</groupId>
    <artifactId>gdx-backend-jglfw</artifactId>
    <version>1.912.0</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.tommyettinger/gdx-backend-jglfw/
implementation 'com.github.tommyettinger:gdx-backend-jglfw:1.912.0'
// https://jarcasting.com/artifacts/com.github.tommyettinger/gdx-backend-jglfw/
implementation ("com.github.tommyettinger:gdx-backend-jglfw:1.912.0")
'com.github.tommyettinger:gdx-backend-jglfw:jar:1.912.0'
<dependency org="com.github.tommyettinger" name="gdx-backend-jglfw" rev="1.912.0">
  <artifact name="gdx-backend-jglfw" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.tommyettinger', module='gdx-backend-jglfw', version='1.912.0')
)
libraryDependencies += "com.github.tommyettinger" % "gdx-backend-jglfw" % "1.912.0"
[com.github.tommyettinger/gdx-backend-jglfw "1.912.0"]

Dependencies

compile (1)

Group / Artifact Type Version
com.badlogicgames.gdx : gdx jar 1.9.12

Project Modules

There are no modules declared in this project.

Backends for libGDX, easy to build

Since we have few regular libGDX releases anymore, it is a problem to fix or extend backend behaviour that can't be overridden. While there's always a way to work around bugs in the core project, this is often not possible in the backends.

This is where this repo comes in.

If you need to change build-in behaviour, but don't manage to get the complete libGDX repo to build, don't want to build your very own version or don't want to use snapshot versions, this repo is what you need. Check my own additions to see what else is changed.

... but you're probably here for GWT 2.9.0, which is available with a backend here.

Your options for using this repo depend on whether you want to make changes to it:

How to build (I want to make changes or control the process)

  • Clone this repo
  • Checkout the revision you need (next paragraph)
  • Type gradlew install
  • Change your project's backend dependency to the one you wish

How to use as a dependency (I want to use a build without making changes)

In case you don't want to change something here yourself, but just want to use some of the additions, you can either use the 1.910.2 stable release (featuring GWT 2.9.0) from the standard Maven Central repository, or use a Jitpack dependency. If you choose JitPack, don't forget to add Jitpack as a repo to your project:

    allprojects {
	    repositories {
		    ...
		    maven { url 'https://jitpack.io' }
	    }
    }

For use with libGDX 1.9.10 core

1.910.0

Checkout branch release/1.910.0 of MrStahlfelge's repo to use this version, or use the following JitPack dependencies for GWT:

       implementation 'com.github.MrStahlfelge.gdx-backends:gdx-backend-gwt:1.910.0'
       implementation 'com.github.MrStahlfelge.gdx-backends:gdx-backend-gwt:1.910.0:sources'

Own additions

  • GWT: Switched to WebAudio, fixes sounds for mobiles too. Original PR by @barkholt. See current PR for more information.
  • GWT: Faster bootstrap process by lazy loading assets. See current PR for more information.
  • GWT: Fixed density problems on mobile with new config setting. See current PR

All of these PRs have been merged as of 1.9.12.

1.910.1

Use MrStahlfelge's repo, with these JitPack dependencies for GWT:

      implementation 'com.github.MrStahlfelge.gdx-backends:gdx-backend-gwt:master-SNAPSHOT'
      implementation 'com.github.MrStahlfelge.gdx-backends:gdx-backend-gwt:master-SNAPSHOT:sources'

Own additions:

  • GWT: Fix for getPeripheralAvailable reporting accelerometer present on desktop. Pending PR
  • GWT: Pulled feature policy implementation by @SimonIT. Pending PR
  • GWT: GWT preferences NPE fix by @SimonIT. Pending PR

All of these PRs have been merged as of 1.9.12.

1.910.2

Checkout the tag v1.910.2 of this repo to use this version, or use one of the following sets of dependencies for GWT:

Maven Central (uses the repository mavenCentral(), which most projects already have):

      implementation 'com.github.tommyettinger:gdx-backend-gwt:1.910.2'
      implementation 'com.github.tommyettinger:gdx-backend-gwt:1.910.2:sources'

JitPack (needs the JitPack repository given above):

      implementation 'com.github.tommyettinger.gdx-backends:gdx-backend-gwt:v1.910.2'
      implementation 'com.github.tommyettinger.gdx-backends:gdx-backend-gwt:v1.910.2:sources'

If Maven Central is down, you can switch to JitPack, or vice versa; the files should be equivalent.

This supports GWT 2.9.0 (see the GWT 2.9.0 section below).

For use with 1.9.11

1.911.2

Checkout the tag v1.911.2 of this repo to use this version, or use one of the following sets of dependencies for GWT:

Maven Central (uses the repository mavenCentral(), which most projects already have):

      implementation 'com.github.tommyettinger:gdx-backend-gwt:1.911.2'
      implementation 'com.github.tommyettinger:gdx-backend-gwt:1.911.2:sources'

JitPack (needs the JitPack repository given above):

      implementation 'com.github.tommyettinger.gdx-backends:gdx-backend-gwt:v1.911.2'
      implementation 'com.github.tommyettinger.gdx-backends:gdx-backend-gwt:v1.911.2:sources'

If Maven Central is down, you can switch to JitPack, or vice versa; the files should be equivalent.

(There was a 1.911.1 release, but it had unexpected incompatibility with GWT.)

This supports GWT 2.9.0 (see the GWT 2.9.0 section below).

For use with 1.9.12

Version 1.9.12 of libGDX merges all of MrStahlfelge's additions to the GWT backend, so the only reason to use this unofficial backend is GWT 2.9.0 support.

1.912.0

Checkout the tag v1.912.0 of this repo to use this version, or use one of the following sets of dependencies for GWT:

Maven Central (uses the repository mavenCentral(), which most projects already have):

      implementation 'com.github.tommyettinger:gdx-backend-gwt:1.912.0'
      implementation 'com.github.tommyettinger:gdx-backend-gwt:1.912.0:sources'

JitPack (needs the JitPack repository given above):

      implementation 'com.github.tommyettinger.gdx-backends:gdx-backend-gwt:v1.912.0'
      implementation 'com.github.tommyettinger.gdx-backends:gdx-backend-gwt:v1.912.0:sources'

This supports GWT 2.9.0 (see the GWT 2.9.0 section below).

1.912.1-SNAPSHOT

Checkout the master branch, or use the following JitPack dependencies for GWT:

      implementation 'com.github.tommyettinger.gdx-backends:gdx-backend-gwt:master-SNAPSHOT'
      implementation 'com.github.tommyettinger.gdx-backends:gdx-backend-gwt:master-SNAPSHOT:sources'

This supports GWT 2.9.0 (see the GWT 2.9.0 section below).

GWT 2.9.0 Support

Most of these versions have been updated to use GWT 2.9.0; this benefits from some changes in users' build.gradle files, but should still work without changes as long as no other GWT versions are in use.

However, upgrading to GWT 2.9.0 needs a few changes if you want to take full advantage of the new Java 11 features it permits. It also requires any dependency on GWT 2.8.2 to be changed to 2.9.0. If you use GWT 2.9.0 anywhere, you have to use it everywhere; that's why the backend needs to be changed and not just your code.

  • Change language level to 11 in core, html, and anywhere else that you want to use features like var: where sourceCompatibility is set in build.gradle files, change it to sourceCompatibility = 11
  • Change GWT's source level to 11 as a special requirement: inside the gwt block in the html/build.gradle file, add this line after the compiler settings: sourceLevel = 1.11
  • Make sure your Gradle and/or IDE settings are configured to use JDK 11 or newer. This isn't done automatically.
  • The version for your GWT Gradle plugin may or may not matter, but so far this has been tested only on the most recent version, org.wisepersist:gwt-gradle-plugin:1.0.13 ; gdx-liftoff stores the plugin version in gwtPluginVersion in gradle.properties, so you can change it there to 1.0.13 if you use that project generator.

Future work

GWT

  • Move resizable browser window support into the backend, no template hassle any more
  • Electron extensions

Versions

Version
1.912.0
1.911.2
1.911.1
1.910.2
1.100.1
1.100.0