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 / i don't think anyone has made instant bullets that DON't shoot through walls?

Author
Message
Terabyte
22
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 13th Mar 2003 18:30
has anyone made instant bullets that cannot shoot through walls. the plain thingy doo dah equation at real games tools.com works great but you can still shoot a target with another object infront of it.
does anyone know what patch 4 is supposed to fix? the amount of time their taking to release it!! you would of thought that it's going to fix everything!!!
I have a word of advice...
..don't piss on an electric fence!
The Darthster
22
Years of Service
User Offline
Joined: 25th Sep 2002
Location: United Kingdom
Posted: 13th Mar 2003 19:05
Yes, I've made instant bullets which don't fly through walls.

Once I was but the learner,
now, I am the Master.
Shadow Robert
22
Years of Service
User Offline
Joined: 22nd Sep 2002
Location: Hertfordshire, England
Posted: 13th Mar 2003 21:15
mine never fly through walls
probably helps that they're virtual bullets though hehee

they're whole duty is to find out if they hit somthing (isnt easi when they're not real)

but its the best way, you find out the vector of the bullet, if it'll pass through anything - and thats like the collision area ... + if anything intersects with it before then

ahh always a nice solution to a nice problem eh

Tsu'va Oni Ni Jyuuko Fiori Sei Tau!
One block follows the suit ... the whole suit of blocks is the path ... what have you found?
Rob K
Retired Moderator
22
Years of Service
User Offline
Joined: 10th Sep 2002
Location: Surrey, United Kingdom
Posted: 13th Mar 2003 21:27
@Frobscottle

You seem to be under the impression that anything which goes wrong is DBP's fault - not always the case

Current Project: Retro Compo. Entry.
Kangaroo2
22
Years of Service
User Offline
Joined: 26th Sep 2002
Location: United Kingdom
Posted: 13th Mar 2003 21:35
For bullets at top speed you don't actually need to make a bullet object and have it whiz allong looking for collisions - the velocity it would have to move would make that impossible to do accurately - Real life bullets are too fast to see, so just detect whether the person is in the "line of fire" and whether any objects are in the way - hey presto working bullets

For slower projectiles that you need to see, its more complex, but stil perfectly doable - I've seen many examples, including my own

Coming Soon! Kangaroo2 Studio... wait and quiver with anticipation! lol
[email protected] - http://www.kangaroo2.com - If the apocalypse comes, email me
Benjamin
22
Years of Service
User Offline
Joined: 24th Nov 2002
Location: France
Posted: 13th Mar 2003 21:39

thats the sort of stuff you need, and the bullet appears to be instant because you only sync it after you have finished with it

xxxpetratxxx
B. R. W
QuothTheRaven
22
Years of Service
User Offline
Joined: 2nd Oct 2002
Location: United States
Posted: 13th Mar 2003 21:49
well, doing many collisions in a loop dangerously hurts the fps, there has got to be a better way...

Darken the skies, we are god
ZomBfied
22
Years of Service
User Offline
Joined: 2nd Oct 2002
Location:
Posted: 13th Mar 2003 23:00
Not really. I find doing many collisions in a loop doesn't do a darn thing to the fps as long as nothing is rendered. If you try it you may be pleasantly surprised. Plus it's only going to happen when a bullet is fired. Even a machine gun doesnt have to fire every game loop so any fps strain will only happen every so often, making it hardly noticable. Checking a "colision area" may be just as time consuming and not as easy and more prone to mistakes than old fashioned "bullet out of time" method used above.

Flashing Blade
22
Years of Service
User Offline
Joined: 19th Oct 2002
Location: United Kingdom
Posted: 13th Mar 2003 23:59
i like INTERSECT OBJECT (i heard it got a bug that patch4 fixes, but i aint found a bug - yet)

change bullitspeed on line 77 to anything u like.



i only got PRO so i don't know if it works in DBC
Terabyte
22
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 14th Mar 2003 20:36
hey hey wo stop
firstly i would like to respond to Rob k
i am not under the impression that everything that goes wrong with my programs is dark basics fault. i'm not een saying that there is a fault!
i'm simply asking if sombody has got a routine that allows you to shoot bullets without them going through walls.
when i said bullets i'm not really looking for a set object to camera.... if mouseclick()=1 move obejc... if obejct collision(1)=1 then....
i'm looking for an intersect...
the problem is i used the plain equation at realgametools.com and placed a plain object infront of the sphere objects and i could still shoot them any help with this

I have a word of advice...
..don't piss on an electric fence!

Login to post a reply

Server time is: 2025-05-18 23:53:23
Your offset time is: 2025-05-18 23:53:23