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.

Author
Message
Terabyte
22
Years of Service
User Offline
Joined: 28th Dec 2002
Location: UK
Posted: 30th Jan 2003 15:54
O.K. has any one found a way of makeing instant bullets cus so far the plane equation doesn't work behind walls (it's not supposed to shoot through walls).
i had an idea of object screen x() and object screen y() and mouse click()=1 and object on screen()=1 but the object on screen returns one even when it's behind a wall (not very good!)
so far it seems noone has made fast bullets.
or have they
please reply here if you have.
my own method was an oblong bullets moveing at the speed of it's own size so not to skip anything.
i'm using a bsp map.
please help.
my game is really crappy without fast bullets
[img][/img]
thanks
I have a word of advice...
..don't piss on an electric fence!
Fluffy Paul
22
Years of Service
User Offline
Joined: 16th Dec 2002
Location: United Kingdom
Posted: 30th Jan 2003 16:25
You could cheat, you know.

What you can do is check what is under the cursor, find the point of collision and then place the bullet streak at a random point between the firer and the collision point for one frame. This way it doesn't matter what the bullet collides with as the point of impact is decided by screen position and not 3D collision. Many games use this method for weapons that don't use projectiles - like the pistol in doom, the shotgun in quake and so on.

The trick is to use the vector equations to find a point of collision on a BSP terrain. Then, if this poit of colision is nearer that the enemy model then you know you've not hit it - the terrain was in the way. If the model is nearer than the terrain then it has been shot.
In this way you work out if the shot is valid before firing the bullet - the bullet then becomes decoration. Like the pulse rifle in Aliens versus Predator. The best thing about doing it this way is that it lets you position buletholes on the scenery without doing any extra math.

Ending a sentence with a French word is so passé
Daz
22
Years of Service
User Offline
Joined: 26th Dec 2002
Location: United Kingdom
Posted: 30th Jan 2003 18:05
I read something about a STATIC LINE OF SIGHT command or something. Look it up, I think it's something to do with collision boxes so it could be useful.

DarkBASIC Professional is the best programming utility.
8/10 Housewives agree!
OneTouch
22
Years of Service
User Offline
Joined: 23rd Jan 2003
Location:
Posted: 30th Jan 2003 19:15
Whats up with all them smileys?
You have to scroll over because of them!
Best to learn proper posting, I don't know about
the DB forum, but other forums I have been too,
people quit replying (reading) ppl's post, who do that
kind of thing.

No offence intended bud, but it is annoying!

need more information on game development,
visit http://www.dtagames.com
ZomBfied
22
Years of Service
User Offline
Joined: 2nd Oct 2002
Location:
Posted: 30th Jan 2003 22:17
The easiest way is with new Kraft(r) Insta-Bullets Mix(tm). Just add water and wait and voila instant bullets!

No The easiest way is just to do them the same way as you would regular bullets, only let them go their full path before moving on through your main loop. like:

function bullet()
do
move bullet
if bullet hit? exit
if bullet time expire? exit
loop
goback to main loop

That way your instant bullet gets to run it's full course when it's shot without updating anything else. And since it's between syncs it shouldn't be too speed unfriendly.

Fluffy Paul
22
Years of Service
User Offline
Joined: 16th Dec 2002
Location: United Kingdom
Posted: 31st Jan 2003 17:17
I think what Frobscottle was saying is that he's trying to draw a 3D plane that's stretched out into a long rectangle between the firer and the target but only if the target it on the screen. It's going a bit wrong because DB will say that something is on the screen if it is inside the camera's field of view and within drawing distance. DB doesn't check if the object is behind another object or a bit of terrain. This means that Frobscottle's rectangular plane has one and at the firer and the other end at the target even if it means the plane intersects scenery - which means that DB has shot the bullet through the scenery.

Ending a sentence with a French word is so passé

Login to post a reply

Server time is: 2025-05-17 18:30:49
Your offset time is: 2025-05-17 18:30:49