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.

DarkBASIC Professional Discussion / What's the best way to make bullets?

Author
Message
MiRRoRMaN
17
Years of Service
User Offline
Joined: 9th Oct 2002
Location: Netherlands
Posted: 26th Oct 2002 14:22
Hi,

I thought of a funny game about Ed Gein to make, but I'm looking for the best way to shoot bullets from the character.

Now I tried the example in DBTutor but I don't like it. What I want is like a shotgun, you know, blam: firing a bullet which flys trough the air and if it hits an enemy the bullet gets destroyed and the enemy dies. (logical right?) I also want the bullet to stop and get destroyed if it goes for example for 500 mtrs.

What is the best way to do this?

Thanks in advance!
www.mirrorman.cjb.net, the classic Commodore 64 and Amiga site.
Megaman X
17
Years of Service
User Offline
Joined: 21st Oct 2002
Location: Sweden
Posted: 26th Oct 2002 14:33
Use sprites for the bullets maybe? Instead of objects? I dunno, never tried any game that needs fire someone
In DB Classic, they had that ICeD Demo, where they used sprites to make the arrows. I think that's a good way to do... Again, just guessing, I just make puzzles and RPGs

I don't suffer from insanity, I enjoy every minute of it.
-Rogue
MiRRoRMaN
17
Years of Service
User Offline
Joined: 9th Oct 2002
Location: Netherlands
Posted: 26th Oct 2002 15:39
Hehe I mean more like a routine, does anyone have a nice example as to how shoot bullets from another object? I'd most love to have objects, easier collission etc.

www.mirrorman.cjb.net, the classic Commodore 64 and Amiga site.
Shadow Robert
17
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 26th Oct 2002 16:02
the best way to make bullets is not to have them at all
just keep all the bullets in a single array and cross referance positions if the positions equal the objects your shooting at then they hit.
crude yes, but saves processing power no end

Anata aru kowagaru no watashi!
MiRRoRMaN
17
Years of Service
User Offline
Joined: 9th Oct 2002
Location: Netherlands
Posted: 26th Oct 2002 16:10
Example?

www.mirrorman.cjb.net, the classic Commodore 64 and Amiga site.
MiRRoRMaN
17
Years of Service
User Offline
Joined: 9th Oct 2002
Location: Netherlands
Posted: 27th Oct 2002 00:24
Never mind hehe found it.

Be on the lookout for my Ed Gein game, I will keep u all up to date.

www.mirrorman.cjb.net, the classic Commodore 64 and Amiga site.
Shadow Robert
17
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 28th Oct 2002 03:27
wouldn't think you need an example

but just make a type
type bullet
vCount as word
fX# as float
fY# as float
fZ# as float
endtype

then everytime you need a bullet if bullet.vX# = player.vX# then gosub _player_shot

Anata aru kowagaru no watashi!
MiRRoRMaN
17
Years of Service
User Offline
Joined: 9th Oct 2002
Location: Netherlands
Posted: 30th Oct 2002 13:55
Is that all? I mean is that an array?

www.mirrorman.cjb.net, the classic Commodore 64 and Amiga site.
The Darthster
17
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 31st Oct 2002 01:08
I never thought about it like that. That could be useful, using arrays for bullets. Anyway, there's probably also a way to do it using the vector3 commands, only I haven't figured them out yet since DBPro won't install .

Login to post a reply

Server time is: 2020-07-14 20:48:58
Your offset time is: 2020-07-14 20:48:58