Page 1 of 1
What's the best collision system for an RPG?
Posted: Wed Dec 16, 2015 7:17 pm
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?
Re: What's the best collision system for an RPG?
Posted: Wed Dec 16, 2015 7:24 pm
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.
Re: What's the best collision system for an RPG?
Posted: Thu Dec 17, 2015 3:11 pm
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
Re: What's the best collision system for an RPG?
Posted: Thu Dec 17, 2015 6:04 pm
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.