PDA

View Full Version : Player Tracking Sniper



Defmunky666
06-11-2009, 05:52 AM
I made an object that functions like a sniper.

A spotlight or laser actually tracks the player, locks on and fires a projectile. You can see it in action and win it as a prize in my Desert Survival levels or mail me and I'll send you the object.

This is similar to other player tracking objects except it tracks the player perfectly without any bumpiness when it stops. It can also be used as a tracking spotlight or can be altered to track a key instead of the player.

I also still have my first automated turret concept if anyone wants a look. It is capable of tracking and engaging multiple objects. I have vastly improved on this, but you'll have to wait for my tower defense level to see it.

PSN: Defmunky666

Incinerator22
06-11-2009, 08:54 PM
It is oober cool.

deboerdave
06-11-2009, 09:00 PM
cool, does it have a limit on how fast it moves.
I found it hard to track with "bumpyness" if you wanted it to keep following when the player accellerated quickly.

NinjaMicWZ
06-11-2009, 09:04 PM
^^^Me too, especially if the player's going to be going full sprint, up and down several levels of height, and jumping all over the place. I'll have to check it out, because it sounds awesome.

Defmunky666
06-12-2009, 01:54 AM
The bumpiness can be stopped by increasing the detection radius. This doesn't make it as accurate but if you also increase the spotlight radius, you don't notice.

Rustbukkit
06-12-2009, 02:29 AM
Sounds sweet... I'll have to check this out later tonight!

Deliberent
06-12-2009, 02:31 AM
Could you send me your creation? Sounds very cool!
You can add me as well, i play LBP far more then i should.

PSN-Deliberent

-Cheers

Burnvictim42
06-12-2009, 05:48 AM
Your sniper works very well, i'm curious to see your tower defense item... alas, i guess i'll have to wait :P

NinjaMicWZ
06-12-2009, 10:46 AM
The bumpiness can be stopped by increasing the detection radius. This doesn't make it as accurate but if you also increase the spotlight radius, you don't notice.


In False Idols III, I have a ground-level invisible piston-block moving a 180 degree sensor switch set to directional controlling the piston, with a couple lamps on a matching piston block up in the sky... it follows the player perfectly at the speed they're walking and compensates for jumps and dips in terrain. Any faster and it passes up the player and jerks very hard and constantly moves forward and resets to the player... any slower and the player can pass it up and it will reset itself.

It has to be 180 degrees, set to the left, or the light isn't dead center on the player (who is always dead center with the sensor switch), and a 360 radius will only make the tracking more finnicky and the movement more jerky when stopped. I only want it to go left, so it's fine that it's not a full 360 sensor radius, but increasing the radius only allows the player to go higher or lower (like go uphill$, or way down below and it will still follow etc).

Are you using the MGS spotlights for tracking?

Defmunky666
06-12-2009, 11:31 AM
No Idon' t use the MGS spotlight. Its a completely different method. the spotlight is attached to a motor bolt which follows the player from one location, rather than moving with them on a piston.

If you stand still for too long once its locked onto you it charges up and fires a projectile. My Desert Survival 3 level uses it on a railgun that can penetrate walls and still kill a player hiding deep underground.

dcf
06-12-2009, 12:09 PM
I have a similar object I showed off a while ago:

http://www.lbpcentral.com/forums/picture.php?albumid=448&pictureid=3831

http://www.lbpcentral.com/forums/showthread.php?t=11184&page=7

I prevent the jumping by building a failsafe into the three way that prevents it from being pulled in both directions at once and forces the thing off when it's found sackboy. This is feed by a couple proximity switches set to 180 degrees on the motorbolt. I find that you can get the thing pretty much 100% accurate if you put the speed up too high. I actually use this (although I don't have it set to autohit because that would be dumb) in the winter attack for my boss submission is boss rush 3. The boss fires plasma balls from her hands, which seek sackboy.

rtm223
06-16-2009, 09:45 AM
The bumpiness can be stopped by increasing the detection radius. This doesn't make it as accurate but if you also increase the spotlight radius, you don't notice.

Ahhh, I'm pretty sure a few of us discussed this a while back - possibly in DCFs thread. Essentially the "bumpiness" is not really the issue - the issue is a payoff between accuracy and speed to give a stable feedback system.

BTW, it would be nice if set up a demo level for this sort of thing, I didn't get much chance to view the object as it was quite effectively killing me while the magic mouth forced me to look off screen :rolleyes:

@ dcf, have you really managed to get this to follow at high speed, with no lag, no wobble at and high accuracy (like laser beam accuracy) - and have similar smooth movement at low speed? I thought the implicit delay in controlling the 3-way, along with an implicit sensing granularity, was the limiting factor in this (i.e. unavoidable).

For linear trackers, I have done away with the 3-way switch, but you still have jerkiness when moving slow due to the lmiitations of sensing timings. The only way to improve this I have found is to have 2 speed-based prox switches controlling 2 motor bolts on top of one another. This requires a wide spread for the sensors to triagulate position, allong with other various problems.

dcf
06-16-2009, 12:53 PM
Ahhh, I'm pretty sure a few of us discussed this a while back - possibly in DCFs thread. Essentially the "bumpiness" is not really the issue - the issue is a payoff between accuracy and speed to give a stable feedback system.

BTW, it would be nice if set up a demo level for this sort of thing, I didn't get much chance to view the object as it was quite effectively killing me while the magic mouth forced me to look off screen :rolleyes:

@ dcf, have you really managed to get this to follow at high speed, with no lag, no wobble at and high accuracy (like laser beam accuracy) - and have similar smooth movement at low speed? I thought the implicit delay in controlling the 3-way, along with an implicit sensing granularity, was the limiting factor in this (i.e. unavoidable).

For linear trackers, I have done away with the 3-way switch, but you still have jerkiness when moving slow due to the lmiitations of sensing timings. The only way to improve this I have found is to have 2 speed-based prox switches controlling 2 motor bolts on top of one another. This requires a wide spread for the sensors to triagulate position, allong with other various problems.

Yeah, I've got it working fully. I've tested it with a jetpack and flown around it with x held down. It tracks great!

It isn't an autokill when it shoots unless you put a really fast projectile in it. Otherwise, it will kill if sackboy stands still.

I'll need to publish it as a tech demo at some point. I was going to put it in my version 2 of the boss AI. However, that will take a lot longer to put together.

rtm223
06-16-2009, 01:51 PM
I'll need to publish it as a tech demo at some point

Do it, NOW :p I really wanna know how you got around the speed verses accuracy payoff, while still preventing it from being all jerky!

dcf
06-16-2009, 02:12 PM
Do it, NOW :p I really wanna know how you got around the speed verses accuracy payoff, while still preventing it from being all jerky!

Removing the jerking is actually an application of strong chain, weak piston.

http://www.lbpcentral.com/forums/picture.php?albumid=448&pictureid=3831

It begins with the typically 3-way switch being pulled by chains. The addition is the mechanism underneath, which is basically just 2 AND switches.

If the right proximity switch senses the player AND the left one does not, it pulls right.

If the left proximity switch senses the player AND the right one does not, it pulls left.

(It's actually wired wrong in the picture :) That was version one, which oscillated around sackboy's position. Version 2, which is just a small change in the wiring, not the mechanism, completely avoids oscillation.)

The final piece of the puzzle is that I use overlapping proximity sensors.

RP-> MB <-LP

Both sensors are set to 180 degrees and face the direction indicated by the arrows. So the right proximity sensor (RP) which detects if sackboy is on the right side of the motorbolt (MB), is actually on the left and looks right. The left proximity sensor (LP) is on the right of MB and looks left. The overlap is small enough that it actually stops right on target. I've tried to stall it by setting it slow and using a jetpack to get behind it and it doesn't get confused.

The key is the error checking, which shuts the thing down as soon as both proximity switches sense sackboy. This means it only works with one player. I've modified the proximity switches to require all and this does an okay job for multiplayer use. It just won't move if the players surround the sniper. As soon as all the players are on one side versus the other, it activates and works fairly well from that point on.

rtm223
06-16-2009, 02:43 PM
So you have a cone in the middle where they overlap and the logic locks it down? Wouldn't you get the same effect if you had the two prox switches set to <180 degrees (a cone in the middle where neither activates and it locks down). Am I missing something here?

The cone of no sensing in the middle is what I tried and just wasn't happy with the results, maybe it just needed more tweaking. I would have thought that an extra level of logic (the ANDs) would have added a delay, making it more prone to oscillation.


Defmunky: This is sort of on topic, but as this is your object thread, let us know if you feel it has been hijacked - I don't wanna be treading on any toes here :)

dcf
06-16-2009, 11:20 PM
Published a demo.

psn: dcf
Boss AI Tutorial 2 Preview

The trick is matching the overlap to the speed.

Defmunky666
06-19-2009, 09:29 PM
lol not at all. feel free to discuss other systems. I'm creating a sytem where the further sackboy is away from the detection switches the detection arc widens to compensate. Its working perfectly at the moment. I'll upload a pic soon

Waldo
06-23-2009, 10:00 PM
lol not at all. feel free to discuss other systems. I'm creating a sytem where the further sackboy is away from the detection switches the detection arc widens to compensate. Its working perfectly at the moment. I'll upload a pic soon

Stupid thunder storm making me unable to see this. I wonder how you will go about doing such a thing. And would it be capable to set the device to work simultaneously with others? Specifically with something like this
http://www.lbpcentral.com/forums/showthread.php?p=227987&posted=1#post227987? Your original design for the triple beam tracker gave me the idea for this. I've dabbled in automated turrets already but most aren't superbly accurate for the players sake. :D