GLQuake: Per Poly Collision (not new)

Post tutorials on how to do certain tasks within game or engine code here.
Post Reply
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

GLQuake: Per Poly Collision (not new)

Post by Baker »

http://www.telefragged.com/thefatal/q_t ... lision.txt

Team Xlink linked me up this once. Didn't want to lose the URL forever ...

Note: I don't see anything GLQuake specific in there.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Post by frag.machine »

Great tutorial, I used this to add per-poly collision on Q2K4.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Post by revelator »

ah aye remember that one :)

also a rudimentary version of a shadow volumes tutorial from rich allthough i newer got it working quite right (misses collison detection).

did look quite stunning for its time though ;)
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

Well, does this actually work?

I was shooting the air next to an ogre with the nail gun and getting blood sprites in Q2K4.

I was curious as to see this in action. Or am I doing something wrong?

sv_perpoly_collision was 1.

This one has me so curious that I am dying to see it in action. In particular the excitement is that I notice it isn't GL specific and I'm wondering about the possibilities of a server using it.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Post by frag.machine »

Baker wrote:Well, does this actually work?

I was shooting the air next to an ogre with the nail gun and getting blood sprites in Q2K4.

I was curious as to see this in action. Or am I doing something wrong?

Yes, indeed it works. Problem is that PPC actually won't work with rockets and nails because this:

Code: Select all

float	MOVETYPE_FLYMISSILE		= 9;	// fly with extra size against monsters
Try to use the shotgun or the thunderbolt and you can see it in action.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

frag.machine wrote:
Baker wrote:Well, does this actually work?

I was shooting the air next to an ogre with the nail gun and getting blood sprites in Q2K4.

I was curious as to see this in action. Or am I doing something wrong?

Yes, indeed it works. Problem is that PPC actually won't work with rockets and nails because this:

Code: Select all

float	MOVETYPE_FLYMISSILE		= 9;	// fly with extra size against monsters
Try to use the shotgun or the thunderbolt and you can see it in action.
I'll play with it some more then.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

Image

Darn, looks like it is only certain types of collision.

I was hoping it was all alias vs. alias model, but I am standing on the top of the grunt.

Projectiles --- I can understand but maybe that can be altered ... a task for a rainy day.

[One gem I noticed that your interpolation doesn't have the classic "load a game and see frame 0 for a split second problem" -- JoeQuake doesn't either but I haven't been able to determine what change or why from there.]
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
revelator
Posts: 2621
Joined: Thu Jan 24, 2008 12:04 pm
Location: inside tha debugger

Post by revelator »

hmm not sure tbh mh made some fixes to the interpolation code quite early and it was adopted into several engines like the nailgun spindown fix. (as early as mhquake 5 i believe).

and yup the ppc code worked but still had a few rough edges try nightmare with it on :P good luck :twisted:
frag.machine
Posts: 2126
Joined: Sat Nov 25, 2006 1:49 pm

Post by frag.machine »

Baker wrote:[One gem I noticed that your interpolation doesn't have the classic "load a game and see frame 0 for a split second problem" -- JoeQuake doesn't either but I haven't been able to determine what change or why from there.]
It's very likely that I applied some fix from someone else for the original interpolation tutorials (Tomaz I suppose, Q2K4 borrowed a lot of features from TomazQuake and QBism), I don't remember. I apologize to the author for my lack of credits in the README :D
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
Sajt
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Post by Sajt »

frag.machine wrote:Problem is that PPC actually won't work with rockets and nails because this
Whoa, you scared me for a minute there. I thought you meant PPC as in PowerPC (old Macs, Xbox, etc), as in endianness issues.
Baker wrote:I was hoping it was all alias vs. alias model, but I am standing on the top of the grunt.
Here is an interesting scenario for you to ponder before you try that. Something sits on a grunt's arm. Then due to animation the grunt's arm moves upward.
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

Sajt wrote:Here is an interesting scenario for you to ponder before you try that. Something sits on a grunt's arm. Then due to animation the grunt's arm moves upward.
Heheh ... ok then!
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Spike
Posts: 2914
Joined: Fri Nov 05, 2004 3:12 am
Location: UK
Contact:

Post by Spike »

to be fair, that applies even if its a rocket or nail, sometimes it'll just move through without hitting anything at all. Thus tracelines are really the only reliable use.
Bones or whatever can have a radius and would thus permit non-instant hitmodel stuff, plus they can be directly controlled too, and with ragdoll it all works out.
In DP and FTE, hitmodel is activated based upon SV_Move/Traceline flags (in the nomonsters argument), rather than being an extra argument to SV_Move/foced by traceline.
QuakeWorld generally doesn't load non-bsp models, but NQ should already load that stuff anyway (which is why vanilla glquake -dedicated crashes).
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

Spike wrote:to be fair, that applies even if its a rocket or nail, sometimes it'll just move through without hitting anything at all. Thus tracelines are really the only reliable use.
Even with these limitations the lightning gun and the shotgun are the most insidiously evil weapons in multiplayer Quake.

It might be interesting to add this + enable as a dedicated server option to up the ante on those weapons.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Sajt
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Post by Sajt »

The other thing about hitmodel (for tracelines) is that it increases lag's game-ruiningness. As a (not so) extreme example, If you have a 200 ping, and the grunt is moving his arm upward or doing some other lateral-to-the-player's-line-of-sight movement, the player is going to have no chance of hitting his arm, except by accident, or if he memorizes the monster animations in detail and predicts them himself. It ends up with arbitrary-seeming hit or miss decisions, which are frustrating to players. Of course, in real life nobody should be expected to be able to hit a moving arm like that. But this situation exists in all subtler cases.

I don't know how much "unlagged" would alleviate this, but it probably would help. The other option (other than doing weapon traces client-side like Cube) would be I guess to use fattened hitboxes...

Half-Life had hitboxes roughly per limb in singleplayer, but used single big Quake-style bboxes in multiplayer, presumably because of this problem.

Just another complication to makes one cherish more the simpler days of 1996.
F. A. Špork, an enlightened nobleman and a great patron of art, had a stately Baroque spa complex built on the banks of the River Labe.
Baker
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Post by Baker »

Sajt wrote:The other thing about hitmodel (for tracelines) is that it increases lag's game-ruiningness. As a (not so) extreme example, If you have a 200 ping, and the grunt is moving his arm upward or doing some other lateral-to-the-player's-line-of-sight movement, the player is going to have no chance of hitting his arm, except by accident, or if he memorizes the monster animations in detail and predicts them himself. It ends up with arbitrary-seeming hit or miss decisions, which are frustrating to players. Of course, in real life nobody should be expected to be able to hit a moving arm like that. But this situation exists in all subtler cases.

I don't know how much "unlagged" would alleviate this, but it probably would help. The other option (other than doing weapon traces client-side like Cube) would be I guess to use fattened hitboxes...

Half-Life had hitboxes roughly per limb in singleplayer, but used single big Quake-style bboxes in multiplayer, presumably because of this problem.

Just another complication to makes one cherish more the simpler days of 1996.
Realistically or even not, I shouldn't be able to shoot the air above an ogre or fiend and get a hit. It is entirely silly. This effect is largely diminished by the fact that most ppl would never do that since they don't know and would aim for the body.

Collision at a minimum at least among non-map models shouldn't involve "hits" well above or to the side of a non-Shambler sized monster. Admittedly this is a non-problem in non-coop mods as the Quake player model aligns rather well to the sizing of presumably that hull size.
The night is young. How else can I annoy the world before sunsrise? 8) Inquisitive minds want to know ! And if they don't -- well like that ever has stopped me before ..
Post Reply