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 / Object Speed vs Object Collision

Author
Message
Legionare
23
Years of Service
User Offline
Joined: 6th Apr 2003
Location:
Posted: 5th Aug 2003 13:09
Hey

Firstly the Bullet Collision in my first person shooter is working prefectly, hits wall, players and enemies with very little error. At this time i had my object moving 20 every loop, which is quite slow for a bullet.

So i changed the figure to a more realistic speed (i tried 100-200)
but now my collision doesnt work

My theory is that since the bullet is moving at a high rate its going through walls and enemies before collision has time to take effect. At least thats what i think

So basiclly what i need is a solution that will allow me to have both good collision + a high speed bullet.

Heres my Collision code


and heres my bullet code, its pretty simple code
UberTuba
23
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 5th Aug 2003 13:40
go back to your original code with 20 bullet speed. the repeat the
movement/collsion part of the program ten times each loop, making
the bullet teen times as fast with no loast accuracy.
there is A WAY TO do instant bullets with much less calculation
but i cant make head or tail of your code so i cant help.

the artist formally known as darkfluff
Legionare
23
Years of Service
User Offline
Joined: 6th Apr 2003
Location:
Posted: 5th Aug 2003 13:59
Hey,

Thanks for that, your solution worked

Instant bullets, anyone know anywhere, where i can find more info in that?

the_winch
23
Years of Service
User Offline
Joined: 1st Feb 2003
Location: Oxford, UK
Posted: 5th Aug 2003 17:03
If you are using dbpro you can use
intersect object
for instant bullets. Look it up in the help
UberTuba
23
Years of Service
User Offline
Joined: 5th Oct 2002
Location: Brittania
Posted: 5th Aug 2003 17:41 Edited at: 5th Aug 2003 17:45
4got that it returns distances now, it only use to say y/n

the artist formally known as darkfluff

Login to post a reply

Server time is: 2026-07-22 10:04:41
Your offset time is: 2026-07-22 10:04:41