{"action":"created","issue":{"url":"https://api.github.com/repos/raysan5/raylib/issues/91","repository_url":"https://api.github.com/repos/raysan5/raylib","labels_url":"https://api.github.com/repos/raysan5/raylib/issues/91/labels{/name}","comments_url":"https://api.github.com/repos/raysan5/raylib/issues/91/comments","events_url":"https://api.github.com/repos/raysan5/raylib/issues/91/events","html_url":"https://github.com/raysan5/raylib/issues/91","id":137224812,"number":91,"title":"[physac] Redesign physics module (simplify)","user":{"login":"raysan5","id":5766837,"avatar_url":"https://avatars.githubusercontent.com/u/5766837?v=3","gravatar_id":"","url":"https://api.github.com/users/raysan5","html_url":"https://github.com/raysan5","followers_url":"https://api.github.com/users/raysan5/followers","following_url":"https://api.github.com/users/raysan5/following{/other_user}","gists_url":"https://api.github.com/users/raysan5/gists{/gist_id}","starred_url":"https://api.github.com/users/raysan5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raysan5/subscriptions","organizations_url":"https://api.github.com/users/raysan5/orgs","repos_url":"https://api.github.com/users/raysan5/repos","events_url":"https://api.github.com/users/raysan5/events{/privacy}","received_events_url":"https://api.github.com/users/raysan5/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/raysan5/raylib/labels/enhancement","name":"enhancement","color":"84b6eb"}],"state":"closed","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/raysan5/raylib/milestones/3","html_url":"https://github.com/raysan5/raylib/milestones/raylib%20v1.5","labels_url":"https://api.github.com/repos/raysan5/raylib/milestones/3/labels","id":1510646,"number":3,"title":"raylib v1.5","description":"Some desired features for the new milestone:\r\n   - Review drawing order (use separate buffers for 2d and 3d)\r\n   - Add basic GPU stats system (draw calls, vertex processed, textures memory, frame time)\r\n   - Procedural image generation functions\r\n   - Procedural mesh generation functions\r\n   - LUA scripting support\r\n","creator":{"login":"raysan5","id":5766837,"avatar_url":"https://avatars.githubusercontent.com/u/5766837?v=3","gravatar_id":"","url":"https://api.github.com/users/raysan5","html_url":"https://github.com/raysan5","followers_url":"https://api.github.com/users/raysan5/followers","following_url":"https://api.github.com/users/raysan5/following{/other_user}","gists_url":"https://api.github.com/users/raysan5/gists{/gist_id}","starred_url":"https://api.github.com/users/raysan5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raysan5/subscriptions","organizations_url":"https://api.github.com/users/raysan5/orgs","repos_url":"https://api.github.com/users/raysan5/repos","events_url":"https://api.github.com/users/raysan5/events{/privacy}","received_events_url":"https://api.github.com/users/raysan5/received_events","type":"User","site_admin":false},"open_issues":5,"closed_issues":6,"state":"open","created_at":"2016-01-17T01:24:21Z","updated_at":"2016-03-23T15:40:07Z","due_on":null,"closed_at":null},"comments":4,"created_at":"2016-02-29T11:19:55Z","updated_at":"2016-03-23T15:40:07Z","closed_at":"2016-03-23T15:40:07Z","body":"Physics module requires some redesign. It could be simplified for easier usage.\r\n\r\nProposed solution consist of keeping an internal physic objects pool and just update them all every frame (it also allows to move physics to a separate thread in the future).\r\n\r\nPossible struct for PhysicObject:\r\n```c\r\ntypedef struct PhysicObject {\r\n    unsigned int id;\r\n    Transform transform;\r\n    Collider collider;\r\n    Rigidbody rigidbody;\r\n    bool enabled;\r\n} PhysicObject;\r\n```\r\n\r\nSome posible functions:\r\n```c\r\nvoid InitPhysics(void);          // Create pointers array to store physic objects\r\nvoid ClosePhysics(void);         // Unload physic objects\r\nvoid UpdatePhysics(void);        // Go through physic objects list and update them\r\nPhysicObject *LoadPhysicObject(void);     // Create a new physic object and put into the internal list\r\n```\r\n\r\nUsage example:\r\n```c\r\nPhysicObject *player = LoadPhysicObject();\r\nplayer.transform.position = (Vector2){ 100, 100 };\r\n```"},"comment":{"url":"https://api.github.com/repos/raysan5/raylib/issues/comments/200399947","html_url":"https://github.com/raysan5/raylib/issues/91#issuecomment-200399947","issue_url":"https://api.github.com/repos/raysan5/raylib/issues/91","id":200399947,"user":{"login":"raysan5","id":5766837,"avatar_url":"https://avatars.githubusercontent.com/u/5766837?v=3","gravatar_id":"","url":"https://api.github.com/users/raysan5","html_url":"https://github.com/raysan5","followers_url":"https://api.github.com/users/raysan5/followers","following_url":"https://api.github.com/users/raysan5/following{/other_user}","gists_url":"https://api.github.com/users/raysan5/gists{/gist_id}","starred_url":"https://api.github.com/users/raysan5/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/raysan5/subscriptions","organizations_url":"https://api.github.com/users/raysan5/orgs","repos_url":"https://api.github.com/users/raysan5/repos","events_url":"https://api.github.com/users/raysan5/events{/privacy}","received_events_url":"https://api.github.com/users/raysan5/received_events","type":"User","site_admin":false},"created_at":"2016-03-23T15:40:07Z","updated_at":"2016-03-23T15:40:07Z","body":"Redesign completed with commit https://github.com/raysan5/raylib/commit/db3dd9d200f0c70538960c61ce43c00bfd4a2182"}}