r1ch.net forums
* Home Help Search Login Register
r1ch.net  |  General  |  General Discussion  |  Topic: model index overflowing
Pages: [1]
Print
Author Topic: model index overflowing  (Read 16182 times)
SkiesOfbordom
Member

Posts: 16


« on: May 03, 2007, 05:58:03 pm »

mainly towards r1ch:

Paril and I are having a problem with our Mod. on certain maps, when they load, we get an index overflow error.
were using like 210 / 255 allowed indexes.

we also have CTF built in to our mod.

is there anyway of reducing (besides the obvious remove some models) the indexes so that they dont overflow?
possibly releasing the indexes as they arent used?
« Last Edit: May 03, 2007, 06:07:02 pm by SkiesOfbordom » Logged
R1CH
Administrator
Member

Posts: 2625



« Reply #1 on: May 03, 2007, 07:45:02 pm »

If something is taking a modelindex, it is being used. Maps use a modelindex for every brush entity (func_door, func_explosive, func_wall, etc) so the map can have a large influence on the available indexes, especially if you're trying to use some of the single player maps. As for your mod, if you're precaching every single model, perhaps try to avoid doing so and letting uncommonly used ones load on-demand.

For on-demand loading, if the entity is freed, then there is a possibility of reusing that modelindex for something else - if you find you have a lot of one-shot models, perhaps manually send the configstrings out yourself rather than allocate a new index with gi.modelindex. In theory it should be possible to allow for modelindex replacement server-side to automate this, but many mods cache the modelindexes for performance reasons and recycling server-side would break such mods, although you could also argue it's better to recycle than to crash with no free indices Smiley.
Logged
Paril
Guest
« Reply #2 on: May 06, 2007, 06:22:28 pm »

Yeah, we've been thinking of many ways to help save index space, but not much has been working. How would you send the configstring out?

I tried putting all of the projectiles (well, most) inside a single model and have the other projectiles come out on each different frame, but it caused lag on all engines (poly/vert amount I assume) for some reason.

We can't really recycle since the amount of stuff there is pretty much what makes the mod fun to play.. any other suggestions?

-Paril
Logged
R1CH
Administrator
Member

Posts: 2625



« Reply #3 on: May 06, 2007, 07:18:40 pm »

The single model idea for projectiles should in fact work just as well, I'm not sure why it would cause lag. You can manually send configstrings with gi.WriteByte (svc_configstring), gi.WriteShort (index) and gi.WriteString (string).
Logged
Paril
Guest
« Reply #4 on: May 06, 2007, 08:48:03 pm »

I also tried gi.configstring, it actually replaced models with index numbers (CS_MODEL+i) I specified. It was funny, I changed the elevator brush model on q2dm1 into models/weapons/v_shotg/tris.md2 :p

-Paril
Logged
D.Burge
Guest
« Reply #5 on: August 27, 2009, 07:57:21 am »

Ive been thinking about this too, and perhaps it would make sense to have two different types of model-components - a hashmap-like and a sequantial type. The latter could map to an array of the former. Dont know if that made any sense to anybody but myself?
Logged
Pages: [1]
Print
r1ch.net  |  General  |  General Discussion  |  Topic: model index overflowing
Jump to:  

Powered by SMF 1.1.19 | SMF © 2013, Simple Machines