Is there an external map viewer? Would that be useful?

Wade L

New Member
Is there already an external map viewer? Is that the type of thing that would be in any way useful (generate overhead maps nightly for a server webpage like some folks do for their Minecraft servers)?

I am an instructor who is shopping around for potential major projects for a project class for a group of Java programming students, and I was looking at having them create something like the various map viewers that exist for Minecraft. I prefer to give folks projects that might actually be useful - I suspect it might take them a lot of work just to get to the point of reading in chunk data and being able to display basic information, but it'd be nice if they worked on something that if they wanted to take it further and turn it into a real contribution that it might be something people would appreciate.

I've looked around and haven't seen such, but I've only take a fairly brief survey of things thus far since I'm obviously looking at more than one open source project simultaneously.
 

Mike Kienenberger

Active Member
Contributor
Architecture
GUI
There's a couple of different in-roads in the area of map viewing. Additional contributions in this area (or any other area) would be welcome!

The 2d facade (AWT) shows the world blocks by layer in any of the three axes.
http://forum.movingblocks.net/threads/awt-2d-facade.966/#post-10054

The cities module also has a 2d view that shows the map with map area annotations.
http://forum.movingblocks.net/threads/cities.891/page-2#post-9192

You could also look through our GSOC idea pages for other project ideas that might be suitable. We didn't qualify for GSOC this year, so all of these projects are still available.
http://forum.movingblocks.net/threads/gsoc-2014.967/#post-9911
https://github.com/MovingBlocks/Terasology/wiki/GSOC

And lastly, there is our issue tracker. Many of these are open projects waiting for someone to express an interest. We try to mark entry-level projects with "Contributor friendly" tags.
https://github.com/MovingBlocks/Terasology/issues
 

mkalb

Active Member
Contributor
Logistics
I tried 1 or 2 years ago to write an external programm which reads map data (export map data into other formats like JPEG/PNG, Google maps, Minecraft, 3D-printer...).
It was very difficult. But today it should be easier, because you can use features of the 2d facade.
 

Skaldarnar

Development Lead
Contributor
Art
World
SpecOps
Not exactly a map viewer, but block structures/blueprints are pending, too. This would include data format for block collections, viewable externally (and placeable internally).
 

Mike Kienenberger

Active Member
Contributor
Architecture
GUI
I tried 1 or 2 years ago to write an external programm which reads map data (export map data into other formats like JPEG/PNG, Google maps, Minecraft, 3D-printer...).
It was very difficult. But today it should be easier, because you can use features of the 2d facade.
Yes, the 2d facade definitely makes it easy. You can either add it as a feature of the existing facade or create a copy of it that renders the map to a file with a custom world renderer instead of drawing it on the screen.

I would also think that it wouldn't be that hard to create a viewer that reads the saved game data directly and creates a map from that.
 

Wade L

New Member
Thanks for the insight guys, especially the list of GOSC projects. The standalone NUI editor seems like it could have potential, though I'll have to familiarize myself with the New UI stuff to get a sense of what the difficulty of the sort of lowest common denominator solution would be (give the students room to do great things, but make sure there's a very achievable baseline). I know how easily I get overwhelmed when interacting with a larger codebase and such...
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Hi Wade L and welcome :)

I'm glad you got some good feedback already. In addition to everything listed a map via HTML would be an awesome extra, especially if paired together with some limited game server interaction (like chat or even commands). So pretty much like a DynMap analogue :geek:

That might be ambitious though. NUI editor is more down to earth, if maybe a tad more boring :3

Going even more crazy some sort of map viewer or admin tool on mobile would be neato too.

... I like crazy things
 

Wade L

New Member
Yeah, if the way the map data was saved was...well, I won't say how Minecraft does it is exactly straightforward, but it is relatively simple, and extremely well-explained in places...that might lead me more towards a possible viewer or the like. Maybe I'm wrong, but taking a brief look at least leads me to believe that actually reading in that data in any kind of external viewer might require a deeper understanding of the existing code than the students will be able to acquire rapidly.
 

Immortius

Lead Software Architect
Contributor
Architecture
GUI
Our map data is primarily composed of Json and Protobuf - these are both standard formats that can be loaded by different languages and interpreted reasonably easily.

Unfortunately the current chunk format uses some custom structures depending on the representation used in game for the different bits of data. This will be changing when vertical chunks are introduced - I've already switched it so they are stored as run-length-encoded data, inside protobuf.

The main thing an independent tool would need to work with is manifest.json, which lists the mapping of blocks to id, and the chunk zip files, which contain a number of chunks in a region - in protobuf format. The tool would also need to understand blocks though, which probably would get complicated.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Would it need to know more about blocks than what the general or top face texture is per block id?

Wade L - sounds like it would be better to wait for the vertical chunking to make the data easier to read. Of course, by then, we might also have the added challenge of layered maps :D
 

Immortius

Lead Software Architect
Contributor
Architecture
GUI
I'm thinking things like stairs and fences, where you need to know how to go from the single block definition to all the different appearances.
 

Cervator

Org Co-Founder & Project Lead
Contributor
Design
Logistics
SpecOps
Good point :)

Do we have any "head of household" information for block families that could be useful, as in the base block to display in an inventory, then base any maps on that? Mike Kienenberger - how do you deal with that in AWT? msteiger - Cities?
 

Mike Kienenberger

Active Member
Contributor
Architecture
GUI
Yes, you can use the BlockPart to determine which face to display, although this isn't quite complete as is. But for an external map, it might be good enough to use BlockPart.TOP each time.

Code:
        switch (displayAxisType) {
            case XZ_AXIS: // top down view
                blockPart = BlockPart.TOP;
                break;
            case YZ_AXIS:
                blockPart = BlockPart.LEFT; // todo: front/left/right/back needs to be picked base on viewpoint
                break;
            case XY_AXIS:
                blockPart = BlockPart.FRONT; // todo: front/left/right/back needs to be picked base on viewpoint
                break;

                                BlockAppearance primaryAppearance = block.getPrimaryAppearance();
                                Vector2f textureAtlasPos = primaryAppearance.getTextureAtlasPos(blockPart);
 
Top