View unanswered posts | View active topics It is currently Wed Apr 24, 2024 12:03 am



Reply to topic  [ 21 posts ]  Go to page 1, 2  Next
 Walkpath Tutorial 
Author Message
User avatar

Joined: Sun May 11, 2008 12:50 pm
Posts: 899
Reply with quote
Post Walkpath Tutorial
Numgun requested a walkpath tutorial:

Things you'll need:

Calculator - Optional
MSPaint - or any other program that shows offsets
NotePad - Obviously
Registered version of CC - You'll need the actor veiwer

Lets take a look at the walkpath code:

Code:
StartOffset = Vector

Defines the 0,0 point for future offsets, its start offset is the actor's hip joint.

Code:
StartSegCount = N

Causes the game to skip the first N AddSegment lines when not needed, (N being any number larger than zero) so actors can climb steep hills without having to raise their foot all the time. (Only when climbing)

Code:
AddSegment = Vector

Adds a segment in the walk "animation", will be explained in the next sections.

Code:
SlowTravelSpeed =
NormalTravelSpeed =
FastTravelSpeed =

Not sure what slow and fast do, but NormalTravelSpeed is the speed the actor moves his legs. (The others can be ignored, they're a feature Data wanted to add to CC)

Code:
PushForce =

Don't know...

How do we start:

Start by copying the coalition light's torso code into a new a .ini, scroll down to the walkpath area and delete all the AddSegment lines. Do not erase the StartSegCount and StartOffset lines!
Change StartSegCount to 0. (We won't be using this for this tutorial, I might add a section about this var in the future)

Open the actor veiwer and start working, reload actor data whenever you make a change:

Now we begin by adding one add segment like so:
Code:
      AddSegment = Vector
         X = 0
         Y = 5  //You don't normally have to use five, I will in this tut

This is the first part of the walking animation, our actor will his foot by 5 pixels.

Now, press the move right key and have him raise his foot and take a pic:
Image

Now we want out actor to move his foot backwards and take it forward again so we draw a dotted "line" following the path like so:
Image
(The first dot should be in the center of the foot)

Now here comes the part where I think most people fail:
Look at the offset of the 1st dot: 50,50
And now the 2nd: 48,55
So the X drops by 2 and the Y gets added 5 so your next segment should look like this:
Code:
      AddSegment = Vector
         X = -2
         Y = 5

Now for the next segment:
2nd offset: 48,55
3rd offset: 44,56
So now:
Code:
      AddSegment = Vector
         X = -4
         Y = 1

And the one after that:
3rd offset: 44,56
4th offset: 37,57
So:
Code:
      AddSegment = Vector
         X = -7
         Y = 1

And finally:
4th offset: 37,57
5th offset: 28,58
Code:
      AddSegment = Vector
         X = -9
         Y = 1


And you're done, that wasn't as hard you thought it was right? Play around with these variables and make your own awesome walkpaths!

If you find any spelling/math errors/know what other vars do, please tell me.
Sorry if my bad grammar is confusing and hope I was able to help.

(Note: The walkpath in this tut is very basic and probably looks bad, don't expect to much)

Edit: Fixed image links
Edit: Added info about the other variables

Thanks to No_0ne and comment for explaining the StartSegCount.
Thanks to Capnbubs for explaining the travel speed variables.


Last edited by Roon3 on Fri Nov 27, 2009 12:49 pm, edited 6 times in total.



Thu Jan 15, 2009 9:50 pm
Profile WWW
User avatar

Joined: Sat Jul 12, 2008 12:17 am
Posts: 49
Reply with quote
Post Re: Walkpath Tutorial
This seems oddly useful.


Kudos dude.




Gonna go muck with it now.


Thu Jan 15, 2009 10:33 pm
Profile
User avatar

Joined: Tue Oct 14, 2008 11:07 pm
Posts: 112
Reply with quote
Post Re: Walkpath Tutorial
Roon3 wrote:
Code:
StartOffset = Vector

Defines the 0,0 point for future offsets, don't know where it starts.

Code:
StartSegCount = N

Causes the game to skip the first N AddSegment lines. (N being any number larger than zero)

Code:
PushForce =

Don't know...

My knowledge of walkpaths is very basic, but I think I can help with these.

I think that the 0,0 point for StartOffset is the join of the leg. I know that increasing the Y value of the offset will make the leg's foot start out further down. I didn't count the pixels, but it did appear to be the hip-to-foot offset.

StartSegCount, according to some other source whose name I've forgotten, skips the first N segments when the walkpath loops. I guess it's there to allow the leg to get out of standing position before the walkpath proper starts.

PushForce has something to do with either the force that the actor exerts on the ground when walking, or the force that the leg applies up on the actor in order to keep it upright.


Thu Jan 15, 2009 11:47 pm
Profile
User avatar

Joined: Wed Feb 14, 2007 5:37 am
Posts: 350
Reply with quote
Post Re: Walkpath Tutorial
Roon3 wrote:
Code:
StartOffset = Vector

Defines the 0,0 point for future offsets, don't know where it starts.

It starts at where the leg's jointoffset, or where the leg rotates on the body.
Comment wrote:
StartSegCount, according to some other source whose name I've forgotten, skips the first N segments when the walkpath loops. I guess it's there to allow the leg to get out of standing position before the walkpath proper starts.

StartSegCount is the number of the first movements that are skipped when they are not needed, so they can walk up steep hill and flat terrain with equal efficiency, without looking like stomping morons.


Fri Jan 16, 2009 12:23 am
Profile WWW
User avatar

Joined: Sun May 11, 2008 12:50 pm
Posts: 899
Reply with quote
Post Re: Walkpath Tutorial
Thanks you two, added this info to the OP.


Fri Jan 16, 2009 8:27 am
Profile WWW

Joined: Sat Feb 03, 2007 7:11 pm
Posts: 1496
Reply with quote
Post Re: Walkpath Tutorial
That's a lot better than what I would've wrote.

I usually just fudge with it until I get something really cool. :grin:


Fri Jan 16, 2009 5:05 pm
Profile WWW
User avatar

Joined: Sun May 11, 2008 12:50 pm
Posts: 899
Reply with quote
Post Re: Walkpath Tutorial
Wow, thanks Zalo.
Has anyone tried making the walkpath used in this tutorial? If so, how does it look? (Good, bad, etc...)


Fri Jan 16, 2009 9:27 pm
Profile WWW
User avatar

Joined: Sun Jul 13, 2008 9:57 am
Posts: 4886
Location: some compy
Reply with quote
Post Re: Walkpath Tutorial
this helped making a huge tank, i was wondering why it was floating :-o


Sun Jan 18, 2009 6:21 am
Profile WWW
DRL Developer
DRL Developer
User avatar

Joined: Wed Dec 13, 2006 5:27 am
Posts: 3138
Location: A little south and a lot west of Moscow
Reply with quote
Post Re: Walkpath Tutorial
Just an addition to the tutorial, the pushforce (as far as I can tell) is how much impulse force the walk path applies. It determines how much it eats away at terrain and how much force it puts onto actors.


Sun Jan 18, 2009 10:35 pm
Profile WWW

Joined: Fri Dec 12, 2008 12:45 pm
Posts: 48
Reply with quote
Post Re: Walkpath Tutorial
from testing i know that push force is the force applied to the movement between
the vector points if you put 999999999999999999999 push force it will send your
actor/s leg flying to the direction it was supposed to move to
Comment wrote:
Push Force has something to do with either the force that the actor exerts on the
ground when walking,
or the force that the leg applies up on the actor in order
to keep it upright.


the bold line is sort of right
its the force exerted by the foot on the direction it was set to move to.
dosent have to be the ground..



short version

low = looks like anemic kid trying to run a marathon
high = looks like strongest man on earth to hug a kid without causing to die


Fri Jan 23, 2009 10:29 pm
Profile
User avatar

Joined: Mon Mar 26, 2007 1:15 am
Posts: 593
Location: UK
Reply with quote
Post Re: Walkpath Tutorial
Roon3 wrote:
Code:
SlowTravelSpeed =
NormalTravelSpeed =
FastTravelSpeed =

Not sure what slow and fast do, but NormalTravelSpeed is the speed the actor moves his legs. (The others must have to do with special conditions)


Data says that the slow and fast variables were intended for different movement speeds he was planning on adding into the game, but they are currently not used and so can be ignored.


Sat Feb 28, 2009 4:18 pm
Profile
User avatar

Joined: Sun May 11, 2008 12:50 pm
Posts: 899
Reply with quote
Post Re: Walkpath Tutorial
Thanks again bubs, edited the OP to reflect this.


Sat Feb 28, 2009 4:35 pm
Profile WWW
User avatar

Joined: Tue Mar 20, 2007 6:57 pm
Posts: 34
Location: Dan's old Country :)
Reply with quote
Post Re: Walkpath Tutorial
Hey, thanks Roon!
I've always understood the basic mechanic of Walkpaths but have never bothered to actually try editing one until now, as everything feels a lot easier from just knowing that there is a tutorial in that browser window.

A bit off topic, do you think one could make a item that (using lua) would make a character switch to use his FastTravelSpeed/SlowTravelSpeed? I know the performance-boosting energy drink is overdone, but there could be some other interesting uses for, like a gun that slows enemy characters.


Mon May 18, 2009 3:22 pm
Profile
User avatar

Joined: Sun May 24, 2009 1:06 pm
Posts: 7
Location: GB
Reply with quote
Post Re: Walkpath Tutorial
In theory I should be able to make my actors duck walk, no?


Tue May 26, 2009 1:34 pm
Profile
User avatar

Joined: Sun May 11, 2008 12:50 pm
Posts: 899
Reply with quote
Post Re: Walkpath Tutorial
Yeah, I guess, lemme try...

Edit:
Image
Yep, works


Tue May 26, 2009 2:59 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 21 posts ]  Go to page 1, 2  Next

Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware for PTF.
[ Time : 0.067s | 16 Queries | GZIP : Off ]