Getting the height of a terrain / adding big arrays.
-
I’m a bit stuck. I wrote a function that expands a 16x16 map array up to 256x256, for use in huge terrains using createTerrain(). I also had a thing that would add nice smooth hills. Looked lovely.
The next thing was to add a player character, which I’d drop down from the air until it hit the terrain underneath it’s x,y position and stop. I couldn’t find an easy way to do that though, so tried to recreate the height grid in a separate array I could have as a ’height map’. Fuze is crashing though, when I try to add the two big 256x256 arrays together. It works with two 128x128 arrays, I think, but I miss the huge maps I did before.
Before I go any further, Is there an easy way to do what I want? Something like a terrainobject[x][y].z? Am I hitting a limit with my big arrays, or have I made a different mistake? Any insights would be appreciated :)
-
This post is deleted! -
Thanks, DomDom, I was just asking to see if I’d missed something obvious. I’ll redo the hill making thing to have more control, then split it into 4 chunks. That should sort it :)