Jump to content

Search the Community

Showing results for tags 'roam'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


Forums

  • HTML5 Game Coding
    • News
    • Game Showcase
    • Facebook Instant Games
    • Web Gaming Standards
    • Coding and Game Design
    • Paid Promotion (Buy Banner)
  • Frameworks
    • Pixi.js
    • Phaser 3
    • Phaser 2
    • Babylon.js
    • Panda 2
    • melonJS
    • Haxe JS
    • Kiwi.js
  • General
    • General Talk
    • GameMonetize
  • Business
    • Collaborations (un-paid)
    • Jobs (Hiring and Freelance)
    • Services Offered
    • Marketplace (Sell Apps, Websites, Games)

Find results in...

Find results that contain...


Date Created

  • Start

    End


Last Updated

  • Start

    End


Filter by number of...

Joined

  • Start

    End


Group


Website URL


Twitter


Skype


Location


Interests

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 http://jsfiddle.net/Batzi/abs191e5/250/ 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 http://jsfiddle.net/Batzi/abs191e5/19/ 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.
×
×
  • Create New...