Need help with implementing sonic the hedgehog physics
Posted: Mon Oct 29, 2012 12:39 pm
First of all I would like to say what I'm new in love and all this gamedev stuff so there is probably will be a lot of stuff I'm doing wrong or don't understand. (I'm a desktop/web software developer, not a game developer ) So... ok, let's begin.
I'm working on implementing sonic the hedgehog physics using Sonic Physics Guide and everything was ok (I've made running and jumping physics before doing anything else) until I started implementing solid tiles physics. First of all as I can see I should use per-pixel collisions so I found a library here at forums (collision.lua in .love file) and using it but it's not as good as I wanted (or I just using it wrong) so maybe someone could help me with changing code so it will be more accurate or maybe point me at physics realisation which is better for this project. Next I'm stuck at Slopes And Curves (Solid Tiles article) and everything what is going after it. I just don't understand how to implement all this stuff from this article. (for example I tried to implement gsp constant but it acts very weird, you can enable it by setting gsp_test to true at line 156) So maybe someone will help me with this too.
Here is .love file:
https://dl.dropbox.com/u/1285798/sonic.love
I've commented a code a bit, maybe this will help understand where is what located.
I'm working on implementing sonic the hedgehog physics using Sonic Physics Guide and everything was ok (I've made running and jumping physics before doing anything else) until I started implementing solid tiles physics. First of all as I can see I should use per-pixel collisions so I found a library here at forums (collision.lua in .love file) and using it but it's not as good as I wanted (or I just using it wrong) so maybe someone could help me with changing code so it will be more accurate or maybe point me at physics realisation which is better for this project. Next I'm stuck at Slopes And Curves (Solid Tiles article) and everything what is going after it. I just don't understand how to implement all this stuff from this article. (for example I tried to implement gsp constant but it acts very weird, you can enable it by setting gsp_test to true at line 156) So maybe someone will help me with this too.
Here is .love file:
https://dl.dropbox.com/u/1285798/sonic.love
I've commented a code a bit, maybe this will help understand where is what located.