Mapeditor and Collisons

Questions about the LÖVE API, installing LÖVE and other support related questions go here.
Forum rules
Before you make a thread asking for help, read this.
Post Reply
dar0n123
Prole
Posts: 7
Joined: Fri Nov 25, 2011 6:10 pm

Mapeditor and Collisons

Post by dar0n123 »

+
Last edited by dar0n123 on Thu Oct 30, 2014 4:39 pm, edited 1 time in total.
User avatar
Jack5500
Party member
Posts: 148
Joined: Wed Dec 07, 2011 8:38 pm
Location: Hamburg, Germany

Re: Mapeditor and Collisons

Post by Jack5500 »

Hey,
If you want to learn how to make tile-based maps, you should check out these great tutorials: https://github.com/kikito/love-tile-tutorial

I've made a map, but I have a problem with collision and my basic question would be which approach to choose. It's supposed to get a platformer (jumping, dieing in gaos etc) and my quetion now would be if I should use physics or stick to pixel movement. Can someone provide a good link to a good approach?

My Code by now, without the "coordinate-movement" player:

http://pastebin.com/F505QxbV
dar0n123
Prole
Posts: 7
Joined: Fri Nov 25, 2011 6:10 pm

Re: Mapeditor and Collisons

Post by dar0n123 »

+
Last edited by dar0n123 on Thu Oct 30, 2014 4:39 pm, edited 1 time in total.
User avatar
Jack5500
Party member
Posts: 148
Joined: Wed Dec 07, 2011 8:38 pm
Location: Hamburg, Germany

Re: Mapeditor and Collisons

Post by Jack5500 »

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.
  • Use Fizz (or similar, of which I am aware of no others)
    1. This library was written specifically to be a drop-in solution to making a sidescroller.
    2. Lightweight
    3. Very easy
    4. Might not have all functionality (It tries to be a single solution)
  • Use Hardon Collider (My personal favorite path)
    1. This library is written to purely be a collision detection library, not a collision resolution library. However, detection is the hard part.
    2. Lightweight
    3. A little bit of difficulty. (requires you read the HC API)
    4. Very robust (this library makes almost no assumptions)
  • Implement a versatile collision detection library (such as Metanet's)
    1. To do this you are going to need a really good understanding of Linear Algebra
    2. You'll still have to resolve collisions after you implement this.
  • Use Box2D
    1. Box2D is often considered unsuitable for sidescrollers. But, Kurosuke and some others get away with it.
    2. love.physics is actually Box2D
I hope this helps you get started.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Bing [Bot], Semrush [Bot] and 4 guests