Entity Tracker

A game debugger of a artemis-odb World state, working over the network. Artemis is an Entity Component Systems framework for games, written in Java.

The Entity Tracker consists of two things:

  1. the library that should be injected to a game - it tracks the ECS World
  2. the external UI displaying all the entities and components

Both communicate over TCP.

To read "what, why, what for?" explanations head over to my blog:
Artemis Entity Tracker - inspecting your game state through network

which is based on a previous (and much simpler) iteration of the Entity Tracker

Source code: https://github.com/Namek/artemis-odb-entity-tracker

Features

Feature Wishlist

Screenshots

Filtering entities by component type and picking components
Changing values of component fields
Additional layout mode for a lot of component types

Technical awesomeness

It has totally custom homemade Java serializer which deserializes into a Value Tree structure, similar to JSON but binary. It doesn't deserialize into original in-game types because the UI doesn't have them. Thus, the serializer on the Library side does not need any configuration besides injecting the EntityTracker object into the Artemis World. However, it keeps information about types of classes and fields so it's something more than JSON.

It's written in Kotlin. The library compiles to Java lib, the UI builds into a HTML + JavaScript.

The hard parts

The story of huge refactor

Originally, the interface was made with Java Swing.

Swing was buggy, took lots of time on every small change in layout design and the internals of the Java Swing seemed to create lots of memory garbage. I was somewhat OK with performance only for a small projects. However, I totally didn't felt OK with the speed of development. I wished for declarative UI. So I did few things:

Now the speed of development seems not much better since we have a almost-declarative UI in an imperative language. The biggest drawback though, is the Kotlin to JavaScript compilation, it's just pretty slow as for Kotlin 1.3.50.