What is the best location to find tutorials on physics in game development?

后端 未结 2 1302
时光说笑
时光说笑 2021-02-09 19:03

I\'m very new to game development (iPhone/iPad specifically, if that matters at all) and am having a tough time with working with the physics part of animation. Specifically I\'

相关标签:
2条回答
  • 2021-02-09 19:12

    Since you are new to game dev, I would not recommend writing your own physics code if your game is relatively complex. I have two reasons for saying this:

    1. You need to know how to separate physics from game logic, in order to ensure the stability of the physics while maximizing flexibility of game logic.
    2. There are many pitfalls when it comes to designing a physics engine with collision detection, many of which have been solved in existing physics engines.

    If you are still set on writing your own physics, I recommend starting by creating a sandbox application with a good existing physics engine. Look at what parts of the physics engine are exposed, and what parts you would like to have exposed. Next, dig into the physics code to see how the objects are updated according to velocity, simulation gravity, mass, friction, etc. See how collision is detected, and how the engine deals with things like tunneling and collision response for extreme cases.

    Box2D is well-written open-source physics engine, and is included in Cocos2D. You can create a Box2D game template and jump right into it.

    0 讨论(0)
  • 2021-02-09 19:25

    I will give you some links, but, i also have to warn you - implementing physics can be a monster which takes a lot of time and thinking:

    An Introduction to Physically Based Modeling
    Physically Based Modeling: Principles and Practice

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