Closed capdevon closed 1 year ago
Indeed, the ZIP file consists mostly of PNGs; there are no J3Os in the ZIP. It's been a long time since this app actually tested the AssetTileLoader
.
Upon further research, it appears that the files are located at this path: https://github.com/jMonkeyEngine/jmonkeyengine/blob/master/jme3-testdata/src/main/resources/TerrainGrid/testgrid_0_0_0.j3o
I would suggest removing this useless statement block that can cause confusion and adding a comment that specifies to add the jme3-testdata.jar
file to the classpath before running the TerrainGridTileLoaderTest
class.
File file = new File("TerrainGridTestData.zip");
if (!file.exists()) {
assetManager.registerLocator(
"https://storage.googleapis.com/google-code-archive-downloads/v2/code.google.com/jmonkeyengine/TerrainGridTestData.zip",
HttpZipLocator.class);
} else {
assetManager.registerLocator("TerrainGridTestData.zip", ZipLocator.class);
}
I'll delete the statement block. jme3-testdata should already be in the classpath.
The initial location of the camera is (0, 256, 0), which puts it near the edge of the map. In particular some non-existent tiles such as "testgrid_-1_0_0.j3o" .
The camera's initial location ought to be closer to the center of the map. For instance:
this.getCamera().setLocation(new Vector3f(300, 256, -400));
Even then, if you travel far enough in a single direction, you will eventually hit non-existent tiles.
Changed the initial camera location at 400be336.
The
TerrainGridTileLoaderTest
class cannot load the j3o terrain files because they are not present in the .zip file I downloaded the zip file locally and verified that indeed the j3o files are not inside it.package
jme3test.terrain.TerrainGridTileLoaderTest
StackTrace: