Jump to content

Search the Community

Showing results for tags 'smooth animation'.

  • 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 1 result

  1. Hey guys, Sorry if it is trivial stuff, but I have not found any solution to this issue anywhere. What I have: I have a snake grid-based game with enemies which could move as well. Snake speed can vary and it could move faster or slower, as well as the enemies speed. The animation is independent of the rest of the game, so I just move snake and enemies every N ms one tile and then redraw their positions. What is the issue: This animation does not provide smooth snake movement, because it moves by tiles (120px) and I am struggling to make a smooth snake and enemies movement. What have I tried: I tried to move enemy and snake every 30 frames and then make a tween animation with 30 frames delay to the destination enemy/snake x/y coordinates. When the snake moved faster, I waited 20 frames. This solution is really ugly and if frames drop occurs, the whole game starts to freeze. Also, different fps provide different game speed. Please advise me how I can achieve the smooth movement, I want to have the animation independent of the main game loop which moves everything by tiles, and I want to have the ability to increase/decrease the speed of snake and enemies. Thanks!
×
×
  • Create New...