ID:180932
 
I'm posting this in Newbie central cause I might as well be on this one...

I have played with the icon editor, read the DreamMaker doc, read the icon tutorial...

And I can't figure out how the heck to create movement states for an icon/movie. I choose the Edit State... item, and click movement state, and get an M next to the icon, but no apparent movement states.

I try Edit State... again and click movement state and try giving a state name like "East", and I don't get what I want.

I'm thinking there should be some obvious menu item that simply gives an icon/movie the movement states which you can then edit...
This is what I'm using:

You create an image (no M)- this is the 'base' state for when the icon is not doing anything.
Then create an M state and use the movie camera to create the movement animations you want for that image. (so you only have one M state when you open up the dmi.
When the icon moves it should now play the frames for the M state (and show the base state when movement stops).

I've noticed that it works much better with a movement delayer, say sleep(5) in Move(). If you don't delay movement it doesn't give it time to sort things out and sometimes the animation doesn't play or 'stutters'.

I bet the others are glad it's you doing the save tutorial now! - sorry about the cryptic explanation.
In response to Al
On 8/14/00 1:53 am Al wrote:
This is what I'm using:

You create an image (no M)- this is the 'base' state for when the icon is not doing anything.
Then create an M state and use the movie camera to create the movement animations you want for that image. (so you only have one M state when you open up the dmi.
When the icon moves it should now play the frames for the M state (and show the base state when movement stops).

Yes. This is the recommended approach, since it will probably work for all but the most complex icons. When a movement state also has a state name, it will be used when an icon with that particular state is in motion.

I've noticed that it works much better with a movement delayer, say sleep(5) in Move(). If you don't delay movement it doesn't give it time to sort things out and sometimes the animation doesn't play or 'stutters'.

We need to fix this. I'm wondering if Deadron simply wasn't seeing the movements because our default ticker is too fast or something. I'll put this on my barrage of things to test tommorow. Sorry for neglecting the bug reports recently; this forum stuff really had me in a quandry and sucked all my time!
In response to Tom H.
On 8/14/00 2:01 am Tom H. wrote:
I'm wondering if Deadron simply wasn't seeing the movements because our default ticker is too fast or something.


No I couldn't figure out how to create movement states for an icon at all, much less get them to play.

I finally got movement states, but it was confusing.

I wanted to have movement states for my pixmap -- just a different pixmap for each direction. I still don't know if I can do that.

I ended up noticing that if you create a movie and set it to be a movement state, you can find a little Dir popup that lets you specify the number of directions.

This Dir popup is completely hidden functionality the first time through. And the terminology of "movement states" and "icon states" is confusing, because you're never sure which state is meant, or whether they mean the same thing.

The biggest help would probably be to default to four movement states if the user clicks the movement state checkbox. That way when you edit the movie, you immediately see that the movement states are available.

If you can provide movement states for a pixmap, I'd recommend the same thing.
In response to Deadron
On 8/14/00 2:19 am Deadron wrote:

I wanted to have movement states for my pixmap -- just a different pixmap for each direction. I still don't know if I can do that.

You should just be able to make a movie with one frame and four directions. If you only want this icon to appear when the object is moving, set it to a "movement state"; otherwise, just keep it as a normal state (no M). I think the latter is what you are looking for, but I might be reading you wrong.

I ended up noticing that if you create a movie and set it to be a movement state, you can find a little Dir popup that lets you specify the number of directions.

Wait a second ... that popup should _always_ be in the movie dialog. I'll have to check this out (am away from my windoze box at the moment, so wait 'til morning).

I have a funny feeling that the main problem is the admittedly confusing terminology. A "movie" is just our our way of referring to any icon file that has multiple frames and/or directions. An icon with only one frame and four directions is technically a movie in our book, but I think you were expecting it to be a pixmap, since it doesn't animate (like "movie" would lead you to believe). Another of saying this is that a pixmap is just a one frame, one directional movie.

Does this clear things up at all, or am I just making things worse?


In response to Tom H.
I know when I was getting into movement states I thought you had to have more than one .dmi file if you wanted to have an object be still when it was standing and move when it was walking. But I know I only have one icon (with an M) for my Sheep I person, and it works fine.

I could never figure out how to use named icon states. I wasn't sure if the documentation was confusing or I was just dense.

Z
In response to Tom H.
On 8/14/00 2:31 am Tom H. wrote:
Does this clear things up at all, or am I just making things worse?


Well your message indicates I still don't understand some things.

- Movement is theoretically related to declaring the edit state as a movement state, yet I think you just said that it doesn't need to be declared a movement state in order to have movement, and in fact that in some cases I wouldn't want it to be declared as a movement state.

Oy.

Hmm maybe some confusion here is caused because I just want "direction states" -- that is, a pixmap for each direction, unrelated to movement.

- Icon state/movement state/edit state: very hard to know which is what.

- It sounds like you can have a pixmap with the state of "" and a movie with the state of "" (but with an M), and both will be used. That definitely is not apparent.

Could I request a general UI/terminology review here?

And this would be wonderful stuff for the icon tutorial...

In response to Deadron
On 8/14/00 10:25 am Deadron wrote:

Could I request a general UI/terminology review here?

Sure. I'll try to address both your and Zilal's comments here.

When you open up the icon-editor, you have basically two options: clicking on the "paint-palette" or clicking on the "movie camera". Each of these actions will do the same general thing: create a new "icon-state" for your file, eg:
[click on paint-palette] -> [editing] -> [new icon-state]
[click on movie-camera] -> [editing] -> [new icon-state]
We'll worry about the [editing] part in a second. I'm just presenting things this way to make it clear that the paint-palette and movie-editors create entities that are essentially the same.

The point of icon-states is to allow multiple apparent positions/variations of a single object, without having to deal with many files. For instance, suppose you want to make your player appear differently when he is standing or sitting. One way to do this is to make a bunch of different icon files and switch between them. The cleaner way is to make a single icon file that contains two icon-states. Within the editor, you can label the icon-states as "standing" and "sitting". Within your DM code, you can change the icon by just changing the usr.icon_state parameter to either "standing" or "sitting". If one of these states is going to be the default, you can instead name it to the empty string: "". The icons in the old "night-soil" game, for instance, all had a default "" state, a "fighting" state, and a "corpse" state. So if you opened up, say 'warrior.dmi', you would see these three icon-states in the main panel.

Most of the time the designer of the world can control when the different icon-states will become activated. For instance, in night-soil the "fighting" state became active in combat, the "corpse" state in death, etc. There is one exception, though: movement. Some games will want to display critters that perform, say, a "walking sequence" when moving between two adjacent tiles. This is effectively an icon-state that goes into effect at the beginning of movement and halts at the end of it. You can make a state a movement-state by clicking the appropriate check-box when editing it.

Movement states will generally have the default "" state name. If you have an icon with two "" states, one a movement state and one a regular state, the movement state will become visible only during motion. Going back to our first example, we might make our "standing" state just be the default "", and then add an additional "walking" state with a label of "" (movement selected). This approach generalizes to named icon-states. For instance, if you have an icon file with two states named "fighting", one as a regular state and one as a movement state, the movement state will go into effect when the object is in "fighting" state and happens to be moving. I doubt many people will make this many states, though!

Now, what about that [editing] phase? The two different kinds of icon-states are "pixmaps" (paint-palette) and "movies" (movie-camera) A movie is just a grid of pixmaps, with frames on the horizontal axis and directions on the vertical one. Movies may have one, four, or eight directions and any number of frames. You can even make a movie with one direction and one frame. It is just a single pixmap, and that's how the game will treat it. It's probably easier to think of the converse: a pixmap is really just the special case of a unidirectional, uniframe movie.

A simple example of a movie might be a picture of an arrow pointing in the four cardinal directions. It would have four directions and one frame. If you assign this to a player, the different arrows will be displayed dependent on the direction he is facing. The directionality has nothing to do with movement; it's just an unfortunate coincidence that the most common way to switch directions happens to be by moving (hence the confusion with movement-states).

Now suppose you want the arrows to blink in different colors. You can do this by adding a few frames to your movie. So now your arrow icon-state will have, say, four directions and three frames. By default, the player will animate through the frame in the SOUTH direction. As he changes direction, he'll animate through the frames corresponding to the current direction.

Finally, suppose you want the player to only blink when he is actively moving. You can do this by just making the previous state a movement-state. In the main panel, you would have a single state labeled "" (M). On the screen, the player will just see the pixmap correspoding to the first frame of his current direction. As he moves around, he'll see a blinking effect as the movement animation plays. When he stops, the animation will halt and he'll see the first frame of the new direction.

This example addresses Zilal's query: your icon file can consist of a single icon-state with the movement flag checked. The first frame of this icon-state will be displayed normally, while the remaining frames will be played during movement between adjacent tiles. If you were to add another, normal, icon-state to the file, this would take precedence when the object wasn't moving. In general, the server will just fallback on the closest state that it can find.

Terminology review:

Icon: An icon file, eg 'warrior.dmi'.

Icon-state: A single pixmap or movie within the icon file. Icons will consist of one or more icon-states. In the game, a single icon-state is active at any one time, as regulated in the code.

Movement-state: A special icon-state that automatically goes into effect during the "smooth-movement" between adjacent tiles.

Pixmap: An icon state created with the paint-palette editor.

Movie: An icon state created with the movie-camera editor; essentially a collection of pixmaps. The game decides which pixmap to display based on the direction of the corresponding object and the internal world-ticker.

Whew! I hope I covered the big concerns. Tell me if you have any questions.
In response to Tom H.
On 8/14/00 3:17 pm Tom H. wrote:
Whew! I hope I covered the big concerns. Tell me if you have any questions.

This is very helpful, and it would be great to have this information integrated into the icon tutorial, especially if you showed some of the icon editor UI while discussing it.

Some general thoughts on possibly reducing confusion:

- Consider separating the movement flag from the "Edit state" command. There's no reason to think that the way to set the movement flag is to choose "Edit state". And consider changing the name of either "Edit..." or "Edit state..." to avoid confusion. Possibly do away with the "Edit state" command and integrate the functionality into the icon/movie editing panes.

- If the movement flag is set for an icon state, automatically set it to have 4 directions (or popup a question asking how many directions they want). One of the most confusing initial things is setting the movement flag, opening the movie and not seeing the directions represented. And the Dir popup is way too invisible to be noticed by the beginner.

- Think about the terminology and see if you can eliminate the word "state" from one or more things. Also consider never saying "icon" and always saying "icon file". I'd find it less confusing to see the terms like so:

icon file
movie
pixmap
movement flag
direction

I'd be much more comfortable with sentences that said:

"If the movement flag is set for the movie, you can provide a pixmap or movie for each possible direction. If you provide a pixmap for a direction, then that is what shows whenever the character is facing in that direction. If you provide a movie for a direction, then that movie plays when the character moves in that direction..."

Etc. It's when you throw the word "state" into this five times with different meanings that my brain goes on vacation.

Hope this seems more helpful than pushy...
In response to Deadron
On 8/14/00 5:19 pm Deadron wrote:

- Consider separating the movement flag from the "Edit state" command. There's no reason to think that the way to set the movement flag is to choose "Edit state". And consider changing the name of either "Edit..." or "Edit state..." to avoid confusion. Possibly do away with the "Edit state" command and integrate the functionality into the icon/movie editing panes.

The problem is that I don't know a better place to put the movement information. It really is a type of icon-state. Most icon-states go into effect when the corresponding name is explicitely set in the code. Those with the movement flag go into effect automatically when movement is done on a particular icon state. I'm pretty confident that the interface is okay, if I can just find the right way to explain it.

- If the movement flag is set for an icon state, automatically set it to have 4 directions (or popup a question asking how many directions they want). One of the most confusing initial things is setting the movement flag, opening the movie and not seeing the directions represented. And the Dir popup is way too invisible to be noticed by the beginner.

I'm a little confused by this comment. I cannot overstress the fact that the movement flag has nothing to do with directionality. You can even use pixmaps (created with the paint-palette) for icons designated for movement. This just means that those pixmaps will blink into existence whenever the corresponding object moves.

That said, we should just have movies default to 4-directional (I believe they currently default to 1-directional). This should make the directionality quite evident.

- Think about the terminology and see if you can eliminate the word "state" from one or more things. Also consider never saying "icon" and always saying "icon file". I'd find it less confusing to see the terms like so:

icon file
movie
pixmap
movement flag
direction

Good point. I wish that the notation was a bit clearer too. The term "icon" is so ambiguous, since it could refer to a a file, an image, a state, etc.

"If the movement flag is set for the movie, you can provide a pixmap or movie for each possible direction.

This is misleading. Remember, the movement flag doesn't have anything do with whether you can set directions or not. That facillity is just a part of the movie editor whenever you create a new movie. I'm pretty sure this is what is throwing you off. For your purposes, it doesn't sound like you want to set the movement flag at all: you just want a directional movie, right? So just go into the movie editor, select 1-frame, 4-directions, and do that. Then you wont be haunted by this state business!

If you provide a pixmap for a direction, then that is what shows whenever the character is facing in that direction. If you provide a movie for a direction, then that movie plays when the character moves in that direction..."

Yes. And if you don't have the movement flag set for the same (directional) movie, it will just play constantly. In other words, the movement flag doesn't effect what the movie may contain (ie- directions, frames), only when it plays.

Hope this seems more helpful than pushy...

All comments are helpful. Thanks.
In response to Tom H.
On 8/14/00 6:02 pm Tom H. wrote:
I'm a little confused by this comment. I cannot overstress the fact that the movement flag has nothing to do with directionality.

This is misleading. Remember, the movement flag doesn't have anything do with whether you can set directions or not. That facillity is just a part of the movie editor whenever you create a new movie. I'm pretty sure this is what is throwing you off.

Yup -- if I read your last message correctly, the movement flag means the movie only plays once when you move, instead of continuing to play.

I think. But it's still really confusing.

So I went into my icons and turned off the movement flags, and as you predicted they continued to work as intended.

In the end I think it's very hard to grasp the role of something called "Movement" when it doesn't actually impact whether the movie is used for movement.

Perhaps if the checkbox were called "Play movie once on movement"?

In response to Deadron
On 8/14/00 7:41 pm Deadron wrote:
Perhaps if the checkbox were called "Play movie once on movement"?

And if this were done, perhaps change the icon indicating a movement state to a "1"? If I'm understanding the purpose of a movement state now (which I certainly might not be), then a 1 would remind me that this is something that plays once...
In response to Deadron
On 8/14/00 7:41 pm Deadron wrote:

In the end I think it's very hard to grasp the role of something called "Movement" when it doesn't actually impact whether the movie is used for movement.

I see where you are coming from, but, to play devil's advocate for second, realize that this "movement state" does in fact impact how the icon-state is used; when it is set, said icon-state will go into effect during movement; when not-set, the state will always be in effect (animating continously in the case of movies). Both of these criteria of course only hold when the object.icon_state is set to the corresponding value. For movies, the movement-state setting has the often desired effect of having the guy do a little "jig" whilst in motion, but that need not be the case.

Nonetheless, the very fact that it has caused this kind of confusion tells me that we have a definite notational problem. I'll think about your suggestions and at the very least will update the documentation to make things more clear.
I'm replying here because I don't want to get into the suburbs of the post and have the reply lost in obscurity.

Quite basically, I can explain it best with an example:

Download example icon containing movement states, pixmaps, and movies

This (outdated) icon was used in CATs to represent different weapons the player would carry. The blank icon state was used because icon states didn't show up in the old mapper. It was a simple pixmap used to represent the marine. Then, the first state, "Unarmed", was shown whenever the player had no weapon. Whenever the player moved, the movement state with the same name was displayed, meaning the "Unarmed" movement state displayed. Then, when I wanted to change the icons for the player, I would simply modify their icon state, and then they would appear to be carrying a knife, a pistol, etc., which would also show when they were moving.

(I think Saige would recognize this icon too; I sent it to him to clear things up as well.)


In response to Spuzzum
On 8/17/00 12:22 pm Spuzzum wrote:
I'm replying here because I don't want to get into the suburbs of the post and have the reply lost in obscurity.

Quite basically, I can explain it best with an example:

Download example icon containing movement states, pixmaps, and movies


Thanks -- nice little icon there! I love the running.

Sigh -- wish I had any artistic talent.

I did once read through "Drawing on the Left Side of the Brain", and that seemed to help at the time. Though drawing is one thing -- understanding how pixels will effect a 32x32 image is another...