It is currently Thu Jul 02, 2020 6:55 pm

All times are UTC + 1 hour




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject:
PostPosted: Thu Mar 21, 2002 9:33 am 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
Restored from previous forum. Originally posted by Schlowski.

Hello again,

I began to write my own pixel-perfect collision detection (and then I saw Freds anouncement ). But as I make this for my own, pure fun, I want to continue my work.

My problem is that I don't have any idea how I get access to the real bitmap in a sprite, so for the moment I made my own 'collision masks' which are raw 8bit per pixel data streams.

But it would be nicer to use the loaded sprites so I don't have to make a mask for every sprite I use.

Has anyone (Fred ) an idea how to get a pointer to the sprite bitmap?

For the interested, I make the brutal force approach, allocating memory in size of the screen and putting bytes in for every set pixel in my masks and querying these bytes for collision detection. Echa sprite gets his own id in the range from 1 to 255, so I can directly determine with which sprite my object collides.

This seemed to me the right approach for detection collisions between hundreds of blocks and tons of balls (right, I'm writing on a breakout-clone, simple but addicting) opposed to checking every ball with every block which can grow to a large number of compares...

Björg


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Thu Mar 21, 2002 5:41 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
Restored from previous forum. Originally posted by Franco.

Hi Schlowski,
maybe you can get a hint on:

http://www.12move.de/home/frankabbing/

this guy is doing a great job with his free ProSpeed.dll (written in asm - over 130 functions)

He has a documentation for his dll and maybe there are also some useful ideas in it.
Or mail him your question (you can do it in german ) I'm sure he is willing to share his experience how to do such a thing.
Hope this helps a bit.


Have a nice day...
Franco

Sometimes you have to go a lonely way to accomplish genius things.


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Mar 22, 2002 10:28 am 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
Restored from previous forum. Originally posted by Schlowski.

Hi Franco,

thanks for this, I will try it!

Schlowski (aka Björg)


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Mar 22, 2002 2:51 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
Restored from previous forum. Originally posted by fred.


Just wait a little bit, v3.0 will bring this ability, thanks the forthcoming Danilo COM/DirectX DLL support ! Yep, all ActiveX and DX power will be available directly under PB with ease :)

Bye,

Fred - AlphaSND


Top
 Profile  
Reply with quote  
 Post subject:
PostPosted: Fri Mar 22, 2002 4:07 pm 
Offline
PureBasic Guru
PureBasic Guru

Joined: Tue Apr 22, 2003 7:42 pm
Posts: 16777133
Restored from previous forum. Originally posted by Schlowski.

Quote:

Just wait a little bit, v3.0 will bring this ability, thanks the forthcoming Danilo COM/DirectX DLL support ! Yep, all ActiveX and DX power will be available directly under PB with ease :)

Bye,

Fred - AlphaSND



Yeah!!
But now the waiting time gets harder and harder


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 5 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye