martin2k

Google
 
Web www.martin2k.co.uk

Zelda Game Tutorials - Movement Tutorial by Kjelli

martin2k Games

Home
All Games
Submit Your Games
Forum
Tutorials
Colour Guide/Game Types
Contact


Top 40 Games

Overall
Graphics
Sound/Music
Gameplay


Bottom 40 Games

Overall
Graphics
Sound/Music
Gameplay


Games by Member



Get Password

Please fill in the form if you have forgotten your password.  If you know your password, you can use this form to change it if you wish:

E-mail:

Password:

New password:

Please enter:

Prevoius tutorial < Heart System


Ok, here's the
Movement Tutorial

Introduction

Hello folks, this is my second tutorial about Zelda games. This one shows you how you should move in a Zelda game, and also includes a .GAM file with an example. In it, I have explained FastLoop - 8 Directions as well as I could, so I hope you understand it smile.gif

Getting Started

Ok. First you need a object looking like this :
user posted image

This will be the object that actually moves. Now, this has no in-built movement.
The next thing you need to make, is the Sensors like in static or FastLoop, which this is.. Nevermind.. heh.gif

They have to be sized and positioned like this:
user posted image
Yep, that's the sensors. Now you just need one more part before starting on the hard events. They're not really that hard, once you get the hang of it.

Link Himself is very important if you are to make a Zelda-game. Or if you wanna move around like a shadow, fine by me tongue.gif

Luckily, the example includes the required animations right here

Before you make the events, make four counters. Each for Link's direction. (Up, down, left and right)

How would you make a object move right?
Simple. All you do is to make three events. First make a condition that triggers a loop. Like this:
user posted image
This starts Loop # 2 for the amount of the X-Right-Counter which is set on 5.
Then you need an event like this:
user posted image
This means: Whenever Loop # 2 Is looping and the sensor is not overlapping obstacle background, these objects will move 1 pixel to the right. The faster Loop #2 loops, the faster will they move. This is much better than static this way. With FastLoop, you don't get objects crashed up into the background, or sinking into it when landing. FastLoop is the perfect tool for making a perfect engine.

Now you almost have a complete Right Movement. You need to add the last touch to it before it's ready to use;
user posted image
When the sensor then overlaps the obstacle background, Loop #2 stops, and the counter is set to 0(I don't think it is necessary to set it to 0, but it's just to avoid any bugs)

See? That wasn't too hard. Want me to show you how to make all the other directions as well? Naah, I'd rather not. As much as my fingers are hurting from the writing and editing, I do not want to tire your eyes out. Yet... tongue.gif
Just repeat what you've done, with other loop #'s, with other conditions and other pixel moves, but remember: Don't use several directions on the same Loop! Always use different!

Back to Link. You got to make the hotspot of link in a way that makes Link stand in the middle of the shadow, making it look realistic. Also, make Link play the animation "Walking" whenever you press the arrow you want to move in while the sensor for that direction is not overlapping obstacle background. Make Link play the animation "Stopped" Whenever he is not moving or if he tries to go through obstacle background. Dumb Link, you can't move through obstacle background!

FAQ

Q: Why Loop # 2? Why not 3? Or 25? Or 356?
A: First of all, the Loop # doesn't matter. As long as you have the same loop in the condition, in the trigger. For example if you press the Right arrow, and it starts Loop # 4, the Loop Trigger Condition of the event that moves the object, has to be 4. Like explained above, it's 2 all the time, but if I was to make the object move in another direction, I couldn't use 2 again.
By the way, 356 can't be used in FastLoop. The max is 29.

Q: Why not use the regular built in 8-direction movement?
A: Well, that IS a possibility, but personally, I think it's n00bish. It shows more skill if you use FastLoop, and FastLoop has more possibilities.

Q: Why do you center the sensors on the shadow? Why not on the same positions, but following link instead? And cut the shadow?
A: I thought since I first wanted to make a shadow, in case I was going to make jumps or anything like that, why not just center the sensors on the shadow?

That's all folks.. Remember to download the example here More to come! smile.gif


Prevoius tutorial < Heart System


Please fill in the below form if you have any comments, questions or additional information you want to add about the above information.

* - Mandatory

*Name: E-mail:

*Comments:

*Please type the following code (your comment cannot be accepted without it):

© Martin Allen 1999 - 2006.  Last updated Sunday 02 April 2006 21:23:54 PM.