Forum

Headshots

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Headshots

Postby Ghost_Fang » Mon Mar 08, 2010 4:27 am

Headshots as seen in Kurok (and im sure in other quake mods) and/or other body parts such as limbs. The coding for that.... would it be QC or Engine or a collaboration of both? I think it would be QC but im not sure...
Ghost_Fang
 
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Postby Downsider » Mon Mar 08, 2010 5:14 am

Kurok "headshots" just checked how high the hit was on the single collision box (QC). Real limb detection requires multiple hitboxes (Engine).
User avatar
Downsider
 
Posts: 621
Joined: Tue Sep 16, 2008 1:35 am

Postby Ghost_Fang » Mon Mar 08, 2010 5:38 am

Ah i see, i was kinda wrong with my idea of QC. I though it was a matter of adding another hitbox at a certain height. Would limb detection affect performance much?
Ghost_Fang
 
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Postby Baker » Mon Mar 08, 2010 12:02 pm

QuakeC tutorial for locational damage (may or may not work for your purposes, but I expect it probably would):

http://www.moddb.com/games/quake/tutori ... nal-damage

One mod with locational damage is QMatrix:

Example:

http://www.quakewiki.net/archives/qmatrix/

Source code:

http://www.quake-1.com/quakec-gallery/Matrix05C_SRC.zip
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 ..
User avatar
Baker
 
Posts: 3666
Joined: Tue Mar 14, 2006 5:15 am

Postby Biodude » Mon Mar 08, 2010 12:15 pm

I got a hitlocation qc file if you want
User avatar
Biodude
 
Posts: 186
Joined: Wed Aug 27, 2008 7:17 pm

Postby Ghost_Fang » Mon Mar 08, 2010 6:02 pm

Thanks Baker, its actually quite simple. I'm gona mess around with it and see what i can come up with for L4Q ;).

No thanks Biodude i got all the info i needed from the ModDB page. Thanks anyways.
Ghost_Fang
 
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Postby Sajt » Tue Mar 09, 2010 5:20 am

Headshots in Quake (that is, check how high up on the bbox you hit) pretty much suck. If you are below the monster shooting up at him, you have to shoot at the air 2 feet in front of his head. If you are above the monster shooting down at him, you only have to hit anywhere within 5 feet of his head to do a headshot... Keep this in mind when you decide if you still want to do it...
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.
Sajt
 
Posts: 1215
Joined: Sat Oct 16, 2004 3:39 am

Postby Error » Tue Mar 09, 2010 7:35 am

this is where model polygon hitting would come in handy.
User avatar
Error
InsideQC Staff
 
Posts: 865
Joined: Fri Nov 05, 2004 5:15 am
Location: VA, USA

Postby MDave » Fri Mar 12, 2010 2:00 am

Can't quite remember exactly now (about 2 years ago!) but there is 2 methods for detecting headshots in Kurok, depending on what kind of attack it was ;) I did one method for missile type entities, and another method for hitscan attacks. This alleviated most of the problem mentioned by Sajt, since most weapons in Kurok were of the hitscan type :)

Can't be bothered figuring it out now :P but I do remember looking into how it was done in the Matrix mod and the moddb tutorial page.
User avatar
MDave
 
Posts: 76
Joined: Mon Dec 17, 2007 7:08 pm

Postby Ghost_Fang » Sat Mar 13, 2010 4:49 pm

Yea i did notice that locational detection one was unreliable partially because of the aim assist. How would turn it off?

Also is there some sort of engine modification that would make the models to(where the mesh makes the hit box so in theory you would be able to shoot between their legs or something. That might increase the reliability of locational hit detection.
Ghost_Fang
 
Posts: 336
Joined: Thu Nov 12, 2009 4:37 am

Postby frag.machine » Sat Mar 13, 2010 5:59 pm

Q2K4 had per-poly collision detection, from an ancient tutorial I found buried inside somewhere. It worked pretty well actually, however there was no support to tell you via QuakeC where a projectile hit the entity.
I know FrikaC made a cgi-bin version of the quakec interpreter once and wrote part of his website in QuakeC :) (LordHavoc)
User avatar
frag.machine
 
Posts: 2090
Joined: Sat Nov 25, 2006 1:49 pm

Postby leileilol » Sat Mar 13, 2010 6:30 pm

darkplaces has HITMODEL, combined that with the new decal system (that applies decals to models) and you'll instantly be in love.

If you use skeletons or tags you could make actual hitboxes on heads and arms and legs with hitmodel for even more accurate locational damage!
i should not be here
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 1 guest