Please login or register.

Login with username, password and session length
Advanced search  

News:

Forum rules - please read before posting, it can save you a lot of time.

Author Topic: Actor walking  (Read 4617 times)

0 Members and 1 Guest are viewing this topic.

Art

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 54
    • View Profile
Actor walking
« on: March 07, 2006, 12:02:52 PM »

I have a question:
It seems to me, that after i prepare actor's walk animation and actor is walking on the scene, it take a little bit more delta, then it's set in walk animation sprite. May me some constant (about 2-3 pixels more) made by engine.
If so, can i turn off it, and make my actor move only on deltas i've put in the walk sprite animation?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Actor walking
« Reply #1 on: March 07, 2006, 02:38:34 PM »

The walking speed is automatically adjusted according to actor's current scale.
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Art

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 54
    • View Profile
Re: Actor walking
« Reply #2 on: March 07, 2006, 09:40:30 PM »

Then why walking looks different when i look it in sprite editor (it's good) and in engine (it's slips a little bit more, then in sprite editor)?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Actor walking
« Reply #3 on: March 08, 2006, 07:49:42 AM »

Because it's scaled in game?
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Art

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 54
    • View Profile
Re: Actor walking
« Reply #4 on: March 08, 2006, 08:36:05 AM »

I don't think so, i've set 100% scale to my scene - result is the same...
But it seems to me that except moving by deltas in sprite, engine adds some more delta to character's moving.
For example, if i make walking sprite with only one frame without moving delta - it's moved by engine anyway (see generic actor from tutorial). So does the shifting of actor done by engine only for _one frame sprite without moving_, or the same _additional_ shifting is performed by engine always?
Logged

Art

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 54
    • View Profile
Re: Actor walking
« Reply #5 on: March 08, 2006, 08:43:26 AM »

Even more:
I've just created right walking sprite, which actually moves left.

Code: [Select]
SPRITE {
  NAME="right"
  LOOPING=TRUE
  CONTINUOUS=FALSE
  PRECISE=TRUE
  FRAME {
    DELAY = 25
    MOVE {-10, 0}
    KEYFRAME=FALSE
    IMAGE = "actors\student\rr\right001.png"
    HOTSPOT {110, 421}
    EDITOR_SELECTED=TRUE
  }

  FRAME {
    DELAY = 25
    MOVE {-10, 0}
    KEYFRAME=FALSE
    IMAGE = "actors\student\rr\right001.png"
    HOTSPOT {110, 421}
  }

}

But when i try it in engine, it still canmove right.
So my opinion is that it should not :)
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Actor walking
« Reply #6 on: March 08, 2006, 09:04:15 AM »

Well actually the algorithm is relatively complex, because the actor needs to follow the walking "line", which determines the walking direction. And how fast the actor moves along the line is determined by the "Move X/Y" setting from the walking animation. The move values are scaled according to current scale to adjust walking speed, the values are taken *absolute* and the actor always moves at least by one pixel (so that he doesn't get stuck in case there's no move set at all).
Logged
Yes, I do have a twitter account
Please don't send me technical questions in private messages, use the forum. ::wave

Art

  • Occasional poster
  • **
  • Karma: 0
  • Offline Offline
  • Posts: 54
    • View Profile
Re: Actor walking
« Reply #7 on: March 08, 2006, 09:06:30 AM »

That's what i needed to know.
So as i see there is no way to turn this one-pixel-moving off?
Logged

Mnemonic

  • WME developer
  • Administrator
  • Addicted to WME forum
  • *
  • Karma: 41
  • Offline Offline
  • Gender: Male
  • Posts: 5683
    • View Profile
    • Dead:Code Site
Re: Actor walking
« Reply #8 on: March 09, 2006, 09:47:48 AM »

No, but that "one-pixel-minimum" is really only used when there's no Move X/Y set in SpriteEdit so there's no point in removing this functionality.
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 0.017 seconds with 20 queries.