Forum

Concept Idea

Discuss programming topics for any language, any source base. If it is programming related but doesn't fit in one of the below categories, it goes here.

Moderator: InsideQC Admins

Re: Concept Idea

Postby Spike » Sun Aug 31, 2014 12:03 pm

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.
Spike
 
Posts: 2883
Joined: Fri Nov 05, 2004 3:12 am
Location: UK

Re: Concept Idea

Postby toneddu2000 » Sun Aug 31, 2014 4:07 pm

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).
ah ok, that's what I thought too

ignore the portal stuff, its too static.
ok, forgotten

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).
Yeah, my intent is to erase old sectors completely, so .. even better! Once you left that sector, puff.. deleted!

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;
Thanks a lot man, I found it in cs_plat.qc in csaddon

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.
Thanks for the thorough explanation, I think I'll use it. On the qc definition it accepts two parameters
Code: Select all
void(entity portal, float state) openportal

State, we saw it, it's open / close state, for portal, instead, can I use the physical door entity? So I could create a portal entity with a sub entity door (with a door mesh attached) that goes up/down when open/closed.
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!
toneddu2000
 
Posts: 1315
Joined: Tue Feb 24, 2009 4:39 pm
Location: Italy

Previous

Return to General Programming

Who is online

Users browsing this forum: No registered users and 1 guest