@Rune: that's a great idea, I was playing a pretty old (Playstation era) game the other night, and that's what happened, but with geometry texture instead of mapmodels. When you were close enough, the texture was fully loaded and clear, but from farther away, you only saw a basic color (e.g. tan, grey, purple), and even farther away you wouldn't have seen the geometry at all.
As for the possibility of it being possible (what did I just say?

), it would definitely be a source thing, but maybe you could measure current fps as a variable and that variable would be the input which controls viewing distance of a model or texture quality (see example below). However, you would need to somehow label which direction and what distance to modify, and the entire idea of it would be ruined, as this would be a horrible loop: when the viewing distance decreases, fps goes up, leading to a higher viewdistance and lower fps, starting the cycle again. Maybe you could "test" for fps at certain time intervals and only apply it then, or maybe you just lock the viewing distance into a certain state until it's tested again.
Example code:
Code: Select all
int "frames" = [whatever determines framerate] //creates integer variable fps and assigns the value of it to the code which outputs fps (in the bottom-right corner)
int "viewdraw" //creates integer variable viewdraw, which stands for something like viewing distance to draw to
"viewdraw" = [
case (fps >= 200) [viewdraw = 100%] //
case (200 > fps > 100) [viewdraw = 66%]
case (100 => fps > 60) [viewdraw = 40%]
case (60 >= fps) [viewdraw = 20% or less]
]
This is really bad pseudocode, I know some C++ but I've been working with another language for the past few months so it's a mix. Anyways, this says that you have fps as a variable that the engine determines. From there, we could use ranges of fps (seeing as fps varies a lot during a game and rarely stays the exact same for any period of time) to determine what the resultant viewing distance should be until it's tested again.