Search the Community

Showing results for tags 'roam'.

More search options

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Coding and Game Design
  • Frameworks
    • Phaser 3
    • Phaser 2
    • Pixi.js
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start



Website URL





Found 2 results

  1. So I have 3 different characters (using the same sprite at the moment). They are supposed to roam given a predefined path for each. I am using 3 different loops so that they start at different times. I don't want them to start and stop at the same time. Trying to make it as natural as possible and so far I got this Can someone suggest improvements? I need to make it look as smooth and natural as possible.
  2. So I have this demo below before I explain what I am trying to do So I am using the function 'moveToXY()' to move my character. Every 5 seconds it's moving towards a different direction. I am using SetTimeout() as you can see in the code. All animations are applied so everything is working as intended. In the update(), I am specifying when the character should stop (ex: if it reaches a specific x & y). However, I want to declare a predefined path such as this one var path = [[1700, 800], [1600, 800], [2300, 800]];and have my character roam around but I don't want to duplicate the setTimeout. How would you approach this problem? PS: Ignore the coordinates in path. They're out of proportions.