Page 1 of 1

Timing of the laser drone

Posted: 2009.03.27 (18:28)
by 999_Springs
On a level such as 9-3 or 12-2, when you're approaching from below an area in which a laser drone can see you, I have noticed that the laser drone sometimes fires instantaneously upon seeing you but other times waits for a very useful fraction of a second before firing. However, I have never worked out how the laser works out whether to wait or not, and for how long. It seems completely random. But on some levels you can't get a highscore unless the laser drone delays itself for that crucial split second, and I would like to know exactly how the laser drone does its weird timing.

Re: Timing of the laser drone

Posted: 2009.04.11 (11:56)
by Zephyr
The game is designed so that only one enemy can fire per frame, it annoys me alot when I'm making DDA's and other maps that require precise timing.
I hope that's the answer to your question.

http://forum.therealn.com/viewtopic.php?f=18&t=526


:)

Re: Timing of the laser drone

Posted: 2009.04.11 (20:19)
by 999_Springs
I don't think it's that. If you look at the highscores on 9-3 (or speedruns) you will see that when the ninja reaches the top of the level at the beginning, the laser drone delays firing for a very noticeable fraction of a second. If you go and play the level for a bit, you will see that this happens some of the time, but other times the laser drone fires immediately and leaves you stuck in mid-air with the beam underneath you. It almost seems random whether it delays or not. Surely this cannot be just the work of single frames.

Re: Timing of the laser drone

Posted: 2009.04.12 (19:17)
by PsychoSnail
999_Springs wrote:I don't think it's that. If you look at the highscores on 9-3 (or speedruns) you will see that when the ninja reaches the top of the level at the beginning, the laser drone delays firing for a very noticeable fraction of a second. If you go and play the level for a bit, you will see that this happens some of the time, but other times the laser drone fires immediately and leaves you stuck in mid-air with the beam underneath you. It almost seems random whether it delays or not. Surely this cannot be just the work of single frames.
I'm pretty sure z3phyr is right. The game handles rocket turrets, gauss turrets, chaingun drones, and laser drones in such a way so that only one is dealt with at a time. The more enemies there are, the longer the delay. Even the difference of a single frame can mean that you missed the previous cycling of enemies, and the game has to loop through all the enemies again for the laser to notice you. To test this out, try removing the two gauss turrets and the chaingun drone from 9-3. The laser will not be delayed then (I just tried this).
This is also the reason why stacked rockets do not fire all at once, and why it takes a while for the enemies to start firing in a DDA with a lot of enemies.
Here's the code for the modified 9-3:

Re: Timing of the laser drone

Posted: 2009.04.12 (22:39)
by TheRealOne
There is also this weird trick, if you one frame jump the laser drone doesn't detect you. As in the the demo.


Re: Timing of the laser drone

Posted: 2009.04.12 (22:42)
by Izzy
TheRealOne wrote:There is also this weird trick, if you one frame jump they drone doesn't detect you. As in the the demo.

It's not a one frame jump, it's a jump after only 1 frame on the floor.

I'd like to point out my 126-2 speedrun route.

Which was taken by kryX.