Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers DBPro Corner / Sprite Collision - from the inside.

Author
Message
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 29th Sep 2003 12:26 Edited at: 29th Sep 2003 12:33
Hello.

I am currently writing a simple 2D shooter and need to include some collision detection.
SPRITE COLLISION works fine but for my game I have got the whole screen as a sprite and only need to detect collision for the edges and the bit in the middle (see screenshot below).
What is the best way to do this?
Should I redesign and not have the background as a sprite or is there a way to implement collision the way I am currently doing things?
Thanks.

Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 29th Sep 2003 14:27
To ellaborate a little:

SPRITE COLLISION detects a collision all the time because the whole screen is a sprite. What I want is to detect a collision only if a non-transparant area has been hit.

I tried using POINT() to detect the colour at the four corners of my sprite but that doesn't work for me either. Black is detected everywhere except in the water, which is a box added later.

Thanks
Van B
Moderator
21
Years of Service
User Offline
Joined: 8th Oct 2002
Location: Sunnyvale
Posted: 29th Sep 2003 15:46
I think the sprite collision system should allow non-transparent style collision, I'm pretty sure I got it working before, just need to dig out the old bat and ball thing I was playing with - I'll get back to you later, see if there was anything weird I had to do.


Van-B

My cats breath smells of cat food.
Scraggle
Moderator
21
Years of Service
User Offline
Joined: 10th Jul 2003
Location: Yorkshire
Posted: 29th Sep 2003 16:03
Thanks Van - I'll look forward to it.

Login to post a reply

Server time is: 2024-09-21 01:13:41
Your offset time is: 2024-09-21 01:13:41