Asterix Gaming Guild Logo GeneralXXLXXL 2XXL 3XXXLOlympic GamesXXL EditorToolsOff-TopicXXL RomasteredXXL 2 RemasteredOther GamesModsCaesar's ChallengeUnfair XXLPatchesFan ArtPersonal ArtSpeedrunningMediaRandomizerBETA RomeHSKALPresence AdrienPresence SPQRPresence Mr. RubinshteinSupport Bot Helpdesk

#hskal

schmeling65
a level can only have sectors from 1-X, not like 1,2,5
pegperegogaucho
schmeling65
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
schmeling65
doesn't make sense to you, i know lol
hesopesomeso
yes it makes no sense to me
schmeling65
the problem is, that you can't load 2 sectors at the same time, right?
hesopesomeso
yeah
schmeling65
Because both have the same root referencer to their sectors which have the ID 1, right?
hesopesomeso
yes, so if you load them, they POINT to the same object.
schmeling65
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?
pegperegogaucho
I'm sorry schmeling, but I don't believe you fully understand the issue
schmeling65
most likely
schmeling65
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
hesopesomeso
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?
schmeling65
Kinda, ye. Sounds like what I suggested
pegperegogaucho
Heso, maybe you could give an example of the problem
hesopesomeso
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).
hesopesomeso
Does that kind of clarify the problem?
pegperegogaucho
It's alright
hesopesomeso
So, unless I can somehow get the hierarchy, I'm sticking with single sector loading.