1

libGDX Json converts Enums to strings and therefore cannot serialize / de-serialize Map keys to anything but strings. To fix this, either... Use strings for keys in Maps (ObjectMap, HashMap ect.). Use GSON, which can serialize Enum Map Keys just fine. Write lots of special serialization / de-serialization code using a class that implements Json....


1

Your first problem can be solved by implementing a custom list object or (as you only need three items) a custom tuple object instead of the default List<>. This way when you insert tiles you can do a quick sanity check to make sure the tiles are at a 120 degree angle. Something like: public class NeighbourTuple { private Node city1, city2, city3; ...


1

It all depends on the query types, but broadly speaking... If world is very large, as in an MMO, use a database, whether SQL or noSQL style is up to you, but it is a lot simpler to read (with your own eyes) the output of noSQL DBs which serve JSON output natively (GraphQL, MongoDB). Database tech is designed by specialists to cope admirably with large ...


1

I ended up not "keeping the particles together" as I originally wanted because it made literally no sense computation-wise but using a bitmap of a white silhouette on a black background as a mask for each of the spaceship modules instead. A whole ship would be made of an array of those bitmaps stuck together. Whenever a module got hit I'd render an irregular ...


1

I am assuming you are using something like OpenGL for your graphics (Correct me if I am wrong about this), so a typical, minimal data structure for rendering a game object would be: struct RenderData { //Ctor RenderData(GameObject* p) :owner(p), meshHandle(0), numVerts(0) { meshHandle = owner->getMesh(); ...


Only top voted, non community-wiki answers of a minimum length are eligible