How to create rotating doors?

Discuss the construction of maps and the tools to create maps for 3D games.
LordHavoc
Posts: 322
Joined: Fri Nov 05, 2004 3:12 am
Location: western Oregon, USA
Contact:

Post by LordHavoc »

spinduluz wrote:Yeah I'll post my test map I used when testing this.
http://web.telia.com/~u26503161/test6.zip

I really appreciate that you're looking into this, and feel free to laugh at me if it's just me doing something really stupid! :D
Your map makes me realize I ought to implement a spawnflag for bidirectional rotating doors :)

Currently I'm able to walk through the door freely, which is somewhat disconcerting :)

Too tired to look into this more right now, will debug the engine code later today.

And no, nothing wrong with your map :)
spinduluz
Posts: 6
Joined: Mon Jan 14, 2008 10:20 pm

Post by spinduluz »

LordHavoc wrote:
spinduluz wrote:Yeah I'll post my test map I used when testing this.
http://web.telia.com/~u26503161/test6.zip

I really appreciate that you're looking into this, and feel free to laugh at me if it's just me doing something really stupid! :D
Your map makes me realize I ought to implement a spawnflag for bidirectional rotating doors :)

Currently I'm able to walk through the door freely, which is somewhat disconcerting :)

Too tired to look into this more right now, will debug the engine code later today.

And no, nothing wrong with your map :)
Nah map is just awful. Add a couple of flashing lights and I'll end up in an insane asylum :D

Been testing some stuff regarding this today but unfortunately my skills are not up to the task ... yet! :)
Seems like rotating doors have become my obsession :P. Never liked sliding doors :|

Still feels like I'm overlooking something or doing something wierd.
LordHavoc
Posts: 322
Joined: Fri Nov 05, 2004 3:12 am
Location: western Oregon, USA
Contact:

Post by LordHavoc »

I haven't found time to investigate this bug further, sorry.
spinduluz
Posts: 6
Joined: Mon Jan 14, 2008 10:20 pm

Post by spinduluz »

Yeah I suspected that :).
And nothing to be sorry about since as far as I know you do this for free on your free time so I didn't really expect it to be fixed instantly (unless it was an easy one to fix of course).

So don't worry about it, would be cool if it's fixed one of these days though :D
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Post by goldenboy »

Right. Wouldn't it be simplest to rip the rotating door from Half-Life or Q2, and add support for origin brushes to one of the map compilers?

Theoretically, that should work?

Does the engine have to support origin brushes, too, or is it purely a map compiler thing?
MeTcHsteekle
Posts: 399
Joined: Thu May 15, 2008 10:46 pm
Location: its a secret

Post by MeTcHsteekle »

Does the engine have to support origin brushes, too, or is it purely a map compiler thing?
ya could try adding it i guess if it doesn't

http://www.quake-1.com/docs/quakesrc.org/129.html

hmm i think ill try adding itto mine eventually :D
bah
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

MeTcHsteekle wrote:
Does the engine have to support origin brushes, too, or is it purely a map compiler thing?
ya could try adding it i guess if it doesn't

http://www.quake-1.com/docs/quakesrc.org/129.html

hmm i think ill try adding itto mine eventually :D
Very nice find, good job.

I remember running across that weeks ago (when I was rescuing the tutorials), but forgot about it and never would have remembered I had ever seen it.
goldenboy
Posts: 924
Joined: Fri Sep 05, 2008 11:04 pm
Location: Kiel
Contact:

Post by goldenboy »

Thanks for the link Metch.

It's starting to come together. So you'll need the QC for it, the engine support which should largely be there, and map compiler supporting origin brushes.

Since I wasn't around way back when, I don't have the full overview over QuakeSrc stuff. I'm reading up though.

I think bjptools' treeqbsp supports quake2 maps, so hopefully it'll only be a small hacking maneuver to get origin brushes supported in Q1.

Hopefully.
LordHavoc
Posts: 322
Joined: Fri Nov 05, 2004 3:12 am
Location: western Oregon, USA
Contact:

Post by LordHavoc »

Any progress with rotating doors?

I've made a new beta which fixes a semi-recently introduced bug with rotating door collisions and visibility.
metlslime
Posts: 316
Joined: Tue Feb 05, 2008 11:03 pm

Post by metlslime »

goldenboy wrote:Right. Wouldn't it be simplest to rip the rotating door from Half-Life or Q2, and add support for origin brushes to one of the map compilers?
I haven't really looked into it, but does quake2 simply save the original brushes, and every frame rotate them and regenerate the clipping hull? That would explain the amount of jittering when walking on a rotating object in quake2 (e.g. Lava Tomb's devilish rotating drum thing)

If that's the trick, engine support would simply be a matter of decompiling the visible hull for each entity at load time, and then any time an entity rotates, using the decompiled brushes to regenerate hulls. (and then do whatever physics hacks are necessary to keep players from ending up stuck inside a solid object)
LordHavoc
Posts: 322
Joined: Fri Nov 05, 2004 3:12 am
Location: western Oregon, USA
Contact:

Post by LordHavoc »

No, the map compiler destroys the origin brush and stores its center into the entity as the origin key, which in turn causes the geometry to have that position subtracted from it (recentering it on 0 0 0), it's the same method used in all Quake1/2/3 engine games.

The jitter you speak of is network compression most likely, combined with the prediction of rotating floor objects (standing on a rotating bmodel).
metlslime
Posts: 316
Joined: Tue Feb 05, 2008 11:03 pm

Post by metlslime »

LordHavoc wrote:No, the map compiler destroys the origin brush and stores its center into the entity as the origin key, which in turn causes the geometry to have that position subtracted from it (recentering it on 0 0 0), it's the same method used in all Quake1/2/3 engine games.
So, how does collision work? I don't think you can just rotate a clipping hull...
LordHavoc
Posts: 322
Joined: Fri Nov 05, 2004 3:12 am
Location: western Oregon, USA
Contact:

Post by LordHavoc »

metlslime wrote:
LordHavoc wrote:No, the map compiler destroys the origin brush and stores its center into the entity as the origin key, which in turn causes the geometry to have that position subtracted from it (recentering it on 0 0 0), it's the same method used in all Quake1/2/3 engine games.
So, how does collision work? I don't think you can just rotate a clipping hull...
Well technically you could rotate another object into the hull's space (being aware that the space in question is 4D - it changes orientation over time).

But Quake just keeps the player bbox aligned to the model, totally bogus but for rotating doors it actually behaves alright - tilting floors and such can get a bit screwy but again no one is likely to notice.

So Quake is just tracing a straight path from frame start to frame end through the model, it's very approximate, and it only "works" because the model in question is a pusher, it pushes the player out of itself as needed.
LordHavoc
Posts: 322
Joined: Fri Nov 05, 2004 3:12 am
Location: western Oregon, USA
Contact:

Post by LordHavoc »

spinduluz wrote:Sorry I've opened this topic again,

I finally got a door to rotate in a DP Q1BSP map using dpmods info_rotate and func_rotatingdoor. However it doesn't look like the door is handling collisions, it simply kill me and I get a message that I "was in a solid"

Am I doing something wrong or is it some limitation with the Q1 bsp format?
Fixed hmap2 bugs with compiling rotating doors, try again.

http://icculus.org/twilight/darkplaces/ ... 100113.zip
Teiman
Posts: 311
Joined: Sun Jun 03, 2007 9:39 am

Post by Teiman »

a lame way to make the colision part of a rotating door is this:

- don't do it.

Make the door a solid, no one can cross, and make is unsolid wen you start the animation that open it. Lets say.. is binary: is closed and solid or open/opened and nonsolid, the opening animation just eyecandy.
Post Reply