11-16-04 - 1


I hate "Just Too Late" algorithms on a deep moral level. The so-called "Just in Time" compiling is really JTL. If it was really JIT, it would be ready to go when I need it. Instead, I ask the app to run, and then I have to wait while JIT does its thing, then I get to go. That's sort of like if you asked a nurse in an operating room for a scalpel, and she goes, "oh, I've got it just in time, let me go get it from the supply cabinet" - No! That's Just Too Late! It looks to me like Halo 2's paging is JTL. Resources request residency when they are used, which means they don't actually become resident until after they're needed. The worst case for this kind of thing is when the camera is jumping all over the places, the resources you need keep changing, and the paging can never catch up with what's actually needed. We try to do all our paging with a true "JIT" system, which means they become resident just in time before they are needed, so the user never actually sees them non-resident. To do this you need good foreknowledge of what will be needed, which is generally pretty easy in gameplay because the user can only run around coherently - you can't teleport to arbitrary random spots, so I know what's near you and what direction you're going and I can anticipate the needed resources. In cinematics it's really easy, because the whole thing is hard-coded, you can compute exactly what's needed at what time and store a timeline track of when things should page in and out.

No comments:

old rants