I know that PB's sprite collision works for Sprite3D as well but what if they are zoomed or rotated?
Do I need to write my own collision detection?
Collision detection with zoomed/rotated Sprite3D
- Fluid Byte
- Addict

- Posts: 2336
- Joined: Fri Jul 21, 2006 4:41 am
- Location: Berlin, Germany
Collision detection with zoomed/rotated Sprite3D
Windows 10 Pro, 64-Bit / Whose Hoff is it anyway?
Re: Collision detection with zoomed/rotated Sprite3D
Yes.Fluid Byte wrote: Do I need to write my own collision detection?
Maybe we can team up on that if you have pixel collision in mind.
I am currently working on a "proof of concept" for a very fast pixel collision test. It works with collision maps. For rotation, zoom, etc. the collision maps would need to be rotated, zoomed, etc.
-
mpz
- Enthusiast

- Posts: 497
- Joined: Sat Oct 11, 2008 9:07 pm
- Location: Germany, Berlin > member German forum
Re: Collision detection with zoomed/rotated Sprite3D
Hi Thorium,
at first you can make a rotated, zoomed, etc. collision map. The second step is to make a collsions detection. The follwing code helped my very much for my collision detection. Perhaps you can make it faster with a ASM code
.
www.gamedev.net/reference/articles/article735.asp
http://creators.xna.com/en-GB/tutorial/ ... 2dperpixel
best regards
Michael
at first you can make a rotated, zoomed, etc. collision map. The second step is to make a collsions detection. The follwing code helped my very much for my collision detection. Perhaps you can make it faster with a ASM code
www.gamedev.net/reference/articles/article735.asp
http://creators.xna.com/en-GB/tutorial/ ... 2dperpixel
best regards
Michael
Working on - MP3D Library - PB 5.73 version ready for download
Re: Collision detection with zoomed/rotated Sprite3D
Yes. In fact a lot faster.mpz wrote:Perhaps you can make it faster with a ASM code.
I allready have coded it without rotation and zoom. But it am currently on debugging it because it does not work correctly. But thats just a matter of mistakes i did, the system works very well.
It does not test pixel by pixel. It generates a collision map in which 1 bit represents 1 pixel. That allowes to test multiple pixels with just one compare. The goal is to test 128 pixel at once using the XMM register. However i just did the prototype in PB code. Once it's working i am rewriting it in asm and use the XMM register.