Well, I worked from Rude's collision .love file and improved it a lot more and I've developed a nice little alert system too.
I'd be great to this this simple alert system in some games so feel free to use it with credit.
Here's a present to those that hate me.
Forum rules
Before you make a thread asking for help, read this.
Before you make a thread asking for help, read this.
Here's a present to those that hate me.
- Attachments
-
- envy.love
- (3.82 KiB) Downloaded 204 times
Re: Here's a present to those that hate me.
That's cool! But you need to package the .love with the code files at the root, otherwise it won't work.
(BTW, your coding style is very clean and readable! ^.^)
(BTW, your coding style is very clean and readable! ^.^)
Re: Here's a present to those that hate me.
Thank you Rude, sorry for the problems before.
Re: Here's a present to those that hate me.
Hey Rude, what's the best way of doing collision with 2D boxes as oppose to circles?
Thanks.
Thanks.
Re: Here's a present to those that hate me.
here's a newer version
- Attachments
-
- envyph1.love
- (7.22 KiB) Downloaded 198 times
Re: Here's a present to those that hate me.
I don't know the best way, but I've used SAT successfully before. If the boxes are axis-aligned (not rotated), you just have to check two axes.
- qubodup
- Inner party member
- Posts: 775
- Joined: Sat Jun 21, 2008 9:21 pm
- Location: Berlin, Germany
- Contact:
Re: Here's a present to those that hate me.
We don't hate you. We LÖVE you.
Thank you, thank you. That was me: stating the obvious!
Thank you, thank you. That was me: stating the obvious!
lg.newImage("cat.png") -- made possible by lg = love.graphics
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
-- Don't force fullscreen (it frustrates those who want to try your game real quick) -- Develop for 1280x720 (so people can make HD videos)
Re: Here's a present to those that hate me.
I don't hate ya, dude. I'm too lazy to hate. Great demo. I'd love to see a break-down of the code in Tutorial form.
"Any sufficiently advanced technology is indistinguishable from magic." - Arthur C. Clarke
Re: Here's a present to those that hate me.
I did quite a bit of programming with AABBs and circles which was eventually scrapped from AGen. AABBs can be quite complicated if you're doing sweeping intersection tests. It also depends on the amount of information you want to gather about a particular collision. For example, do you need to know the exact time of intersection (TOI) or the point of intersection or the normal between the two colliding objects the penetration vector, etc, etc. It all depends on the kind of collision response you want to have in your game and will dictate the 'best' algorithm for the job.I don't know the best way, but I've used SAT successfully before. If the boxes are axis-aligned (not rotated), you just have to check two axes.
Re: Here's a present to those that hate me.
I don't need anything too informative, I simply need to know if there was a collision and maybe a way to resolve collisions for rectangular objects.
Rude gave me some pretty code for finding and resolving collisions with circles, but what about finding and resolving collisions with squares, or cicles and squares?
Rude gave me some pretty code for finding and resolving collisions with circles, but what about finding and resolving collisions with squares, or cicles and squares?
Who is online
Users browsing this forum: Bing [Bot] and 5 guests