Best approach for game animation?

后端 未结 7 1615
独厮守ぢ
独厮守ぢ 2020-12-15 11:13

I have a course exercise in OpenGL to write a game with simple animation of a few objects

While discussing with my partner our design options we\'ve realized we have

相关标签:
7条回答
  • 2020-12-15 12:10

    I'd suggest setting the system up to work on a "delta" that's passed in from outside.

    When I did this, inside the animation format I based everything on real time values. The delta I passed in was 1 / 30 seconds, but it could be anything. With this system you can get either your first or second option, depending on whether you pass in a fixed delta or if you pass in the amount of time that has passed since the last frame.

    As for which is better, it depends on your game and your requirements. Ideally all of your systems would be based around the same delta so that your physics match your animations. If your game drops frames at all and if all of your systems work with a variable delta, I'd suggest the variable delta is the better of the two solutions for end user experience.

    0 讨论(0)
提交回复
热议问题