Mapeditor and Collisons
Posted: Fri Dec 09, 2011 5:46 pm
+
TechnoCat wrote:I responded to a PM about using Noah's Ark to learn about sidescrolling and I thought my response could help the general public.TechnoCat wrote: I'm glad you like my Noah's Ark game!
However, I strongly encourage you not to use any of Noah's Ark code and to merely look at it. I wrote that code and created all the graphics during a 48 hour gamejam. It is really messy and really hardcoded! Like you said, take out one thing and it all falls apart.
There are 4 paths to collision detection and resolution for sidescrollers that I will recommend.I hope this helps you get started.
- Use Fizz (or similar, of which I am aware of no others)
- This library was written specifically to be a drop-in solution to making a sidescroller.
- Lightweight
- Very easy
- Might not have all functionality (It tries to be a single solution)
- Use Hardon Collider (My personal favorite path)
- This library is written to purely be a collision detection library, not a collision resolution library. However, detection is the hard part.
- Lightweight
- A little bit of difficulty. (requires you read the HC API)
- Very robust (this library makes almost no assumptions)
- Implement a versatile collision detection library (such as Metanet's)
- To do this you are going to need a really good understanding of Linear Algebra
- You'll still have to resolve collisions after you implement this.
- Use Box2D
- Box2D is often considered unsuitable for sidescrollers. But, Kurosuke and some others get away with it.
- love.physics is actually Box2D