RosaryMala / armok-vision

A 3d realtime visualizer for Dwarf Fortress
MIT License
319 stars 27 forks source link

Falling out of world in FPS mode #52

Open alexchandel opened 7 years ago

alexchandel commented 7 years ago

It's very easy to confuse armok vision and fall out of the world. I was descending my central staircase in FPS mode and got well below where Armok Vision had rendered, then I started falling.

Also, very often when switching to FPS mode, the camera is placed below the floor of wherever is visible in god mode, and consequently falls out of the world. Armok Vision should try to find a floor, even one several layers above where god mode is currently focused, before deciding to place the FPS camera under the ground and letting it fall into the void.

RosaryMala commented 7 years ago

The second issue is easy enough to fix, but the first issue is more complicated.

I guess I could try to have solid blocks in the unloaded parts of the map.

alexchandel commented 7 years ago

It was strange because, until I had descended to this level, Armok Vision was rendering layers very fast as I moved to them, and when I ascended again they still displayed fast.

But the delay time in rendering layers got exponentially worse the lower I descended in my main staircase. I know Armok Vision had loaded them, because I was still moving up and down invisible staircases, and colliding with invisible walls, but I couldn't see them. And eventually, when I descended far enough (below the lowest loaded tiles, I assume), I wasn't attached to staircase anymore and fell.

alexchandel commented 6 years ago

This happens even easier in v0.18.0. Descending just 1 or 2 ladders causes me to fall out of the world.

RosaryMala commented 6 years ago

AV can only generate meshes for a certain number of blocks per second, so moving too fast between levels can lead to falling.

If you set the downward draw range a bit higher, and the sideward range lower, then the blocks below you will be generated faster.

alexchandel commented 6 years ago

Could you merge blocks together & generate meshes over groups of them, similar to a Minecraft-style greedy meshing algorithm? For example, most of the floors are probably overdrawn if you're generating meshes for individual blocks.