08 May 2012 No Comments
A little on Model Precaches
So, what are model precaches exactly?
Essentially, model precaches are the way Quake loads, stores in memory and then gets models. The engine has a limited number of slots for these; 255. This may seem low, but under normal circumstances, it’s actually pretty generous, relative to some of the other limits in the engine.
This is because a precache ‘slot’ is only used up for unique models, so multiple uses of the same model do not require additional precaches (eg: 500 shell boxes are still just 1 model precache).
The one that ends up biting people on the ass the most is bmodels (doors, triggers, walls, illusionaries… basically any time you attach a brush(es) to an entity).
Each bmodel counts as a precache slot, even if they look exactly the same (or don’t show up at all, as in triggers).
Iif you have 20 doors that look the same, that is 20 precaches. func_illusionary, func_wall are the same thing. The one people may not realize is that trigger_once/multiple count as well. In fact, trigger_relay and _count can be made into point entities without affecting anything to avoid wasting bmodels on them. Be warned that some older entity defs floating around on the internet may still have them as brush models (they were originally defined this way for whatever reason).
However, I would only worry about precache slots if you are intent of having the map work in glquake.exe. if you are aiming at modern engines, then this isn’t a problem. all modern ones can handle much more precaches: FitzQuake085, Quakespasm, RMQengine, DarkPlaces, QBism’s Super8 (software), Aguirre’s GLQuake.

