Bitmap Colisions function!

Well partners, I am a newbie here. I enjoy SDL a lot. And I am getting start with it now, but I have already good concepts in C/C++ and Allegro (before SDL I programed with it) and in SDL too (I read a lot of tutorials), so I am not having too much problems. I just want to ask you: Is there any done function for check colision among bitmaps in a game ? Which one ? Let’s suppose I have graphics in 8 bpps. Do the number of bits per pixel by any chance changes anything ? Or there’s a bitmaps colision function for all ways …; please help me !?

Thank you.

Well partners, I am a newbie here. I enjoy SDL a lot. And I am getting
start with it now, but I have already good concepts in C/C++ and
Allegro (before SDL I programed with it) and in SDL too (I read a lot
of tutorials), so I am not having too much problems. I just want to
ask you: Is there any done function for check colision among bitmaps
in a game ? Which one ? Let’s suppose I have graphics in 8 bpps. Do
the number of bits per pixel by any chance changes anything ? Or
there’s a bitmaps colision function for all ways …; please help me
!?

There isn’t in SDL. The concept of a “collision” is arbitrary, really, and
depends upon how you code your game. In 8bpp surfaces, you might reserve
certain palette entries to be transparent, so as to not cause a collision,
or you may look at the actual color. In 16bpp/24bpp you may look at
anything with an intensity lower than a certain level (or completely
black) as transparent. In 32bpp you may use the alpha channel, or you may
not!

In any case, you’ll probably have to write your own or find one that suits
your needs somewhere on the net.

–>Neil-------------------------------------------------------------------------------
Neil Bradley What are burger lovers saying
Synthcom Systems, Inc. about the new BK Back Porch Griller?
ICQ #29402898 “It tastes like it came off the back porch.” - Me

Well partners, I am a newbie here. I enjoy SDL a lot. And I am getting start with it now, but I have already good concepts in C/C++ and Allegro (before SDL I programed with it) and in SDL too (I read a lot of tutorials), so I am not having too much problems. I just want to ask you: Is there any done function for check colision among bitmaps in a game ? Which one ? Let’s suppose I have graphics in 8 bpps. Do the number of bits per pixel by any chance changes anything ? Or there’s a bitmaps colision function for all ways …; please help me !?

Thank you.

SGE - http://www.etek.chalmers.se/~e8cal1/sge/index.html
KrataOn Sat, 27 Jul 2002, Rafael S. wrote:

At JEDI-SDL, we have a pixel level collision routine in our utils unit.
There’s nothing to stop you from converting the code from pascal to C if you
want it. I use this routine all the time.

http://www.delphi-jedi.org/Jedi:TEAM_SDL_HOME

Converting from C to Pascal is fairly easy so you should have no trouble
converting from Pascal to C.

Later

Jason> Well partners, I am a newbie here. I enjoy SDL a lot. And I am getting

start with it now, but I have already good concepts in C/C++ and Allegro
(before SDL I programed with it) and in SDL too (I read a lot of
tutorials), so I am not having too much problems. I just want to ask you:
Is there any done function for check colision among bitmaps in a game ?
Which one ? Let’s suppose I have graphics in 8 bpps. Do the number of bits
per pixel by any chance changes anything ? Or there’s a bitmaps colision
function for all ways …; please help me !?

Thank you.