A downloadable gamemaker script

Buy Now$7.99 USD or more

Paid version of GameMaker:Studio 2 is required to import.

GameMaker:Studio can be downloaded here: Link

Fully commented code for implementing Fake 3D procedurally animated characters into your game.

Watch the accompanying 6 minute video for a run-through of the theory!

System is used in the game NOMAD


Purchase

Buy Now$7.99 USD or more

In order to download this gamemaker script you must purchase it at or above the minimum price of $7.99 USD. You will get access to the following files:

Procedural Animation F3D Example.gmz 11 kB

Comments

Log in with itch.io to leave a comment.

Hey, I've just implemented this and it's really great but I'd love to know how you went about customising your sprites? I don't have a clue how to get started with this because of how the sprite is drawn. Also would love to know how you handled the arms in NOMAD. Thanks!

I used separate sprites for each body part. They are then moved around or squashed/stretched depending on facing direction. Recommend to check out the video around 2:50 for a visual example.

You can also use a sprite for the legs instead of a draw_line. You just stretch the sprite between the joint co-ords.

The arms are probably the simplest bit - they just point toward the mouse and change depth depending on direction.

Dear,

Have you tried to use such technique in Unity?

(4 edits) (-1)

is it ok if i make in godot and sell it

i need to no

(+1)

Please do not directly copy and resell the code

(1 edit) (-1)

ok

fine

I bought this and I want to rotate the whole character, Do you have any good ideas

Hi recommend to watch the youtube video - at around 2:50 you'll see an example of the effect on a body and head.

You will need to change the depths of the body and head parts depending on the facing direction too. You can do this with an IF statement in the draw event while drawing the parts.

E.g 

if facing direction <180

{

draw head code

draw body code

}

else

{

draw body code

draw head code

}

Deleted 2 years ago

It looks like there is an offset to the hip and leg x position that is dependent on direction.

Recommend start checking the code where you are drawing the legs and specifically look at lengthdir_x functions.

Hope this helps

(1 edit)

I didn't change your code in draw_leg. I tried to find offset there, but I couldn't. =(
"//argument 5 is an offset using the horizontal component of the facing direction"
It's not that

(1 edit)

Fixed Thx!

Deleted 2 years ago

how would I change the sprite?

I've so many questions. Like how would one go about, or is it possible to, alter the type of gait? Like, changing the movementspeed makes the run a sprint, or a dog trot, but how could you make a walk (a gait where both feet touch the ground at one point) or a zombie walk ( one leg doesn't move/drags)?

There is a gait variable that you should play with. You'll find that the default function I am using will look good walking or running. You may want to decrease the amount of "bounce" in the body parts though too.

For a dragging leg, just point it at a static point behind the movement direction - i.e. don't use the counting function to animate it.

I may not have enough knowledge in trig to get any personality with this approach, at least with character animations. Another issue is I'm looking to make a 2D platformer and this seems to be geared towards a faux 3D. Still pretty cool though.

That's fair enough! You should be able to adapt it to 2D platformer though. In that instance the only facing and moving directions of the legs are going to be either 0 degrees (right) or 180 degrees (left)

Is it possible to make walking dog or a monster that has many legs like a spider with this? 

Yes it will be but you'll want to tweak the offset of the counting variable between legs so that you get the timing right.

If you want to do something like a spider, where all the knees are pointing in different directions, you'll need to apply a direction offset to the leg facing direction.