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 / [DB/DBC] 2D Game Tutorial - Sprites & Space Invaders

Author
Message
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 2nd Dec 2005 02:14 Edited at: 4th Dec 2005 04:41
[Edit] Never mind - doesn't look like there's any interest in it so it's been put back on the backburner!

TDK_Man

Antidote
19
Years of Service
User Offline
Joined: 18th Mar 2005
Location: San Francisco, CA
Posted: 2nd Dec 2005 02:48
I wouldn't mind seeing it. I wanna see how you erode the shields.



TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 2nd Dec 2005 04:32
The method I use is quite easy really.

Use four seperate sprite images for the shield (same one loaded four times that is).

Once the collision has told you which shield has been hit, calculate the X and Y position of the contact point and paste that image onto a hidden bitmap.

Use a loop and POINT to scan up the image to skip over sections that have already been destroyed. When you find the actual edge of the shield, remove a chunk.

Grab the deformed image and use it to recreate the shield sprite.

That's about it in a nutshell...

TDK_Man

TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 2nd Dec 2005 20:57 Edited at: 4th Dec 2005 04:41
Grog Grueslayer
Valued Member
19
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 2nd Dec 2005 22:09
Looks good TDK!
Bubble Gum Monster
18
Years of Service
User Offline
Joined: 10th Nov 2005
Location:
Posted: 1st Mar 2006 00:40
How did you get? I'm doing a little space invaders project in my spare time (and I'm a n00b)

Login to post a reply

Server time is: 2024-09-24 09:30:34
Your offset time is: 2024-09-24 09:30:34