Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I am a huge novice and this isn't really a programming question, but here I go, say I want to make a game that involves rolling up a ramp like this one:

to move upwards, similar to how it would work in an old Sonic the Hedgehog game or something, how would I go about doing that, where could I find a good recourse to learn this?

share|improve this question

2 Answers 2

first off not to descurage you or anything, but collison detection and response is quite math intensive, but luckily there are some good resourses and frameworks that can help out with this. if you are just looking for a quick fix a toolkit or library is your best bet, otherwise if you want to write it from scratch it is quite complex, but there are some good resources out there.

the Colision detection toolkit is a good one: http://code.google.com/p/collisiondetectionkit/

anther good framework is box2D, but it is a bit more involved, because it requires everything to be set up in a very specific way, but the advantage is, there is a lot of good documentation and less math involved. : "http://box2dflash.sourceforge.net/" (I can only post two links because I'm somewhat new to the site, so I had to quote the URL... sorry)

if you would like to learn about the way collision detection works here is a pretty good tutorial on the subject: http://www.metanetsoftware.com/technique/tutorialA.html

the basic idea in making a ramp like this work in a game, is you need to figure out if your two objects are intersecting... if so you need to determine the amount they are intersecting and find a the vector orthogonal(aka perpendicular) to the surface of the ramp, to push your player or object out of, so it does not intersect... this process is checked every frame or so to make sure the object does not go inside the other object.

share|improve this answer

Here is a good resource for sonic-like tile collisions/interactions http://info.sonicretro.org/SPG:Solid_Tiles

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.
{"cc_re__cc_re__cc_by_sa_3_0": ["                  <li><a href=\"//area51.stackexchange.com\" title=\"proposing new sites in the Stack Exchange network\">Area 51</a></li>\r\n                        <li><a href=\"//careers.stackoverflow.com\">Stack Overflow Careers</a></li>\r\n                    \r\n                </ol>\r\n            </td>\r\n    </tr>\r\n</table>\r\n                </div>\r\n            </div>\r\n\r\n            <div id=\"copyright\">\r\n                site design / logo &#169; 2015 stack exchange inc; user contributions licensed under <a href=\"http://creativecommons.org/licenses/by-sa/3.0/\" rel=\"license\">cc by-sa 3.0</a> \r\n                with <a href=\"http://blog.stackoverflow.com/2009/06/attribution-required/\" rel=\"license\">attribution required</a>\r\n            </div>\r\n            <div id=\"svnrev\">\r\n                rev 2015.4.21.2498\r\n            </div>\r\n            \r\n        </div>\r\n    </div>\r\n    <noscript>\r\n        <div id=\"noscript-warning\">Game Development Stack Exchange works best with JavaScript enabled<img src=\"http://pixel.quantserve.com/pixel/p-c1rF4kxgLUzNc.gif\" alt=\"\" class=\"dno\">"], "copyright__copyright__copyright": [" out of, so it does not intersect... this process is checked every frame or so to make sure the object does not go inside the other object.\n\nshare|improve this answer\n\nHere is a good resource for sonic-like tile collisions/interactions http://info.sonicretro.org/SPG:Solid_Tiles\n\nshare|improve this answer\n\nYour Answer\n\n\u00a0\ndiscard\n\nBy posting your answer, you agree to the privacy policy and terms of service.\n\nNot the answer you're looking for? Browse other questions tagged or ask your own question."]}