Please login or register.

Login with username, password and session length
Advanced search  

News:

This forum provides RSS feed. To query recent posts use this url. More...


Author Topic: An actor question and suggestion  (Read 2401 times)

0 Members and 1 Guest are viewing this topic.

brycecovert

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 3
    • View Profile
An actor question and suggestion
« on: August 11, 2005, 02:34:20 AM »

Hi,

This is sort of a two part post. The first half are questions about how the engine works, and the second half is the suggestion.

I know that one of the next features planned to be implemented is the choice between the number of directions.

One feature that I'd really like is to be able to have a truly custom actor.

I may be mixed up on how actors work, but from what I understand, we need for all 8 directions, talking, standing, turning, and walking animations. From what I understand (I'll be honest, I haven't tested it), you need all of these defined in order for an actor to actually work at all. And you aren't able to define custom animations, such as a dance animation, or something of this sort. I could be wrong, and I want to make sure this is how actors work. If it's not, I'd like to be corrected, so I understand how to skip by some unnecessary animations (like turning, and talking for all 8 directions) I will be assuming this is from here that I am, in fact, correct on the way actors work.

A possibly better way would be to allow the developer to define all the spritesets he wants. He can add one for Dance, one for run, or whatever he fancies. They would still follow the same structure as before (ie LEFT = "actors\allig\allig.sprite"). Then (somehow) you seperate out the Talk, Stand, Turn, and Walking to be handled by the script. This, architectually I forsee as the biggest change. The way I would envision the script would be something like this (albeit, I've only used wintermute a day or two, so I'm just going to guess at the method names rather than looking them up in the documentation.): 

Code: [Select]
function Walk(var actor, var angle)
{
   if (angle>=45 && angle < 135)
   {
      actor.PlayAnimation("WALK", "RIGHT");
   }
   if (angle >= 135 && angle < 225)
      actor.PlayAnimation("WALK", "DOWN");
   }
   ...
}

As you can see, this separates the hard coded animations from the actor. Now, instead of hard coding the directions, they'd be better titled views, or something to that extent. An animation can define only one view, or as many as the user wants. In fact, they could divide it up further in 16 animations, but this gets ugly.

Essentially, this would improve the engine in the following ways:

- Make actors infinitely more customizable.
- Make it easier to implement other styles of talking, like dialogue portraits. Since the Talk function is defined by the script, the user can customize it.
- Make it easier to implement 4 directional walkcycles, or more or less, depending on the developers needs.
- Make it possible to add extra, custom animations.
- You will no longer be required to define animations with 8 directions in mind.

Bear in mind that I may have gotten this completely wrong. I do know that doing something like this would be difficult, as the actors are classes, and this does not follow the architecture of the engine. I do, however, feel that making this change would make the engine so much more flexible, and attract more users.

Oh, and one more thing: A keyboard shortcut for adding and removing points on regions would be AWESOME!

How does this sound?
« Last Edit: August 11, 2005, 05:54:45 AM by brycecovert »
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5679
    • View Profile
    • Dead:Code Site
Re: An actor question and suggestion
« Reply #1 on: August 11, 2005, 03:37:13 PM »

Thanks for the suggestion.
Firstly, you don't need to define all eight directions in the .actor file. When any of them is undefined, WME will use the nearest one defined. So if your actor only walks to four directions, you only need to define up/down/left/right. Naturally, there should be at least one direction defined :)

As for more freedom in defining the spritesets, I'm afraid the suggested combination with scripts is not technically possible (at least not at the moment). But I'm planning a major redesign of the actor defintion. Basically it will be very close to your suggestion. You will be able to define any number of directions by their start/end angle and a sprite. I'll probably save this feature for the new toolset, though.

There's one major problem with predefining lots of possible spritesets in one file: the memory usage. Imagine your .actor file would define spritesets for walking, running and dancing. It would take incredible amounts of memory to store all of those. That's why I think it's better to have separate .actor files for various purposes and only load them when they are needed, while unloading the old ones. Note that the 3D characters in WME *do* use the all-in-one approach, because the skeletal animations take up much less space, but I'm afraid it's not feasible for 2D sprites. I think it would be possible to add some scripting methods for pre-caching spritesets and switching them at runtime, though, I'll see.


Quote
Oh, and one more thing: A keyboard shortcut for adding and removing points on regions would be AWESOME!
You can use the Numpad + and - keys for it (the scene view needs to be focused).
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

brycecovert

  • Lurker
  • *
  • Karma: 0
  • Offline Offline
  • Posts: 3
    • View Profile
Re: An actor question and suggestion
« Reply #2 on: August 11, 2005, 06:31:26 PM »

Thanks for the response! This is good to know.

So, if you wanted to have a dancing animation for your actor, what would be the BEST way of going about this in the script?

Thanks again for the engine. It's much cleaner than other products, and closely resembles an engine that I was developing a while back.

Bryce
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5679
    • View Profile
    • Dead:Code Site
Re: An actor question and suggestion
« Reply #3 on: August 11, 2005, 08:46:00 PM »

So, if you wanted to have a dancing animation for your actor, what would be the BEST way of going about this in the script?
Well, it depends on what exactly would you like to achieve. If you only want to play one-time dancing animation, PlayAnim() would be the way to go. But if you wanted the actor to use some dancing-movement :) instead of walking, you'd have to create another .actor file and reload it when needed.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave
 

Page created in 1.008 seconds with 23 queries.