by 'shell' I mean the exterior shell of the world, with all the gooey middle stuff missing. just a big empty skybox cube or something (with a grid of areas inside).
ignore the portal stuff, its too static. instead of opening/closing portals, you might as well just manually hide entities instead - a grid is a grid. if the csqc isn't including the entity in the scene, the renderer won't have to bother with it anyway, or you can use customiseentityforclient and hide it from the client completely if its too far away (but can be returned to).
I'll describe it anyway, just because, but I don't really see it as useful to your idea
void(entity portal, float state) openportal = #207;
this builtin is aimed at doors on q2/q3 bsps. when invoked, it figures out which two areas to open up (q2: reads the style field. q3: checks the two areas the entity is touching), and either opens or closes the portal between them (ref-counted, you can have multiple doors and if any are open then all doors between the two areas are effectively open). map_autoopenportals should generally be set to 0 before loading the map or you won't see any results (currently defaults to 1 because of all the mods that don't know about the builtin to fix maps).
basically, normal usage of this builtin is to open(state=1) the portal as soon as the door starts opening. and to close it(state=0) when it stops moving and officially becomes closed. you also need to use weird areaportal brushes/shaders in the map editor that separate the two areas, with the plane somewhere in the middle of the door.
Concept Idea
-
- Posts: 1395
- Joined: Tue Feb 24, 2009 4:39 pm
- Location: Italy
Re: Concept Idea
ah ok, that's what I thought tooby 'shell' I mean the exterior shell of the world, with all the gooey middle stuff missing. just a big empty skybox cube or something (with a grid of areas inside).
ok, forgottenignore the portal stuff, its too static.
Yeah, my intent is to erase old sectors completely, so .. even better! Once you left that sector, puff.. deleted!instead of opening/closing portals, you might as well just manually hide entities instead - a grid is a grid. if the csqc isn't including the entity in the scene, the renderer won't have to bother with it anyway, or you can use customiseentityforclient and hide it from the client completely if its too far away (but can be returned to).
Thanks a lot man, I found it in cs_plat.qc in csaddonI'll describe it anyway, just because, but I don't really see it as useful to your idea
void(entity portal, float state) openportal = #207;
Thanks for the thorough explanation, I think I'll use it. On the qc definition it accepts two parametersthis builtin is aimed at doors on q2/q3 bsps. when invoked, it figures out which two areas to open up (q2: reads the style field. q3: checks the two areas the entity is touching), and either opens or closes the portal between them (ref-counted, you can have multiple doors and if any are open then all doors between the two areas are effectively open). map_autoopenportals should generally be set to 0 before loading the map or you won't see any results (currently defaults to 1 because of all the mods that don't know about the builtin to fix maps).
basically, normal usage of this builtin is to open(state=1) the portal as soon as the door starts opening. and to close it(state=0) when it stops moving and officially becomes closed. you also need to use weird areaportal brushes/shaders in the map editor that separate the two areas, with the plane somewhere in the middle of the door.
Code: Select all
void(entity portal, float state) openportal
I think it should work.
Ok the project is starting shape up
here's the ssqc/csqc structure. I don't want to trash completely ssqc, I think it's perfect for those 2 things (level and score)
Thanks Spike for those all infos!
Meadow Fun!! - my first commercial game, made with FTEQW game engine