a level can only have sectors from 1-X, not like 1,2,5
so you make an object or something that could contain them and then you could load them from there one; like adding another base-reference to the root refererence; therefor you could show all the sectors then
doesn't make sense to you, i know lol
yes it makes no sense to me
the problem is, that you can't load 2 sectors at the same time, right?
Because both have the same root referencer to their sectors which have the ID 1, right?
yes, so if you load them, they POINT to the same object.
In theory I'd want to have something like that:
Let's say the lvl has 5 sectors. Then I create lvl-map, which has 5 slots; one for each sector. The moment a level gets loaded, the sectors get deserialized into the lvl-map. After that you iterate over them and recreate the level from as it is.
You also need a level switch, so you know when you have to take data from the next sector and append these. This switch also includes setting a new root reference. A possible switch could be upon reaching a sas-box.
I guess this is just for the editor, right? Then you could build something around these sectors to contain them in a readable structure for you to recreate the whole leve.
Does it makes more sense now? Is that even possible?
I'm sorry schmeling, but I don't believe you fully understand the issue
I also don't know how the game is built so that is just an idea that I am getting on how to possible maybe somehow solve it
Only way to have this work is to remap it into sector independent hierarchy. So, iterate over all sectors, and find ID collisions. Then, distribute into sectors. That could work?
Kinda, ye. Sounds like what I suggested
Heso, maybe you could give an example of the problem
Sorry, let me explain properly. Let me go over the sector root example:
When you deserialize a CKSector, it reads a sector root object: it receives the type,id,instance id. The loading manager then grabs this info, looks it up in its buffer, and returns the object pointer. For sector root objects, this buffer only contains TWO allocated objects (not sector_count + 1).
With that said, as you read CKSector 0, you read the sector root object, which is mapped to the zeroth position in the buffer (in loading manager). CKSector 1's sector root maps to the first position, all good. But now, EVERY OTHER CKSector after this, maps the sector root yet again into the first position in the buffer (so its instance id is 1).
Does that kind of clarify the problem?
So, unless I can somehow get the hierarchy, I'm sticking with single sector loading.