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 / how do you make a bullet travel accross the screen and sprite collision?

Author
Message
Kwiki Mart
20
Years of Service
User Offline
Joined: 9th Dec 2003
Location: PA
Posted: 9th Dec 2003 17:32 Edited at: 9th Dec 2003 17:38
I am designing a 2d game.

I found a way to get my bullet sprite to travel accross the screen by making a subrutine. The problem is that while in this routine the game waits until the bullet travles off screen. i tried to get the bullet to stop on impact of another sprite but it just travles to the end of the screen. I know there is a way to make the shooting part of the main loop and put the collision detection in there also. Can anyone give me any insight on this matter? I would be grateful.
I am using DBC.
Mentor
22
Years of Service
User Offline
Joined: 27th Aug 2002
Location: United Kingdom
Posted: 9th Dec 2003 20:58
heres one way to do it (not tried but should work), it may be a little messy to look at though...see the code below in the source box, cheers.

Mentor.

System spec : Pentium 3.0Ghz, 512MB DDR, 2x160Gb HD`s, DVD RW/CD RW (all modes), multimedia front panel, 6 way surround sound, ATI radeon 9800 128mb.

Login to post a reply

Server time is: 2024-09-21 12:03:49
Your offset time is: 2024-09-21 12:03:49