Difference between revisions of "User:Artisticdude"

From The Battle for Wesnoth Wiki
(Began working on template for future "WML for Complete Beginners" tutorial)
Line 1: Line 1:
 +
'''Template for future "WML for Complete Beginners" tutorial
 +
 +
Note: this is a work in progress.'''
 +
-------------
 +
 +
Hey there!
 +
 +
...blahblahblah random intro rhetoric, explain what WML stands for, what it's used for, etc. Then:
 +
 +
First things first; let's go over the ''syntax'' of WML.
 +
 +
For those of you who might not know what the "syntax" of a language is, think of it as a set of rules for how WML needs to be written in order for the game to understand it. This concept may sound a bit confusing, but whether you realize it or not you have been using the concept of syntax your entire life! Think of the structure of a sentence in English: "I like to eat jelly and cheese sandwiches." That sentence uses a certain set of rules, or ''syntax'' in order to make sense to people who hear or read it. If you said instead, "Like cheese I and sandwiches jelly", that would make no sense, and no one would understand what you were saying. Likewise, if you said "I like cheese sandwiches and jelly", that would change the entire meaning of the sentence!
 +
 +
Just like WML syntax, the syntax of the English language also requires proper capitalization, spelling, grammar and punctuation in order for others to understand what you're saying or writing. If you decided to ignore the syntax of the English language and wrote something like this: "won day mary and i had went to seen the elefant at the zoo it's trunc was reely long", chances are people would not understand much of what you wrote. On the other hand, if you used the correct syntax and wrote: "One day Mary and I went to see the elephant at the zoo. Its trunk was really long!", people can easily understand what you wrote because it is written in the syntax they recognize and understand. Just as people would be unable something if it were not written in the correct syntax, the Battle for Wesnoth game is unable to read any WML that is not written in the correct syntax.
 +
 +
So now let's go over the basics of WML syntax. Later on you will be gradually introduced to more complex WML syntax, but for now we'll just go over the basic stuff, enough to get you started.
 +
 +
 +
 +
 +
 +
 +
 +
 +
 
Template for future "Animating Running Cycles" tutorial
 
Template for future "Animating Running Cycles" tutorial
  

Revision as of 19:46, 7 February 2012

Template for future "WML for Complete Beginners" tutorial

Note: this is a work in progress.


Hey there!

...blahblahblah random intro rhetoric, explain what WML stands for, what it's used for, etc. Then:

First things first; let's go over the syntax of WML.

For those of you who might not know what the "syntax" of a language is, think of it as a set of rules for how WML needs to be written in order for the game to understand it. This concept may sound a bit confusing, but whether you realize it or not you have been using the concept of syntax your entire life! Think of the structure of a sentence in English: "I like to eat jelly and cheese sandwiches." That sentence uses a certain set of rules, or syntax in order to make sense to people who hear or read it. If you said instead, "Like cheese I and sandwiches jelly", that would make no sense, and no one would understand what you were saying. Likewise, if you said "I like cheese sandwiches and jelly", that would change the entire meaning of the sentence!

Just like WML syntax, the syntax of the English language also requires proper capitalization, spelling, grammar and punctuation in order for others to understand what you're saying or writing. If you decided to ignore the syntax of the English language and wrote something like this: "won day mary and i had went to seen the elefant at the zoo it's trunc was reely long", chances are people would not understand much of what you wrote. On the other hand, if you used the correct syntax and wrote: "One day Mary and I went to see the elephant at the zoo. Its trunk was really long!", people can easily understand what you wrote because it is written in the syntax they recognize and understand. Just as people would be unable something if it were not written in the correct syntax, the Battle for Wesnoth game is unable to read any WML that is not written in the correct syntax.

So now let's go over the basics of WML syntax. Later on you will be gradually introduced to more complex WML syntax, but for now we'll just go over the basic stuff, enough to get you started.





Template for future "Animating Running Cycles" tutorial


Animating Running Cycles

by artisticdude


Note: This is a work in progress.


Introduction

I've heard some people say that running cycles are the hardest animation to make. Personally, I disagree with this notion. Running animations involve a lot of work, more so than most other animations (attack, death, defense, etc.), but generally running animations follow a very strict set of rules. Once you fully understand these rules, creating running animations should be little more than investing enough time to see it through.

Note that I assume at least some level of competence in pixel art and animating throughout this tutorial. I also assume that the graphics program you are using supports layers and transparency, although those features are not strictly necessary in order to create a running animation. If you haven't already, I suggest reading the Basic Animation Tutorial and From Base Frame To Full Animation before reading this page further.

In this tutorial, I will demonstrate how to create a standard south-east/south-west facing run cycle by using the Goblin Impaler unit from mainline. Running cycles for different directions (north-east/north-west, south, & north) are drawn at different angles, but the concepts and theories discussed here apply to running cycles in all directions.

Chapter 1: The Theory Behind Running Cycles

Poses

Wesnoth running cycles are split into four distinct poses. Not frames, poses, as in anatomical positions. These positions are:

  • Contact
  • Recoil
  • Passing
  • High Point

Rotation

As you may have noticed in the poses example above, there is a a certain amount of rotation happening over the course of the animation in the hips and shoulder areas. If you

Bobbing

Movement Arcs

Chapter 2: Understanding Your Subject

This is the most important part of the animation. You can come up with eight beautiful frames for you animation, but if the motion of those frames doesn't read as realistic and fluid when played as an animation, you might as well have just doodled meaningless scribbles instead. Understanding your subject's anatomy, equipment and weight will help you immensely in creating a realistic and fluid animation.

Anatomy

It is vital to any animation that you understand your subject's anatomy: where their joints are located, how far and in what direction those joints can bend and/or twist, whether there is a bone beneath the surface of a certain area or whether that area is composed of flexible membrane, etc. etc. This is especially important if your subject is not humanoid, but even for humanoids with non-human appendages or modified human appendages (tails, enormous ears, an extra set of arms, etc.). Before you even open your graphic editing program, study the baseframe of your subject and learn as much as you can about its anatomy.

Equipment

In addition to anatomy, it is paramount that you understand the equipment your subject is wearing/holding, since this will have a significant impact on how the character actually moves. I follow a list of simple steps to help me understand the equipment of the subject, in the form of a series of questions:

  • What exactly is each piece of equipment?
  • What is the three-dimensional shape of each piece of equipment?
  • What is each piece of equipment made of?
    • How flexible or rigid is that material?
  • How much does each piece of equipment weigh individually?

Note that these questions are only to assist in drawing the motion of the object, not in drawing the object itself. To successfully draw and shade an object well, you must ask many additional questions which I won't go into here. If you do not know how to shade an object, I suggest you stop reading this page right now and do more reading up and practice on the subject before continuing.

Weight

Weight is an important concept in running animations, and in all animations for that matter. It can make the subject seem huge and lumbering or light and ethereal. It can give the impression of a stocky dwarf or a nimble elf. You get the idea.

Chapter 3: Direction and Perspective

Direction

So now that we understand how the character should move, it's time to start planning the direction of the movment. In this case, we have to have the subject move from one hex to the neighboring south-east hex, from point A to point B.

atob.png

So what now? Obviously we can't have the unit running at the wrong angle, otherwise it will look like he's sliding when the animation plays in-game. So let's draw a three-dimensional graph to visualize the direction in which the unit will be running:

73920527.png

As you can see, we want our unit to run down the X axis (the red line) in order to reach the adjacent hex. If we were creating a north-east/north-west running animation, we would want the unit to run up the Y axis (the pink line). For now, however, let's stick with the south-east/south-west animation down the X axis.

So this is the path we want our unit to take during the animation:

howtogetthere.png

In terms of individual pixels, the line we used has a pixel angle of "two over, down one, over one, repeat", that is to say, over two pixels, down and over one pixel, then over two pixels, down and over one pixel, etc. To illustrate:

pixelangleinstance.png

It may be helpful for some to have the line be two pixels tall rather than only a single pixel tall, as I did in the first three images above. The same angle still applies, however. Think of it as just placing another single-pixel-tall line on top of another single-pixel-tall line, like so:


thickerline.png


You have now established the direction in which your unit will be moving and facing. You have even set up a helpful guideline to make sure you don't accidentally stray from that direction at some point during the animation process. So now that you have determined the direction, let's talk about the perspective of your animation.

Perspective

Chapter 4: Planning Your Animation

Chapter 5: Details, Details, Details

Chapter 6: Testing Your Animation