[library] bump.lua v3.1.4 - Collision Detection

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
I~=Spam
Party member
Posts: 206
Joined: Fri Dec 14, 2012 11:59 pm

Re: [library] bump.lua v3.1.4 - Collision Detection

Post by I~=Spam »

Maybe it could be a user configurable option to have marios bounding box change to work on a ramp when in contact with a ramp (but it will use the normal bounding box for checking for collisions with normal objects.)
My Tox ID: 0F1FB9170B94694A90FBCF6C4DDBDB9F58A9E4CDD0B4267E50BF9CDD62A0F947E376C5482610
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: [library] bump.lua v3.1.4 - Collision Detection

Post by kikito »

@Positive07 Thanks for taking the time to explain yourself with images, it makes understanding what you propose infinitely easier. I however think that your solution would be more complex than any of the ones I have proposed myself. I doubt I will be following your train of thought, but I am thankful for your feedback nonetheless.

@I~=Spam That is what I was hinting on when I talked about "using a filter". You would set a variable on, and then "filter out" collisions with tiles when on top of a ramp. The fact that you didn't understand what I meant exemplifies very well the problem of this approach. Filters are the most difficult thing to "get" about bump.lua, and I hesitate to rely on them.

I have almost completely discarded that option; I am presently alternating between "center of feet + buffer" and "corners of feet + displacement when drawing". Each has its pros and cons. We'll see.
When I write def I mean function.
User avatar
Jasoco
Inner party member
Posts: 3725
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: [library] bump.lua v3.1.4 - Collision Detection

Post by Jasoco »

I think if anything, give us the second option where the ramp is offset from the graphics. At least it would still work in other cases.
bobbyjones
Party member
Posts: 730
Joined: Sat Apr 26, 2014 7:46 pm

Re: [library] bump.lua v3.1.4 - Collision Detection

Post by bobbyjones »

I actually think two collision boxes is a way simpler solution. One for ramps and one for everything else.
Ethan-Taylor
Prole
Posts: 34
Joined: Mon Nov 24, 2014 9:15 pm

Re: [library] bump.lua v3.1.4 - Collision Detection

Post by Ethan-Taylor »

You should try adding circular and triangular collision boxes.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: [library] bump.lua v3.1.4 - Collision Detection

Post by kikito »

I don't think you realize what you are asking.

It has taken me years (literally) to get boxes working just right. The amount of math and time it would take to get circles and triangles working as they should is beyond me.

Also, the library's interface would have to become more complex to allow for that change.
When I write def I mean function.
User avatar
NightKawata
Party member
Posts: 294
Joined: Tue Jan 01, 2013 9:18 pm
Location: Cyberspace, Room 6502
Contact:

Re: [library] bump.lua v3.1.4 - Collision Detection

Post by NightKawata »

Ethan-Taylor wrote:You should try adding circular and triangular collision boxes.
I would probably look into using HardonCollider for those purposes. As kikito says, 'tis a little out of scope for bump.

Now, would bump benefit from it? Yes, but then in my opinion it loses a bit of its charm, you know? What I enjoy about bump's design is its simplicity and relative "duct-tape-esque" integration into a project. Fancy non-existant words aside, I like that it's pretty easy to just drop bump in and 2 hours later you have an awesome tech demo available. As kikito said, it'd probably complicate things inside and outside of the hood.

HardonCollider is very versatile, but I do think the two authors have different design philosophies for them. I would definitely look into that if you're going to need things that aren't AABB's. I do think and know that there are tons of things you can accomplish with only AABB's as well.

And to kikito: I am not trying to insult you in any way, shape, or form in my first sentence. bump is quite a feature-rich library and I may end up using it for my next project. The way it's designed I do approve of, even if it took me about an hour to think how I'd make use of it. That part's not important.
"I view Python for game usage about the same as going fishing with a stick of dynamite. It will do the job but it's big, noisy, you'll probably get soaking wet and you've still got to get the damn fish out of the water." -taylor
Ethan-Taylor
Prole
Posts: 34
Joined: Mon Nov 24, 2014 9:15 pm

Re: [library] bump.lua v3.1.4 - Collision Detection

Post by Ethan-Taylor »

kikito wrote:I don't think you realize what you are asking.

It has taken me years (literally) to get boxes working just right. The amount of math and time it would take to get circles and triangles working as they should is beyond me.

Also, the library's interface would have to become more complex to allow for that change.
Yeah, I get what your saying, and there's no offence taken from your comment (your the creator, so you probably understand it better then me).
But for people looking for a quick fix for more advanced collision there's no way out. You have to know everything, which sucks.
I'm having tonnes of problems with Hardon and this is mainly because of the poor explanation of it. Which really makes me annoyed :x

I've actaully switched from a game engine, which makes me really lazy towards love and its libraries.
I appreciate you for putting a great deal of effort into this library, but maybe when I get more experienced I can try to make a library for all purposes.

I still think bump could benifit from circular collsions, but I understand that you need time to yourself too, and not everyone can make a commitment to offer a library for free that had weeks upon weeks of work in it.

That's fair enough.
I guess I'll pick up that maths book I had lying around.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: [library] bump.lua v3.1.4 - Collision Detection

Post by kikito »

I am glad we understand each other ^^

Good luck with your circular collisions!
When I write def I mean function.
Sarcose
Prole
Posts: 48
Joined: Wed Jul 08, 2015 12:09 am

Re: [library] bump.lua v3.1.4 - Collision Detection

Post by Sarcose »

Hey there, I have a noob question. How would I integrate this with, say, the Fine_Tile_Based_Scrolling tutorial? I just wanted to have a very basic map to collide around with, but unfortunately when I set them up together the collisions don't happen where the map is drawn, unless I don't ever move map.x and map.y after the initial load.

I read about using world to query positions. Would it be possible to use world to draw the map directly? And how would that look?
Post Reply

Who is online

Users browsing this forum: No registered users and 87 guests