What's the best collision system for an RPG?

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
1029chris
Prole
Posts: 3
Joined: Mon Dec 14, 2015 10:41 pm

What's the best collision system for an RPG?

Post by 1029chris »

Right now, I'm making an RPG that uses love.physics for the collisions. I feel like that's a bit overkill, and I was wondering what the best system is? Before love.physics I had a simple system that detected wether the x and y of the player collided with a block, but my player could keep glitching inside it, and weird things happened. I probably didn't code it that well, I am just a beginner. I don't want to use any external libraries, I want to learn here, right? What's the best way to implement simple collisions for an RPG?
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: What's the best collision system for an RPG?

Post by Jasoco »

The current agreed upon simple to use collision system for rectangle on rectangle collision resolution is Bump 3.0 by kikito. It's in the projects and demos forum.
User avatar
deströyer
Prole
Posts: 32
Joined: Thu Jun 27, 2013 7:59 pm
Contact:

Re: What's the best collision system for an RPG?

Post by deströyer »

I would recommend implementing AABB-collision (axis-aligned bounding box) if your goal is to implement it yourself, rather than using a library. It's only a couple of lines, and I think it will be challenging enough for you that you will learn without getting discouraged. Try making a simple program where you move squares around, and have them change color when they collide for testing. Once you know it works you can stick it into your game.

Simple AABB won't be any good if your rectangles are going to rotate, though :S
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: What's the best collision system for an RPG?

Post by Jasoco »

You'll still have to write your own resolution. Bump takes care of that for you and offers many options without being overwhelming.
Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 47 guests