Help with Ultima Online-style movement system using only two walk animations

Not favoritedFavorited Favorited 0 favourites
  • 5 posts
From the Asset Store
Game with complete Source-Code (Construct 3 / .c3p) + HTML5 Exported.
  • Hi everyone,

    I'm trying to create a movement system similar to Ultima Online, where the player moves while holding down the right mouse button and stops when it's released.

    The biggest challenge I'm facing is with the animations. I only want to use two walk animations: WalkNorth and WalkSouth.

    - When the player moves down, it should play WalkSouth.

    - When moving up, it should play WalkNorth.

    - When moving left or right, it should play WalkSouth, but mirrored depending on the direction.

    - When moving diagonally upward, it should play WalkNorth, also mirrored based on the direction.

    This logic has been holding me back for days, and I'm starting to feel discouraged. If anyone could take a look at my Construct 3 project and help adjust it, I would be extremely grateful!

    Thanks in advance!

    drive.google.com/file/d/1iMbS9mwGt_bKA7Z5pG-UqAB1e3j_9B2K/view

  • Maybe:

    Player: 8dir: is moving ?

    — player: play animation sin(self.8dir.movingAngle)<0?”walkNorth”:”walkSouth”

    —player: set width to abs(self.width)*(cos(self.8dir.movingAngle)<0?-1:1)

  • Hi R0J0hound,

    First of all, thank you for taking the time to reply — and for sharing such an elegant and minimalistic piece of code. I really liked it.

    I tried to replicate your setup, but I’m not sure if I configured everything correctly. The player moves fine using the Move To behavior, but the animations don’t seem to switch properly. The only animation that plays is WalkSouth, and it doesn’t mirror, so the character only animates in one direction.

    What I’m trying to achieve is something similar to Island Paradise ( from meteor games, a facebook old game ) in terms of animation switching, but with the Ultima Online style of movement control — basically, the best of both worlds: minimal drawing and animation work with simple, intuitive control.

    The link from a Island Paradise video on youtube to show what a mean about to have just 2 animations going on for front and back side in 3/4 angle:

    youtube.com/watch

    Thanks again for your help!

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • If you’re using the move to behavior to move the object then you need to use the moving angle of that. I only used 8dir as an example as I had no idea what behavior you used to move.

    On a slightly unrelated note I see you used pi/180 in your expressions. That isn’t needed. Construct uses degrees for everything so you practically never have to convert to radians.

  • Got it 🙂

    From what I understand, your code assumes that I have only one Player sprite, but actually I have a PlayerMove sprite (which handles movement) and a Player sprite (which handles animations). They are already connected through events.

    Would it be possible to adapt your code to this situation?

    How would it look?

    Could you show me a working example please?

    When the button is released, the character stops and switches to the "Idle" animation.

    While moving, it plays "WalkSouth" or "WalkNorth" depending on the direction.

    And I was thinking, I’d like to improve this by adding a small feature:

    👉 If the mouse is more than 250 pixels away from the player, the character should run instead of walk — switching to a "RunSouth"/"RunNorth" animation and moving faster.

    👉 If the mouse is closer than 250 pixels, the character should walk normally.

    I’d love to implement this

    Thanks in advance for any tips or examples you can share! 🙏

Jump to:
Active Users
There are 0 visitors browsing this topic (0 users and 0 guests)