Added a console to allow me to input commands to help me find problems or test stuff.
|EVEN BETTER GRAPHICS!!|
- Timescale : freeze, slow down or speed up the world physics and ai. Freeze in particular is very helpful, I can stop things from moving and go check a problem I spotted away with my magic flycam.
- Loadrange : allows me to change ingame the distance at which chunks are loaded/dropped. Good for stress tests or testing persistence.
- Fog : toggle fog on/off. I use fog in LoD computations, see below.
LEVEL OF DETAIL
LoD optimization is a classic in 3d computer graphics. The idea is that for a 3d object far from the player, you don't have to draw everything in detail. It doesn't have to have as much details as a mesh right under the player nose. This improves framerate and also may help fixing some display bugs. If done right the player won't notice the difference.
You can use this concept elsewhere. I use it on entities. The farther away an entity is from the player, the less accurate the physics and the ai is. I constrain the physics so while they are less accurate they do not become insanely un-physics.
I need this optimization as I want RS2 to have as much entities active as possible. Focus in RS2 is entities/actors, like RS1. Without LoD even with the simple random walker ai make the game crawl to 30fps when there is 1000 entities active. With entity LoD is a respectable 150-200fps.
I refined the idea by incorporating fog. Distance for LoD is measured relative to fog far range, as this is the farther the player can see. I will refine the idea further by using the camera frustum : low LoD for anything that is out of the player view cone. This should really help a lot. As long as my lolphysics don't break on low lod :(
I'm still not decided on what kind of lighting to use. Depending on that, I will or will not implement LoD on the cells (=3d tiles) mesh. Right now there is no LoD optimization on chunks, but there are already optimizations in the rendering such as octtree and texture batching.
WHY U 3D??
3D graphics for me is a mean to convey the gameplay and the atmosphere and not an end.
I don't go 3d realtime because it's cool or something but because it will allow me to do stuff I can't in turnbased 2D gameplay wise. Both are fine btw.
Don't worry, again it's not dead until I say so. If it is, I'll release the sources.
End of post.