Home

Awesome

tantrum

A little bit of Fury for various libGDX-related libraries.

This lets Fury (currently 0.9.0) de/serialize objects from libGDX and several other libraries in its "tangential ecosystem." These other libraries are RegExodus, digital, and jdkgdxds; none of these three directly depend on libGDX, but all have been designed to be compatible with it.

This repo is modeled after kryo-more. There is a kryo-more sub-library for an older version of simple-graphs and the current version of gand, but gand mostly replaces what simple-graphs does while enabling serialization, and gand also doesn't need any external code to be able to use Fury. Similarly, there is a kryo-more sub-library for cringe and for juniper, but they aren't needed here because any types in cringe or juniper can be read and written without needing a Serializer.

How to get

Each sub-library has its own version, linked to the version of the library it de/serializes. The last component of the version is usually .0, but can be increased for bug-fixes to the same linked library version, or if Fury itself had a (compatible) update available but the linked library did not have an update.

There's also the older tantrum-juniper, which is at version 0.6.0.0, and is compatible with juniper 0.6.0. It isn't needed if you use any more-recent versions of juniper, such as 0.6.1 or higher (current is at least 0.6.2), since juniper uses the no-dependency-needed Externalizable interface that Fury can understand.

In version 1.12.1.1, tantrum-libgdx expanded to cover substantially more libGDX classes, from Color to OrientedBoundingBox. If a class you need isn't covered, you can first read the sources here to see if writing a serializer yourself is feasible, and of not, you can post an issue here requesting any classes that aren't present. Some classes may not be possible to serialize reasonably, such as ones that use private or package-private modifiers excessively without providing getters.

Even though libGDX 1.13.0 has been released, there are some lingering issues, some not even related to libGDX code, that may make requiring the latest libGDX version a bad idea. 1.12.1.6 works if you're using libGDX 1.12.1 or 1.13.0 .

All of these sub-libraries depend on Java 8, and will work with higher versions as well.

Gradle dependency info:

tantrum-libgdx:

implementation "com.github.tommyettinger:tantrum-libgdx:1.12.1.6"

tantrum-digital:

implementation "com.github.tommyettinger:tantrum-digital:0.5.4.6"

tantrum-jdkgdxds:

implementation "com.github.tommyettinger:tantrum-jdkgdxds:1.7.2.6"

tantrum-regexodus:

implementation "com.github.tommyettinger:tantrum-regexodus:0.1.16.6"

Most likely, you won't need this, and should use juniper 0.6.1 instead:

tantrum-juniper:

implementation "com.github.tommyettinger:tantrum-juniper:0.6.0.0"

Maven dependency info:

tantrum-libgdx:

<dependency>
  <groupId>com.github.tommyettinger</groupId>
  <artifactId>tantrum-libgdx</artifactId>
  <version>1.12.1.6</version>
</dependency>

tantrum-digital:

<dependency>
  <groupId>com.github.tommyettinger</groupId>
  <artifactId>tantrum-digital</artifactId>
  <version>0.5.4.6</version>
</dependency>

tantrum-jdkgdxds:

<dependency>
  <groupId>com.github.tommyettinger</groupId>
  <artifactId>tantrum-jdkgdxds</artifactId>
  <version>1.7.2.6</version>
</dependency>

tantrum-regexodus:

<dependency>
  <groupId>com.github.tommyettinger</groupId>
  <artifactId>tantrum-regexodus</artifactId>
  <version>0.1.16.6</version>
</dependency>

Most likely, you won't need this, and should use juniper 0.6.2 instead:

tantrum-juniper:

<dependency>
  <groupId>com.github.tommyettinger</groupId>
  <artifactId>tantrum-juniper</artifactId>
  <version>0.6.0.0</version>
</dependency>

GWT

GWT is not supported because Fury doesn't support it. You can use libGDX Json on GWT; all the libraries here (except libGDX itself) are supported by jdkgdxds-interop with Json.

Like how they support Fury without needing externally-defined Serializers, you can just use cringe and gand with libGDX Json natively, since they have classes that implement Json.Serializable. You do need jdkgdxds-interop to serialize juniper classes to JSON, though.

License

Apache 2.0, see the LICENSE file.