利用者:Agoose77/BGE API Proposal

提供: wiki
< 利用者:Agoose77
2018年6月29日 (金) 05:54時点におけるYamyam (トーク | 投稿記録)による版 (1版 をインポートしました)
(差分) ← 古い版 | 最新版 (差分) | 新しい版 → (差分)
移動先: 案内検索

BGE Python API

Exposing bullet to Python

Panda3D has some nice accessibility to Bullet in their Python API http://www.panda3d.org/reference/1.8.1/python/namespacepanda3d.bullet.php Whether or not one would need to consider changing the existing api for the KX_GameObject (to return generic features, moving the bullet features into the RigidBody objects as Panda does) remains to be seen. At the simplest the following features would be useful to expose:

  1. Contact testing between two bodies
PhysicsWorld.contact_test_pair(KX_GameObject pair0, KX_GameObject pair1)
  1. Get objects by physics type
  2. Change physics type in game
  3. Ray testing features (nearest, all)


Exposing full gameloop behaviour to the API

Current we have access to the game loop next_frame() through the HIVE commits. However, there is no ability to step a single component of the gameloop. Instead we can only tick a single NextFrame. It would be useful to be able to specify the tick order, and when we wish to tick certain components. It may make sense to put these in a separate module, like bge.gameloop:

  1. tickPhysics()
  2. tickRender()
  3. tickLogic()
  4. tickSound()