Update

Hi again,

Quick update, not much has changed visually but I’ve had to rework the terrain code, well I’ve gone back to an older version I was working on and fixed it. Why? because the terraingrid function of jMonkeyEngine wasn’t working out, sure it was fast and easy but it was also very memory hungry, like I managed to clock up over 7GB of memory just wandering around the terrain. Sorry, no, not going to work.

So back on to my own TerrainTiler code, I’ve managed to bring its speed back up to at least equal to that of terraingrid. Which is impressive as terraingrid was only 2×2 visible tiles active (and 12+ cached <= the memory issue) where as my tiler routine is a 3×3 patch of visible tiles (no cache, new tiles saved to disk for later re-use). So my code gives me more visible ground and distance so less chance of a player seeing the landscape “popping” into existence as they wander around but still allows for a very large terrain.

edit: My routine is still using the jMonkeyengine TerrainQuads for each tile but they are treated individually and loaded in and out as the player moves, where as the built in TerrainGrid is 4 quads loaded as one and swapped in/out as the camera moves.

I’m very happy I managed to get that code working, now just trying to fix the terra-forming code to suit the new routine. Being a pita but I’ll work it out. Once I get those sorted and can tidy up and modify my terrain I’ll be able to post some more pics.

Until next time! Thanks for reading!

2 thoughts on “Update

  1. Have you posted about your grievances with terramonkey on the forum? These issues might be something we’d like to look into further. Even if you’re not gonna be using our terrain component any longer, we’d appreciate any feedback you may have on its shortcomings.

    Also, if your own terrain system is fairly general purpose, you could always try submit it as a plugin!

    • Hi Erlend,
      Thanks for commenting! Yes I did raise it on the terramonkey forums and Sploreg did say it was a know issue about the memory usage.
      The other restriction it gave me was being only 4 quads visible I had to scale them up large to get a good view distance. My routine uses a grid of 3×3 TerrainQuads stored in a TerrainQuad Array, as the player moves into a new cell it unloads the furthest 3 cells and loads in 3 new ones, always keeping the player in the center of the grid.
      I will certainly make an effort to develop my routine to something that can be shared with the community and will post my efforts for others to share in, at the moment its just a inbuilt routine so there is a pause when loading new cells but I plan on making it a class on its own with a processing thread so it loads in the background.
      It will take me some time as I’m still learning OOP and classes being old school structured programmer back in the day (I’m 40 now but still learning! πŸ™‚ )
      Again thanks for your interest, I will keep posting πŸ™‚