Hi folks,
I read very often that something like a collision routine is missing, so I decided to write my own. I hope it is as easy to use as I tried to make it.
There are 3 testprograms (with source) and a documentation in the package.
Features:
-create any polygons as hitbox
-move and rotate hitboxes
-very fast check if hitboxes collide
-easy to use with pb like syntax
-linux and windows compatible, 64bit not checked yet
-create hitbox out of a sprite
Download: http://wwwhomes.uni-bielefeld.de/ddiffe ... lision.zip
Little, good readable example with awesome graphics:
Sandbox editor:
Performance check:
Routine for any collisions
Routine for any collisions
Last edited by gnasen on Fri Feb 04, 2011 12:12 am, edited 4 times in total.
pb 5.11
I improved the speed of the collision checks and got a speedboost of 50% on different collisions and more then 600% if there is no collision between some triangles (which are part of every hitbox).
Have fun. Would be happy about some further testing. And maybe some Feedback
new Download:
see first post.
new speedcheck
Have fun. Would be happy about some further testing. And maybe some Feedback
new Download:
see first post.
new speedcheck
pb 5.11
- Rook Zimbabwe
- Addict
- Posts: 4326
- Joined: Tue Jan 02, 2007 8:16 pm
- Location: Cypress TX
- Contact:
Re: Routine for any collisions
It might be a bit of a long shot, but does anyone still have this? I don't think it's on RSBasic.de.
Re: Routine for any collisions
I do. I am not quite sure if I have the latest version though. The link in the first post was a zip and mine is a rar.wombats wrote:It might be a bit of a long shot, but does anyone still have this? I don't think it's on RSBasic.de.
I looked over the code and updated it to PureBasic v5.72 so it is runnable and changed variables from .l to .i for example. I also increased the readability a little with some added returns and spaces. I finished it all up by zipping it and placing it on DropBox.
Here's the link. It will be available for a while though I may eventually remove the link to it.
Re: Routine for any collisions
Thank you!Demivec wrote:I do.wombats wrote:It might be a bit of a long shot, but does anyone still have this? I don't think it's on RSBasic.de.