[library] bump 2.0 – Collision Detection

Showcase your libraries, tools and other projects that help your fellow love users.
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: [library] bump 2.0 – Collision Detection

Post by Jasoco »

Impressive. It works now. You're the best. Looking forward to the next version. About that first issue, I had originally had the playerFilter on the second call but even then it wouldn't work for me and at some point I removed both and forgot to put both back. Oops. Silly me. The issue had to be somewhere else though. I'll look and compare the code when I get home tonight and see what changes you made. Learn from them. I do make the player narrower and shorter than he really would be anyway.
ELFUERTE
Prole
Posts: 7
Joined: Fri Sep 12, 2014 2:29 pm

Re: [library] bump 2.0 – Collision Detection

Post by ELFUERTE »

I need help understanding how the procedure of moving an object's body works.
Here's my code.
http://hastebin.com/jasapigivu.lua
You can ignore all the love.graphics.print,i used those for debugging.
The player is displayed as the "a" letter on the screen. Collisions dont work ATM. The createBlocks function should work though.
Apito
Prole
Posts: 2
Joined: Sat Nov 22, 2014 5:44 am

Re: [library] bump 2.0 – Collision Detection

Post by Apito »

@kikito

Thanks for the quick reply! Also thanks again for your libraries, middleclass is also really helpful. I'm new to lua and game programming (but have some web programming experience) but if I happen to find the cause I'll send it your way.
User avatar
kikito
Inner party member
Posts: 3153
Joined: Sat Oct 03, 2009 5:22 pm
Location: Madrid, Spain
Contact:

Re: [library] bump 2.0 – Collision Detection

Post by kikito »

@ELFUERTE: I strongly recommend that you spend some time indenting code. It might look like a chore at first, but it helps discovering and avoiding bugs surprisingly often. (It also makes it easier for others to review :) ). Since I plan to release a new version of bump soon, I would recommend you to wait for me to do so; the new version will be easier to use in the base case.

@Apito :neko:
When I write def I mean function.
boobeebah13
Prole
Posts: 7
Joined: Sun Sep 20, 2015 12:16 am

Re: [library] bump 2.0 – Collision Detection

Post by boobeebah13 »

error: bump.lua:600: table index is nill
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: [library] bump 2.0 – Collision Detection

Post by Jasoco »

We need more context than that.

That line belongs to the World:querySegmentWithCoords function. Are you passing nil values to it?

Edit: Wait, this thread is for version 2.0. That's waaaaay out of date. Why did you bump (lol) this thread? Are you actually using 2.0? Because 3.0 has more features. I don't even know what code is in 2.0.
User avatar
NightKawata
Party member
Posts: 294
Joined: Tue Jan 01, 2013 9:18 pm
Location: Cyberspace, Room 6502
Contact:

Re: [library] bump 2.0 – Collision Detection

Post by NightKawata »

Jasoco wrote:We need more context than that.

That line belongs to the World:querySegmentWithCoords function. Are you passing nil values to it?

Edit: Wait, this thread is for version 2.0. That's waaaaay out of date. Why did you bump (lol) this thread? Are you actually using 2.0? Because 3.0 has more features. I don't even know what code is in 2.0.

Yeah I'd stay away from bump 2.0. Refering to the one who necroposted, that's something that a lot of people do here, and that really needs to be addressed/let's not do that. :P (Just make a seperate topic for the oldie stuff in support and development)

Anyhoo, the easier answer is to simply use bump 3.0, as no offense to kikito, it is a lot more versatile, it's by far much less of a pita to use (okay kiki let's face it compared to the bump 3 way the bump 2 way isn't even comparable =p), and you'll probably enjoy utilizing it a fair bit more!
"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
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: [library] bump 2.0 – Collision Detection

Post by Jasoco »

I don't know why kikito would be offended. I'm pretty sure he knows how much worse 2.0 was. 3.0 was like a total rewrite and made it so much easier to use.

So yeah, don't touch 2.0. Let's let this thread disappear into obscurity in a few months when it finally drops off the first page. (Why are threads never locked on this forum?)
User avatar
zorg
Party member
Posts: 3465
Joined: Thu Dec 13, 2012 2:55 pm
Location: Absurdistan, Hungary
Contact:

Re: [library] bump 2.0 – Collision Detection

Post by zorg »

Jasoco wrote:(Why are threads never locked on this forum?)
That, or them being moved to an archival subforum might be a good idea... didn't a thread about these things happen already?
Me and my stuff :3True Neutral Aspirant. Why, yes, i do indeed enjoy sarcastically correcting others when they make the most blatant of spelling mistakes. No bullying or trolling the innocent tho.
User avatar
Jasoco
Inner party member
Posts: 3726
Joined: Mon Jun 22, 2009 9:35 am
Location: Pennsylvania, USA
Contact:

Re: [library] bump 2.0 – Collision Detection

Post by Jasoco »

zorg wrote:
Jasoco wrote:(Why are threads never locked on this forum?)
That, or them being moved to an archival subforum might be a good idea... didn't a thread about these things happen already?
Probably, but we should stop posting in here so it can die if no one is going to lock it.
Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests