payload: {"action":"created","issue":{"url":"https://api.github.com/repos/LWJGL/lwjgl3/issues/428","repository_url":"https://api.github.com/repos/LWJGL/lwjgl3","labels_url":"https://api.github.com/repos/LWJGL/lwjgl3/issues/428/labels{/name}","comments_url":"https://api.github.com/repos/LWJGL/lwjgl3/issues/428/comments","events_url":"https://api.github.com/repos/LWJGL/lwjgl3/issues/428/events","html_url":"https://github.com/LWJGL/lwjgl3/issues/428","id":382019060,"node_id":"MDU6SXNzdWUzODIwMTkwNjA=","number":428,"title":"Bullet C API first thoughts","user":{"login":"dustContributor","id":8086687,"node_id":"MDQ6VXNlcjgwODY2ODc=","avatar_url":"https://avatars2.githubusercontent.com/u/8086687?v=4","gravatar_id":"","url":"https://api.github.com/users/dustContributor","html_url":"https://github.com/dustContributor","followers_url":"https://api.github.com/users/dustContributor/followers","following_url":"https://api.github.com/users/dustContributor/following{/other_user}","gists_url":"https://api.github.com/users/dustContributor/gists{/gist_id}","starred_url":"https://api.github.com/users/dustContributor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dustContributor/subscriptions","organizations_url":"https://api.github.com/users/dustContributor/orgs","repos_url":"https://api.github.com/users/dustContributor/repos","events_url":"https://api.github.com/users/dustContributor/events{/privacy}","received_events_url":"https://api.github.com/users/dustContributor/received_events","type":"User","site_admin":false},"labels":[{"id":708021158,"node_id":"MDU6TGFiZWw3MDgwMjExNTg=","url":"https://api.github.com/repos/LWJGL/lwjgl3/labels/Type:%20Maintenance","name":"Type: Maintenance","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":53,"created_at":"2018-11-19T00:31:00Z","updated_at":"2019-04-26T03:42:05Z","closed_at":null,"author_association":"NONE","body":"Hi! This is more of an opinion but now that I've been trying to port my stuff to Bullet's C API and worked a bit with it I'm having doubts about it.\r\n\r\nThe API itself is very awkward to use. I didn't think it'd be a problem but all the indirect handles and indices you have to keep around to operate on things are very annoying.\r\n\r\nThe API refuses to work with structs directly, since it's thought as a client-server architecture, what you have on the \"client side\" are usually int64 handles or int32 indices referring to some item on the server side, and a set of many functions that each mutate/read a field of the logical structure on the server side, one by one.\r\n\r\nThe API is robotics and Python oriented, so I am guessing it only exposes what is useful and practical for both of them.\r\n\r\nThis means that something really useful in games like collision filters isn't there by default, you have to enable it through a plugin. Moreover, something like a kinematic body (like say, a player) isn't there at all, so instead of setting the velocity of the player you have to move it around with instantaneous forces (unless there is actually a way and I'm an idiot), using forces this way is very hard to fine tune player movement or anything really.\r\n\r\nThis also means there is a lot of fluff there that isn't relevant for games at all. There are a lot of core functions there purely dedicated to work with the included visualizer of the physics simulation. Until very recently the only way to load an arbitrary mesh body was through a robotics focused file format, instead of you know, an array of vertices.\r\n\r\nWhat I am trying to say is that the client-server layer between the user and Bullet isn't helping at all. It's just bloat a game doesn't needs.\r\n\r\nNow the thing is that for 3D there aren't many physics libraries to use out there. And out of them all, Bullet is probably the most documented and widely used, although that's the case for the plain C++ library, not the C API, I doubt there is any game made with it.\r\n\r\nIt doesn't means there aren't any alternatives:\r\n\r\n**[Newton Dynamics](https://github.com/MADEAPPS/newton-dynamics)** has a C API, [seems pretty clean](https://github.com/MADEAPPS/newton-dynamics/blob/master/sdk/dgNewton/Newton.h) and it has been used on a few relevant games(Mount & Blade, Frictional Games stuff, ie SOMA and Amnesia). Even less examples although it has a demo project with a bunch of things. It's zlib licenced.\r\n\r\n**[Open Dynamics Engine](https://bitbucket.org/odedevs/)** has been used on a bunch of games (Techland stuff, ie Call of Juarez, Dead Island) and I've read it has a C API... I just don't understand enough of the repo to know where to look for it. Looking for examples I get results from 2006. It's BSD or LGPL licenced. There is a Java port of it but it uses 64 bit floats everywhere and the first issue you see in the repo is an unresolved high garbage creation complaint from 2015, both of them bad signs.\r\n\r\nI think I like more **Newton Dynamics** since it looks more like what you'd expect of a \"proper\" C library. Like a single header with most of the structs and function definitions for starters. I don't really know how hard it'd be to have bindings for it too so people (like me!) can try it out.\r\n\r\nIn any case, for now I'll keep trying to work with Bullet's C API and probably nag the author about some missing functionality as/if I find it, since as I've said in another occasion, with it I can get rid of libGDX as a dependency in my project which is a big plus for me."},"comment":{"url":"https://api.github.com/repos/LWJGL/lwjgl3/issues/comments/486914738","html_url":"https://github.com/LWJGL/lwjgl3/issues/428#issuecomment-486914738","issue_url":"https://api.github.com/repos/LWJGL/lwjgl3/issues/428","id":486914738,"node_id":"MDEyOklzc3VlQ29tbWVudDQ4NjkxNDczOA==","user":{"login":"dustContributor","id":8086687,"node_id":"MDQ6VXNlcjgwODY2ODc=","avatar_url":"https://avatars2.githubusercontent.com/u/8086687?v=4","gravatar_id":"","url":"https://api.github.com/users/dustContributor","html_url":"https://github.com/dustContributor","followers_url":"https://api.github.com/users/dustContributor/followers","following_url":"https://api.github.com/users/dustContributor/following{/other_user}","gists_url":"https://api.github.com/users/dustContributor/gists{/gist_id}","starred_url":"https://api.github.com/users/dustContributor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dustContributor/subscriptions","organizations_url":"https://api.github.com/users/dustContributor/orgs","repos_url":"https://api.github.com/users/dustContributor/repos","events_url":"https://api.github.com/users/dustContributor/events{/privacy}","received_events_url":"https://api.github.com/users/dustContributor/received_events","type":"User","site_admin":false},"created_at":"2019-04-26T03:42:05Z","updated_at":"2019-04-26T03:42:05Z","author_association":"NONE","body":"Cool! I also used it for the functions that expected the void* listener as a parameter, since LWJGL would generate a ByteBuffer parameter with Unsafe..void.p which doesn't really makes sense in this context."}}
other: {"actor":{"display_login":"dustContributor"}}