Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

protobuf format mismatch between this and current worldengine? #2

Open
AndyProk opened this issue Sep 9, 2016 · 4 comments
Open

protobuf format mismatch between this and current worldengine? #2

AndyProk opened this issue Sep 9, 2016 · 4 comments

Comments

@AndyProk
Copy link

AndyProk commented Sep 9, 2016

I've tried to use this project to import information from a world file into a Java program (to paint a more detailed river map and a lake map, for example).
But even replacing

public void loadWorld() throws IOException {
    InputStream is = WorldFileLoaderTest.class.getClassLoader().getResourceAsStream("seed_1534.world");
    WorldFile.World worldFile = WorldFileLoader.fromInputStream(is);
    assertEquals("seed_1534", worldFile.getName());
}

with

public void loadWorld() throws IOException {
    InputStream is = WorldFileLoaderTest.class.getClassLoader().getResourceAsStream("seed_17824.world");
    WorldFile.World worldFile = WorldFileLoader.fromInputStream(is);
    //assertEquals("seed_17824", worldFile.getName());
}

in WorldFileLoaderTest.java (after placing the freshly generated seed_17824.world next to seed_1534.world in the filesystem) results in

Tests in error: 
  loadWorld(org.worldengine.world.WorldPainter): Message missing required fields: name, height, heightMapData, heightMapTh_sea, ...

A quick look with ghex into both seed_17824.world and seed_1534.world reveals that they look quite different (obviously only showing the first couple of bytes):

0A 09  s  e  e  d  _  1  5  3  4 10 80 08 18 80 08  " 80 98 C0 04 0A 80
 H 09 00 00 00 00 00 00 00 00 09 00 00 00 00 00 00 00 00 09 00 00 00 00

vs.

08 EE CA BD BB 05 10 80 80  L 1A 0A  s  e  e  d  _  1  7  8  2  4 20 D5
0E  ( F3 06  2 F3 D2 8E 07 0A FD 83 01 09 C2 F5  (  \ 8F C2 D5  ? 09 C2
F5  (  \ 8F C2 D5  ?
@AndyProk
Copy link
Author

AndyProk commented Sep 9, 2016

I tried the same with a much smaller file, with exactly the same results.

@ftomassetti
Copy link
Member

I am sorry about this issue.
Have you tried using this project to open files generated from WorldEngine? I suspect the protobuf definition available in this project need to be updated (the proto file).

@AndyProk
Copy link
Author

AndyProk commented Sep 12, 2016

That's exactly what I tried to do, yes.

WorldEngine 0.19.0 or commit b67e5668066e5c5044a75b8193c4e1e82f285435 to be exact.

@johnpmayer
Copy link

I believe that I'm experiencing the same issue. Can I recommend marking this repository if it's not being maintained and recommending that folks generate their own sources from the latest protobuf source that corresponds with their version of the worldengine binaries?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants