DF-21 Forums Forum Index DF-21 Forums
The Dark Forces Community
 
DF-21.net Home | FAQ | Search | Memberlist  | Register 
Profile | Log in to check your private messages | Log in

Concussion Rifle's Targeting System

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DF-21 Forums Forum Index -> DarkXL General Discussion
View previous topic :: View next topic  
Author Message
sheepandshepherd
Trandoshan

Joined: 01 Apr 2008

PostPosted: Oct 20, 2009 21:04    Post subject: Concussion Rifle's Targeting System View user's profile Send private message Reply with quote

Hey lucius, have you (or anyone else) figured out just how the Concussion rifle finds its targets?
Seeing as the "projectile" runs along the floor, there must be some kind of system for figuring out what it can and can't hit. As far as I know, the area effect is only considered after the imaginary "projectile" hits something solid (walls, enemies, etc); most likely there's also a certain amount of autoaim invoved. Probably some kind of 2D cone, like this (narrower of course)?
Code:

   \       /
    \     /
     \   /
      \ /
       |
       O
     player
 w/ conc rifle
    top view


I still have no idea how the "projectile" travels in regard to height and gravity. IIRC, an enemy directly below a ledge will not be hit in this situation:
Code:

                side view
                  player
              w/ conc rifle
                   O
         <- - - - =|
              ------------
         enemy|
             O|
             ||
---------------

Instead, the "projectile" seems to fall to the ground gradually. At least that's what I've noticed so far . . . I haven't done much testing with it, but I plan to if nobody else already has this figured out.

The other reason I'm asking, by the way, is that I plan on using the concussion rifle as an enemy turret system in my level. The trandoshan dummy will be confined in a column in the middle of a circular room and will fire at the player as he goes through the room. I'll redo the explosion sprite to look similar to the Groundspike Driver attack in Prototype, or the Zerg tentacle thingy in Starcraft. I mainly want to avoid any impossible situations with the weapon, which is supposed to be a tentacle traveling through the ground from the pillar.

Marley
Gamorrean

Joined: 30 Sep 2003

PostPosted: Oct 20, 2009 21:16    Post subject: View user's profile Send private message Send e-mail Reply with quote

I've always wondered how it worked, such a unique weapon. Will be interested in the answer.

_________________
*ZaP*

sheepandshepherd
Trandoshan

Joined: 01 Apr 2008

PostPosted: Oct 20, 2009 22:11    Post subject: View user's profile Send private message Reply with quote

Ok, I've started testing with a little shooting-gallery type level. Here are my findings so far:

- There is definitely a cone, like the one I drew in the first post.

- The area damage has a radius of about 25 dfu. More precise measurements soon - I'll create a test for that too, a room that moves a wall gradually towards me to fire at. I'll need to look up Kyle's radius first - hope that's in the DF specs . . .

- The "projectile" doesn't fall directly after a drop OR continue on straight, just as I thought. Here's what I tested with:
Code:

----------------------------------------
|                                      | \
|                                      |  |
|                                      |  |
|                                      |  | wall
X                                      |  |length:
| altitude:                            |  |48 dfu
|  0 dfu                               |  |
|                stormtroopers         |  |
|   O  O  O  O  O  O  O  O  O  O  O    | /
|--------------------------------------|
| altitude:        |    player         |
|  8 dfu           O  w/ conc rifle    |
----------------------------------------


The stormies were exactly 2 dfu from the ledge.
While using LAREDLITE (They wouldn't stay put otherwise), I fired the conc rifle from various places on my ledge. NONE of them hit the stormtroopers, as long as I aimed relatively forward. They all went through to the end wall (of course hitting it at the very bottom, not at 8 dfu altitude.)

HOWEVER, when I aimed at the point marked by an X on the drawing, about half of the line of stormtroopers DID explode. So, there is a cone, and the projectile does eventually fall to the ground.



Now, back to testing. I have a few more things to try out, and I need to redo my previous test to make sure the CONE findings are correct - it may have just been area damage that made the stormies explode.

EDIT: Before I try that radius test, does anyone know for sure whether or not Kyle's weapons fire from his center? I mean, does the projectile spawn in the middle of his collision object or at the edge of it? (You'll know better what I mean if you zoom the map in really close and his red dot changes to a circle.) And also, how high does it spawn?

lucius
DarkXL Developer
DarkXL Developer

Joined: 17 Feb 2008

PostPosted: Oct 20, 2009 22:19    Post subject: View user's profile Send private message Send e-mail Reply with quote

I haven't spent the time to figure this weapon out yet, although I would in the near future. So if you figure it out, that'll help me out too. Smile

I have some questions for you:

1) Can you hit an enemy that you cannot see?
2) Can you always hit an enemy that you can see?
3) If no to the above, can you always hit an enemy that is near the center of the screen, i.e. within your cone?
4) If it is a cone, does height matter? Basically is the cone 2D or 3D?

_________________
DarkXL....http://darkxl.wordpress.com

sheepandshepherd
Trandoshan

Joined: 01 Apr 2008

PostPosted: Oct 20, 2009 22:36    Post subject: View user's profile Send private message Reply with quote

Mmmm, good questions. I'll try to figure out some tests for those. If anybody has any suggestions, they'd be pretty helpful too Smile

1. I'll try this one out with some maze-like areas. It'll be hard though, because the area effect causes the same explosion sprite as the original hit location, which seems to always be an enemy and never just a location (unless there are no enemies in range).

2. No. Before I used LAREDLITE and they walked all over the place, I jumped down into the chaos and fired a few times. They weren't always ALL hit. However, I'm starting to think this is how the targeting works:
-select only ONE enemy in the cone's range, probably the closest (whether height counts here, idk yet)
-apply damage to it
-apply the 25 radius area circle around it (which IS at least partly independent of height - I was up on a ledge and still got area damage from some stormies hit below me)
-apply damage to all enemies in the circle (no matter how many)

3 and 4. Testing now . . . this'll be fun Very Happy

EDIT: My other computer is having problems, and I've got Psychology homework, so I'll have to put off the tests until tomorrow. They'll get done though, don't worry.

The MAZZTer
Death Star
Death Star

Joined: 25 Sep 2003

PostPosted: Oct 21, 2009 01:35    Post subject: View user's profile Send private message Send e-mail Reply with quote

I'm pretty sure that the conc rifle isn't fully 3d... it can't hit a wall that's not at floor level (of course just like every other gun weapon it will auto aim and hit enemies). This also explains why there's no projectile. It doesn't "drop" as much as it doesn't respect gravity or altitude at all (except when auto aiming).

I think once it picks a target for autoaim (like every other gun does) it then calculates splash radius and damage, and draws the "boom" sprite on every hit target.

Thus I think the "cone" is just the normal auto-aim functionality.

For a "nicer" conc rifle that I figure works about the same way, except it's fully 3d so you can shoot at the ceiling and such, see JK.

Disclaimer: Haven't played DF in a bit, haven't used the conc rifle in DF even longer.

IIRC you can turn auto aim off, then I bet the gun just uses a vector pointed straight to where you're aiming to find it's target instead of the auto aim.

_________________
http://www.mzzt.net/ | I am a respectable admin with a respectable sig.

Barry Brien
Dark Trooper Phase 1

Joined: 26 Sep 2003

PostPosted: Oct 21, 2009 04:26    Post subject: View user's profile Send private message Send e-mail Reply with quote

I haven't read all this post yet - but in real life I'd want my concussion rifle to hit everybody I see, not hit everybody except one random person.

Gez
Gamorrean

Joined: 05 May 2008

PostPosted: Oct 21, 2009 10:07    Post subject: View user's profile Send private message Reply with quote

If the code is as weird as Doom's BFG9000, it could be pretty hard to figure out the exact behavior just by testing stuff.

sheepandshepherd
Trandoshan

Joined: 01 Apr 2008

PostPosted: Oct 21, 2009 22:02    Post subject: View user's profile Send private message Reply with quote

JK's conc rifle is nice and simple, but I don't like the fact that explosions on walls look exactly the same as explosions on straight ground, blast orientation and all. Unless DXL goes fully 3D with all models and no sprites, I don't think we should change the way the concussion rifle works.

Here's what I found out since yesterday (the same thing as what The MAZZTer said, just in different words):

- The so-called "projectile" begins at a specific altitude (~5.30 to 5.35, relative to the player - assume Kyle is standing on a 0-altitude floor). If it behaves like the other weapons, the vector begins right outside the red circle around Kyle on the map. Alternatively, it may start at the player's origin, but idk.

- This vector then draws directly to the spot the player is targeting (you'll see this "crosshair" dot if you have the overlay map on). If it's a floor, the explosion is there (including radial damage, etc.). If it's a wall, however, the explosion happens at that point, but ON the floor. No clue what happens when you target a ceiling . . . it probably still travels all the way to the wall.

- Autoaim, apparently, makes this vector point to a target that it picks (the closest enemy?) instead. Fire at a probe droid that's high in the air - I think it has some wierd effects (boom sprite is on the ground, but the probe takes damage no matter how high it is).

I'm not sure yet if the projectile vector's starting point is the same as the player's camera, so the rifle may not ALWAYS hit the spot your crosshair is on (which is near impossible to test with DF's low resolution and keyboard look controls).

By the way, the reason I call it a "projectile" is because it travels that way - longer distances take longer to traverse and moving objects can get in its way after it's fired. Technically the same thing, I guess.

EDIT: I tried these two tests to figure these things out, in case lucius or anyone else wants to recreate them:
Code:
| <wall             player
|                           O
|X<<- - - - - - - - - - - -=|
|X                          ^
-----------|      |--------------
           |------|


|
|                           O
|X<<- - - - - - - - - - - -=|
|X         |------|         ^
-----------|      |--------------

In the first one, the depression in the ground had no effect, no matter how deep (2-8dfu) or long (16-64dfu) it was. The "projectile" always hit the wall.
In the second one, the raised ground had no effect until its altitude was 5.35 dfu (I was counting by .05dfu).

The only variation of this that I saw was in test one, if I looked down a little, the projectile hit inside the depression. After playing with the aim a bit, I found that the red dot on the map (makeshift crosshair) was ALWAYS above the edge when I hit the wall and ALWAYS below the edge when I hit inside the depression.

Emon
Ree-Yees

Joined: 10 Aug 2007

PostPosted: Oct 21, 2009 22:30    Post subject: View user's profile Send private message Reply with quote

It seems to act just like any other explosive projectile except that sprites are made on each target. DF's autoaim is where the mystery comes from.

sheepandshepherd
Trandoshan

Joined: 01 Apr 2008

PostPosted: Oct 21, 2009 22:34    Post subject: View user's profile Send private message Reply with quote

Yeah, that's what had me confused the whole time (along with an invisible projectile).

lucius
DarkXL Developer
DarkXL Developer

Joined: 17 Feb 2008

PostPosted: Oct 21, 2009 23:18    Post subject: View user's profile Send private message Send e-mail Reply with quote

That actually sounds pretty simple. Smile

The question is then, does this weapon get auto-aim even if other weapons do not? Obviously when I implement optional auto-aim, this would get it then but should it get it even when auto-aim is turned off?

I personally don't think so, because with mouse look and reticle support auto-aim would seem to get in the way more then it helps. But I'm open to different opinions.

_________________
DarkXL....http://darkxl.wordpress.com

Emon
Ree-Yees

Joined: 10 Aug 2007

PostPosted: Oct 22, 2009 00:07    Post subject: View user's profile Send private message Reply with quote

Wait, can a concussion blast be split between high and low targets by autoaim?

sheepandshepherd
Trandoshan

Joined: 01 Apr 2008

PostPosted: Oct 22, 2009 23:40    Post subject: View user's profile Send private message Reply with quote

lucius wrote:
I personally don't think so, because with mouse look and reticle support auto-aim would seem to get in the way more then it helps. But I'm open to different opinions.


I think the weapon could have potentially great strategic use due to its area damage if it DIDN'T have autoaim. That way the player can plan the blast radius the way he wants it, not just having it centered on a specific enemy.

Imagine this: two piggies are guarding a room, facing away from you. You sneak onto a catwalk behind them, without their notice, and plan their death. However, they're standing about 30 dfu apart. If the blast was centered on one of them (which autoaim would inevitably do in most situations), the 25-dfu radius wouldn't hit them both. Targeting a spot directly in their center would, however.

Now, the bad news: I see ONE potential problem with removing autoaim. If you aim right next to a single enemy (say, 1/2 dfu), there will still be two boom-sprites, mostly overlapping and annoyingly redundant. Maybe you could create a system to manage this - autoaim defaults to on, but when the target vector would cause more damage than the autoaimed vector, then use it instead. Alternatively, you could just remove the central boom sprite and only have it drawn on enemies, unless there are none. Less pretty, but it works too, I guess.

And IF we ever get 3D explosion effects implemented, we can just make a 25-radius blast with nothing drawn on enemies.

Marley
Gamorrean

Joined: 30 Sep 2003

PostPosted: Oct 23, 2009 09:15    Post subject: View user's profile Send private message Send e-mail Reply with quote

sheepandshepherd wrote:
Now, the bad news: I see ONE potential problem with removing autoaim. If you aim right next to a single enemy (say, 1/2 dfu), there will still be two boom-sprites, mostly overlapping and annoyingly redundant. Maybe you could create a system to manage this - autoaim defaults to on, but when the target vector would cause more damage than the autoaimed vector, then use it instead. Alternatively, you could just remove the central boom sprite and only have it drawn on enemies, unless there are none. Less pretty, but it works too, I guess.



Good thinking. I think the latter option would be best.

_________________
*ZaP*

Darth Oosha
Trandoshan

Joined: 24 Sep 2003

PostPosted: Nov 06, 2009 02:11    Post subject: View user's profile Send private message Reply with quote

I was going to say something about how many splashes appear when you fire it into water, but then I realized I can't remember and it might've been just the fist I noticed having multiple splashes anyway, so never mind I guess.

Display posts from previous:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    DF-21 Forums Forum Index -> DarkXL General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group