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 / Bullet problem sending me nuts......

Author
Message
Darth Mountain
15
Years of Service
User Offline
Joined: 27th Jul 2009
Location:
Posted: 27th Jul 2009 18:35 Edited at: 29th Jul 2009 03:46
Hi, I'm (attempting) making a vertical scrolling shmup and getting bullets to workd properly is sending me crazy. At the moment it looks like this



obviously the problem is that each bullet/sphere has a unique object number that will eventually conflict with anything else I put in later - enemies, etc. I'm pretty sure an array is the answer but just can't figuer it out. any help is most appreciated as its driving me crazy.
Any help is GREATLY appreciated.
Cheers.

[Mod Edit] Corrected Code Tags - TDK
Monk
16
Years of Service
User Offline
Joined: 25th Sep 2008
Location: Standing in the snow =D
Posted: 28th Jul 2009 12:41
Recycle the bullets.

Ie if object > maxdist
position object at player
else
let it continue


I like work. It fascinates me. I sit and look at it for hours
TDK
Retired Moderator
21
Years of Service
User Offline
Joined: 19th Nov 2002
Location: UK
Posted: 29th Jul 2009 03:45 Edited at: 29th Jul 2009 03:47
Darth Mountain
15
Years of Service
User Offline
Joined: 27th Jul 2009
Location:
Posted: 30th Jul 2009 04:36
Thanks heaps, had to mod the code a bit but it did the trick.
Cheers

Login to post a reply

Server time is: 2024-09-28 08:23:30
Your offset time is: 2024-09-28 08:23:30