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 Discussion / Checking a FPS hit without fireing a bullet... How?

Author
Message
Mitch
21
Years of Service
User Offline
Joined: 28th Sep 2003
Location: The Netherlands
Posted: 29th Nov 2003 01:03
Hello.. I'm new to darkBASIC and I've started to work on a racing game and a First Person Shooter. My most important question is about bullets.. I've tried several things with moving bullets, and I've noticed that when you make a bullet reposition fast, it just takes big steps, and has a high possibility of skipping it's target.. The way I thought to solve this, is to make a function calculate when you mouseclick, if the bullet is going to hit anything... How could I do this?..

Also, I saw how zomBfied explaned in the "Speed Problem in DBC" forum threat that you can better use a math collision than the DB build in one.. Can somebody make me a code snippit of that, or maybe explane to me how it works a bit more?

-Mitch

Me vs. The World...
nuclear glory
21
Years of Service
User Offline
Joined: 2nd Oct 2003
Location:
Posted: 29th Nov 2003 01:43
We did create a collision system for DB Classic. It works with objects that move any distance.

The v1.5 of our collision system for DB Classic is still available from our website. It can do the math collisions you speak of.

Link to website below.

The newer 2.01 version will eventually make its way to Classic as well.

Lead Programmer/Director
Powerful Collision DLL for DBPro: http://www.nuclearglory.com
Sjakie
21
Years of Service
User Offline
Joined: 17th Dec 2003
Location: Netherlands - Delft
Posted: 20th Dec 2003 19:54
I hope this can help you too. Maybe you should not move the
bullet in one step, but in a few smaller steps, like this:

NOT THIS:
move object BULLET,100 (or something big)
#Collision code#...

BUT THIS:
for Move=1 to 10
move object BULLET,10
#Collision code#...
next Move

Note that this also means that your programs collision activity
will increase enormous! I still hope it helped you...

Juzt a dude who likez progging

Login to post a reply

Server time is: 2025-05-22 01:22:50
Your offset time is: 2025-05-22 01:22:50