Skip to content

tommyettinger/tantrum

Repository files navigation

tantrum

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

This lets Fury (currently 0.5.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.

  • tantrum-libgdx is at version 1.12.1.1, compatible with libGDX 1.12.1
  • tantrum-digital is at version 0.4.8.1, compatible with digital 0.4.8
  • tantrum-jdkgdxds is at version 1.5.4.0, compatible with jdkgdxds 1.5.4
  • tantrum-regexodus is at version 0.1.15.1, compatible with RegExodus 0.1.15

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, 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.

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.1"

tantrum-digital:

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

tantrum-jdkgdxds:

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

tantrum-regexodus:

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

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.1</version>
</dependency>

tantrum-digital:

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

tantrum-jdkgdxds:

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

tantrum-regexodus:

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

Most likely, you won't need this, and should use juniper 0.6.1 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.

About

Fury ser/deser for "tommyettinger libraries."

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages