[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 488: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4787: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4789: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4790: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4791: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3922)
InsideQC Forums • View topic - Additional animation for player models

Additional animation for player models

Discuss programming in the QuakeC language.

Moderator: InsideQC Admins

Additional animation for player models

Postby JasonX » Mon Aug 16, 2010 4:32 pm

JasonX
 
Posts: 422
Joined: Tue Apr 21, 2009 2:08 pm

Postby Handshakes » Mon Aug 16, 2010 10:03 pm

Handshakes
 
Posts: 11
Joined: Sun May 30, 2010 6:53 pm
Location: Detroit, MI

Postby necros » Wed Aug 18, 2010 1:46 am

necros
 
Posts: 77
Joined: Thu Dec 16, 2004 10:32 pm

Postby JasonX » Thu Aug 19, 2010 8:03 pm

JasonX
 
Posts: 422
Joined: Tue Apr 21, 2009 2:08 pm

Postby leileilol » Thu Aug 19, 2010 8:40 pm

Half-Life pulled it off with skeletal blending and bone controllers. It had one walking animation and one running animation. Bone controllers turned the skeleton appropriately.

We don't have this equivelant in Quake yet since a 1997 standard since Jedi Knight is WAY too new.
leileilol
 
Posts: 2783
Joined: Fri Oct 15, 2004 3:23 am

Postby frag.machine » Thu Aug 19, 2010 9:38 pm

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: 2120
Joined: Sat Nov 25, 2006 1:49 pm

Postby necros » Fri Aug 20, 2010 7:01 pm

it might be possible if you wanted to try something similar to the q3 approach. q3 used 3 separate models for all characters, legs, torso and head and kept each component glued to the other via a specially marked triangle called the tag on each of the other components.

of course, even that will not be quite the same as quake doesn't have tag points like q3 does. either you would have to animate each component so that it always looked correct when a zero'd offset relative to the origin of the main model, or you'd have to hard code position offsets for each frame which would be insane.

one thing you could add is the variable speed walk/run animation like in half life. that's to say, if you were walking into a wall and sliding along it slowly, your running animation would play slower than if you were just running straight ahead.

be wary though because this method can mess up frame interpolation in some engines like fitzquake that use .nextthink to determine how fast/slow to interpolate.

if you look at the stock run frame functions for the player, you'll realize that they always run at 0.1 second intervals (the frame macro sets that automatically).
while setting nextthink to higher or lower settings would in theory make the player run faster or slower, this isn't ideal because there are important checks that have to be made in that function that might be delayed too long if you are running slowly.
so we instead go the opposite direction.
we set self.nextthink = time;.
this will make the frame function run every game frame. (you can scale it back to maybe time + 0.02 or 0.04 if you want to increase performance, but honestly, any modern machine should handle it no problem)

next we have to create two new float .variables.
.frameCountGoal and .frameCount.
we're basically creating a proxy instead of incrementing self.walkframe.

.frameCount will increase by 1 modified by frametime every time the function is called, much like .frame was originally.
.frameCountGoal will be dynamically calculated based on movement speed.

finally, we move the self.walkframe = self.walkframe + 1 inside an if statement that checks when self.frameCount > self.frameCountGoal.

it might be wise to create two running animations if you go this route: one full tilt sprinting run and a more jogging run so you can switch from one to the other based on speed (you'll look stupid if you're jogging at light speed or sprinting like molasses). if you make the two animations have the same number of frames, you can even switch between the two preserving relative frames so that you don't always start each animation on the first frame making it look more natural.[/i]
Last edited by necros on Fri Aug 20, 2010 7:04 pm, edited 2 times in total.
necros
 
Posts: 77
Joined: Thu Dec 16, 2004 10:32 pm

Postby JasonX » Fri Aug 20, 2010 7:02 pm

Q3 uses three different body parts and the engine rotates those. It's very smooth, but a pain to model for and, in my opinion, ugly.
JasonX
 
Posts: 422
Joined: Tue Apr 21, 2009 2:08 pm

Postby JasonX » Mon Mar 28, 2011 3:11 am

JasonX
 
Posts: 422
Joined: Tue Apr 21, 2009 2:08 pm


Return to QuakeC Programming

Who is online

Users browsing this forum: No registered users and 2 guests