Programming Thread

Viewing single post

Started by the-pi-guy, Mar 13, 2016, 10:39 PM

previous topic - next topic

Legend

It's almost like you know what you are doing!




I'm still away but I think I've figured out my map.

Every pixel on the 512x512 grid will be its own renderer in charge of just that tile. All ~260,000 will update individually and only care about their own needs. A tile far from the player will mostly not change and just have a 2x2 or 4x4 texture. As the camera gets closer, the tile re-renders to a higher resolution. This isn't super fast but can look like texture streaming. At max the tile could be 1024x1024 or higher and cover the full screen. As the camera moves away, the texture is scaled down to decrease memory.

This has all the pros of a sparse quadtree while also rendering faster. Rendering speed is dependent on tile count and resolution so this method works with that. Also there is no need for multilevel stuff like a quadtree. In addition, every tile can bake some info instead of recalculating it always.

Labels can be decals rendered on top. The grid of textures could be packed into a single texture to make 3d rendering really fast.