Lerk Flight by twiliteblue

24

Comments

  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
    <!--quoteo(post=1866235:date=Aug 3 2011, 08:15 PM:name=Wilson)--><div class='quotetop'>QUOTE (Wilson @ Aug 3 2011, 08:15 PM) <a href="index.php?act=findpost&pid=1866235"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I really like this mod.

    Is it possible to make it so that you can remain in the air while strafing left and right. I think it'd be cool to be able to circle strafe around marines while in mid air.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Thanks for the feedback! I'll modify the gliding so you can maintain height (zero downward force) while gliding if only left/right keys are held.
  • SewlekSewlek The programmer previously known as Schimmel Join Date: 2003-05-13 Member: 16247Members, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Developer
    gliding sidewards? whats wronge about pressing jump button every once in a while? ^^
    and i think it would look stupid / unrealistic
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
    <!--quoteo(post=1866299:date=Aug 4 2011, 04:17 AM:name=Schimmel)--><div class='quotetop'>QUOTE (Schimmel @ Aug 4 2011, 04:17 AM) <a href="index.php?act=findpost&pid=1866299"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->gliding sidewards? whats wronge about pressing jump button every once in a while? ^^
    and i think it would look stupid / unrealistic<!--QuoteEnd--></div><!--QuoteEEnd-->
    I should clarify. I never wanted Lerks to be able to glide sideways.

    What I just improved is air strafing when only Left/Right and Jump are held down. The only difference is, previously, looking downward would make the Lerk glide downward rapidly. My intention was for the Lerk to only dive down if the player is looking down, and holding the Forward key when gliding.
  • SewlekSewlek The programmer previously known as Schimmel Join Date: 2003-05-13 Member: 16247Members, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Developer
    you should reduce backward flight speed a bit.
    you need it only too keep distance, not to gain i would say. if you want to escape you should turn around and look in that direction
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
    <!--quoteo(post=1866395:date=Aug 4 2011, 11:19 AM:name=Schimmel)--><div class='quotetop'>QUOTE (Schimmel @ Aug 4 2011, 11:19 AM) <a href="index.php?act=findpost&pid=1866395"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->you should reduce backward flight speed a bit.
    you need it only too keep distance, not to gain i would say. if you want to escape you should turn around and look in that direction<!--QuoteEnd--></div><!--QuoteEEnd-->
    Good idea. I've added friction when the Lerk is not gliding, as well as additional vertical friction when Jump is held down, so it doesn't fall straight down when you lose control. I've also added more lift when flapping sideways, so it's easier to maintain height.

    Lerk Mod 1.9.3 Download: <a href="http://www.mediafire.com/?84xxjgcpxdf1e2e" target="_blank">http://www.mediafire.com/?84xxjgcpxdf1e2e</a>
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Members
    Just tried this, it's awesome now! I love being able to strafe back and forth and around a target.

    My only gripe is that when changing from strafing in one direction to the opposite (e.g. left to right) you stop in one spot for a second - I think that'll make the lerk really easy to shoot. It'd be better if you could just change direction rapidly from left to right so it could be used at avoiding marine fire.
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
    edited August 2011
    <!--quoteo(post=1866675:date=Aug 5 2011, 07:15 AM:name=Wilson)--><div class='quotetop'>QUOTE (Wilson @ Aug 5 2011, 07:15 AM) <a href="index.php?act=findpost&pid=1866675"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Just tried this, it's awesome now! I love being able to strafe back and forth and around a target.

    My only gripe is that when changing from strafing in one direction to the opposite (e.g. left to right) you stop in one spot for a second - I think that'll make the lerk really easy to shoot. It'd be better if you could just change direction rapidly from left to right so it could be used at avoiding marine fire.<!--QuoteEnd--></div><!--QuoteEEnd-->
    You can still change direction quickly by turning your view. Strafing does have its risks, but it does help make the Lerk a little harder too hit as it shoot Spikes at the Marine.

    Lerk Mod Version 1.9.9 Download! <a href="http://www.mediafire.com/?luooelbqhxbdanl" target="_blank">http://www.mediafire.com/?luooelbqhxbdanl</a>
    - Fixed a bug that made the Lerk fall too slowly when gliding.
  • YuukiYuuki Join Date: 2010-11-20 Member: 75079Members
    edited August 2011
    Feels great, it should go into the game asap !

    Some random ideas :

    - Make the camera rotate a bit while strafing :

    <img src="http://www.hickerphoto.com/data/media/161/birds-flying_MG1135.jpg" border="0" class="linked-image" />

    - You can fly forever without flapping, you should loose more speed to favor skillful flapping or something. Flight is almost too easy now.

    - Shift seems to be a bit redundant with backward, another option would be to have a dive attack :

    <img src="http://thumbs.dreamstime.com/thumblarge_499/1272411545PVQj34.jpg" border="0" class="linked-image" />

    Right now if you release all keys you go down fast but you loose all control.
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
    <!--quoteo(post=1866783:date=Aug 5 2011, 02:58 PM:name=Yuuki)--><div class='quotetop'>QUOTE (Yuuki @ Aug 5 2011, 02:58 PM) <a href="index.php?act=findpost&pid=1866783"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Feels great, it should go into the game asap !

    Some random ideas :

    - Make the camera rotate a bit while strafing :

    - You can fly forever without flapping, you should loose more speed to favor skillful flapping or something. Flight is almost too easy now.

    - Shift seems to be a bit redundant with backward, another option would be to have a dive attack :

    Right now if you release all keys you go down fast but you loose all control.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Thanks for the feed back! I should explain my flight model further:

    I think flying should be as intuitive as possible. Having to constantly tap Jump just to keep speed adds little to game play, and feels tedious after a while. With the Lerk's newly enlarged hit box, it takes quite a lot of skills to dodging out of Marines' cross-hair.

    Diving attack can easily be performed by holding Forward + Jump and looking at your target.

    One great use of air brake (Shift key) is to rapidly change direction of flight. Simply tap Shift to deceleration, then tap Forward + Jump in the new direction. The Lerk does't always fly forward!

    Releasing the Jump keys simulates the Lerk folding its wings, and follows a projectile trajectory. If you hold Jump, its wings will increase the air friction, so the Lerk drops slowly.
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
    edited August 2011
    Mod Updated (28 Aug): <a href="http://www.unknownworlds.com/ns2/forums/index.php?showtopic=113997" target="_blank">http://www.unknownworlds.com/ns2/forums/in...howtopic=113997</a>

    I've improved Lerk's ability to gain height and accelerate. Please post any bugs or suggestions. Thanks!
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
    edited October 2011
    <a href="http://www.mediafire.com/?m0evuw8cujmmbzj" target="_blank">Lerk flight mod 2.3</a>

    <a href="http://www.mediafire.com/?5h1vr29narpxjfp" target="_blank">Lerk flight mod 2.2</a>

    <a href="http://www.mediafire.com/?352zpywtdm2ko74" target="_blank">Lerk flight mod 2.1 (buggy)</a>

    While it seems most players are enjoying my flight model, the current lerk flight has some problems that I wasn't able to fix:
    - looking up while flapping adds velocity in the facing direction, which made flapping straight upward difficult when you want to look upward.
    - lateral flapping adds too much upward velocity, but not enough horizontal velocity.
    - neutral gliding (holding jump key only) kills upward velocity gained from previous flap/jump.
    - while neutral gliding, look too far downward kills forward velocity.

    The new scheme has some major changes:
    <ul><li> If you don't hold Jump while in the air, you slow down. This affects upward and horizontal (forward/lateral/backward) velocity. </li><li> Holding Jump slows falling speed, but no longer slows horizontal speed when not gliding.</li><li> Neutral gliding no longer follows mouselook upward. You have to use directional gliding, or flap to gain upward velocity.</li><li> Added minimum gliding "coasting" speed (of 2.8, equal to walking speed). </li><li> Air acceleration increased from 4 to 6 (consequently, each flap has more force).</li><li> Fixed initial ground take-off maximum speed being too high (Lerk now starts slow, but the speed cap is raised over 5 seconds).</li><li> Flap frequency is now limited (to 4 times per second).</li></ul>

    I really appreciate the community's help with testing these changes. I'm looking forward to suggestions and bug reports!
  • YuukiYuuki Join Date: 2010-11-20 Member: 75079Members
    Feels good overall, good job ! The main thing that feels bad is that you slow down when you flap, e.g. if you flap very fast you go slower than just simple gliding, which doesn't make a lot of sense. The horizontal slow down when you release all keys feels a bit weird also, but it's not so important.

    I had a quick look at the code, and I'm just curious, do you integrate Newton's laws of motion or is the speed set by some heuristics ?
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
    edited October 2011
    <!--quoteo(post=1880687:date=Oct 19 2011, 09:23 AM:name=Yuuki)--><div class='quotetop'>QUOTE (Yuuki @ Oct 19 2011, 09:23 AM) <a href="index.php?act=findpost&pid=1880687"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Feels good overall, good job ! The main thing that feels bad is that you slow down when you flap, e.g. if you flap very fast you go slower than just simple gliding, which doesn't make a lot of sense. The horizontal slow down when you release all keys feels a bit weird also, but it's not so important.

    I had a quick look at the code, and I'm just curious, do you integrate Newton's laws of motion or is the speed set by some heuristics ?<!--QuoteEnd--></div><!--QuoteEEnd-->
    Thanks for the complements.

    The slow down you experience is due to the increased (air) friction while the Jump key is not pressed. Using movement keys, you can negate some of the friction. Releasing all movement keys simulates (air) braking, similar to how ground movement works.

    I wanted to allow more precise control: a quick tap on Jump to simulate a small flap, and holding down Jump would be interpreted as a powerful flap.

    Another purpose of the increased friction (when Jump is not pressed down) is so mashing Jump would not increase speed, but can still be used to change direction quickly. This was needed after the removal of the (Shift key) air brake and the slowdown during flap.

    If you look at the current NS2 code, each flap reduced a fraction of previous velocity to enable quick direction change, which worked fine, but does not offer as much control.
  • YuukiYuuki Join Date: 2010-11-20 Member: 75079Members
    The thing is when a bird is scared and needs to get away fast it will flap like crazy. I used to do the same in NS, it's very intuitive, you need to get out => flap like crazy.

    That's the first reason why going faster when gliding that flapping fast feels weird.

    The second reason why I think it is weird is because it's also wrong from a physical point of view. If you apply a forward force f with some friction k you will reach a maximal velocity ~f/k. Now if you stop applying this force (=stop flapping) you will relax to zero exponentially, thus the maximal speed is always reached while flapping (at constant altitude of course).
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
    <a href="http://www.mediafire.com/?msag67ir26jz2q8" target="_blank">Lerk flight mod 2.4</a>

    Shift key air brake has returned! It now feels closer to a real air brake.
  • swalkswalk Say hello to my little friend. Join Date: 2011-01-20 Member: 78384Members, Squad Five Blue
    edited October 2011
    Seems like some great changes, can't wait to try it.

    Edit: Okay, now I've tried it on HBZ's server.
    I got some really wierd stuttering when flapping, but I think I can see what you tried to do.
    It was great for strafe flapping, to be able to avoid like that, but it felt really unnatural.
    Flying straight was a pain, this new flapping kept breaking my speed, and felt stuttering.
    Hope you can resolve this :)
  • YuukiYuuki Join Date: 2010-11-20 Member: 75079Members
    I've been playing a bit with the Lerk flight, I added the view tilt. It feels pretty good, it makes the lerk feel a bit more organic :

    <center><object width="450" height="356"><param name="movie" value="http://www.youtube.com/v/rg8x9UlYKwU"></param><embed src="http://www.youtube.com/v/rg8x9UlYKwU" type="application/x-shockwave-flash" width="450" height="356"></embed></object></center>
  • HackepeterHackepeter Join Date: 2003-06-08 Member: 17107Members, Constellation
    <!--quoteo(post=1882726:date=Oct 30 2011, 07:54 PM:name=Yuuki)--><div class='quotetop'>QUOTE (Yuuki @ Oct 30 2011, 07:54 PM) <a href="index.php?act=findpost&pid=1882726"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I've been playing a bit with the Lerk flight, I added the view tilt. It feels pretty good, it makes the lerk feel a bit more organic :

    (video)<!--QuoteEnd--></div><!--QuoteEEnd-->

    Wow Yuuki, that looks pretty cool! But does the Lerks third person model also tilt like that?
  • YuukiYuuki Join Date: 2010-11-20 Member: 75079Members
    No, I only rotate the camera locally. But it would be nice to have the model rotate as well yeah.
  • Squeal_Like_A_PigSqueal_Like_A_Pig Janitor Join Date: 2002-01-25 Member: 66Members, Super Administrators, NS1 Playtester, NS2 Developer, Reinforced - Supporter, WC 2013 - Silver, Subnautica Developer
    <!--quoteo(post=1882726:date=Oct 30 2011, 05:54 PM:name=Yuuki)--><div class='quotetop'>QUOTE (Yuuki @ Oct 30 2011, 05:54 PM) <a href="index.php?act=findpost&pid=1882726"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I've been playing a bit with the Lerk flight, I added the view tilt. It feels pretty good, it makes the lerk feel a bit more organic :<!--QuoteEnd--></div><!--QuoteEEnd-->
    Nice! I've been wanting view tilt when banking left and right for the Lerk for a long time. This looks pretty cool.

    --Cory
  • aeroripperaeroripper Join Date: 2005-02-25 Member: 42471NS1 Playtester, Forum Moderators, Constellation
    <!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->I've been playing a bit with the Lerk flight, I added the view tilt. It feels pretty good, it makes the lerk feel a bit more organic :<!--QuoteEnd--></div><!--QuoteEEnd-->

    So cool! Hope it gets added officially.
  • TwiggehTwiggeh Join Date: 2010-09-24 Member: 74165Members
    <!--quoteo(post=1882735:date=Oct 30 2011, 09:29 PM:name=aeroripper)--><div class='quotetop'>QUOTE (aeroripper @ Oct 30 2011, 09:29 PM) <a href="index.php?act=findpost&pid=1882735"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->So cool! Hope it gets added officially.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Me too, that was awesome!
  • AsranielAsraniel Join Date: 2002-06-03 Member: 724Members, Playtest Lead, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow, Subnautica Playtester, Retired Community Developer
    looks cool! have to test a little to see if it doesn't make me motion sick (like the old wallwalking), but if it does, its probably easy to lower the tilt a little :)
    ah, and +1 for 3rd person tilting.
  • JibrailJibrail Join Date: 2009-04-16 Member: 67200Members
    that looks freakin AWSOME! it just feels right, hope UWE add this into the next patch.
  • SewlekSewlek The programmer previously known as Schimmel Join Date: 2003-05-13 Member: 16247Members, NS2 Developer, NS2 Playtester, Squad Five Gold, Subnautica Developer
  • YuukiYuuki Join Date: 2010-11-20 Member: 75079Members
    Here is the code for the tilt, I'm not sure it's the right way to do it, but I added this function in Lerl.lua. I also added two variables, previousYaw and yawVelocity, to measure how fast the lerk turns, and then the camera rotation if set to a smoothed version of it :

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->// Tilt the camera
    if Client then
        function Lerk:PlayerCameraCoordsAdjustment(cameraCoords)
        
            local viewModelTiltAngles = Angles()
            viewModelTiltAngles:BuildFromCoords(cameraCoords)
            
            local targetYawVelocity = (viewModelTiltAngles.yaw - self.previousYaw) //dt missing
            
            //transitions from -pi to pi and from pi to -pi
            if (viewModelTiltAngles.yaw - self.previousYaw) > math.pi then
                targetYawVelocity = targetYawVelocity-2*math.pi
            end
            if (viewModelTiltAngles.yaw - self.previousYaw) < -math.pi then
                targetYawVelocity = targetYawVelocity+2*math.pi
            end
                  
            self.yawVelocity = self.yawVelocity + 0.1*(targetYawVelocity - self.yawVelocity)  //dt missing
            self.previousYaw = viewModelTiltAngles.yaw
            
            if self.gliding then
                self.currentCameraRoll  = self.currentCameraRoll  + 0.05*(  -5*self.yawVelocity - self.currentCameraRoll  )  //dt missing
            else
                self.currentCameraRoll  = self.currentCameraRoll  + 0.05*(  -1*self.yawVelocity - self.currentCameraRoll  )  //dt missing
            end
            
            viewModelTiltAngles.roll = self.currentCameraRoll
            local viewModelTiltCoords = viewModelTiltAngles:GetCoords()
            viewModelTiltCoords.origin = cameraCoords.origin
        
            return viewModelTiltCoords
        
        end
    end<!--c2--></div><!--ec2-->
  • FloodinatorFloodinator [HBZ] Member Join Date: 2005-02-22 Member: 42087Members, Reinforced - Shadow
    Sweet it makes me want to play lerk with my Joystick.
  • twilitebluetwiliteblue bug stalker Join Date: 2003-02-04 Member: 13116Members, NS2 Playtester, Squad Five Blue
    edited November 2011
    Nice one Yuuki! It looks really fun.

    I've noticed that the view is also tilting while on the ground, so I've disabled that. I'm having some trouble trying to add view tilting to strafing.

    <!--quoteo(post=1882740:date=Oct 30 2011, 02:01 PM:name=Asraniel)--><div class='quotetop'>QUOTE (Asraniel @ Oct 30 2011, 02:01 PM) <a href="index.php?act=findpost&pid=1882740"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->looks cool! have to test a little to see if it doesn't make me motion sick (like the old wallwalking), but if it does, its probably easy to lower the tilt a little :)
    ah, and +1 for 3rd person tilting.<!--QuoteEnd--></div><!--QuoteEEnd-->
    The tilting does make me slightly motion sick after a while.

    Third person model tilting would be cool, however, it would make the Lerk an even more difficult to hit.


    Edit: I found a bug in the game, which happens when you look along the Y-Axis (directly up and downward). It affects all classes, especially Lerk first person rotation and Skulk third person model rotation.
  • WarmongerWarmonger Join Date: 2003-02-04 Member: 13126Members, Constellation
    That Lerk tilt is awesome and I agree the devs should definitely add it to the official build. It's very subtle but makes the Lerk flight feel way more natural.
  • swalkswalk Say hello to my little friend. Join Date: 2011-01-20 Member: 78384Members, Squad Five Blue
    <!--quoteo(post=1882791:date=Oct 31 2011, 05:14 AM:name=Warmonger)--><div class='quotetop'>QUOTE (Warmonger @ Oct 31 2011, 05:14 AM) <a href="index.php?act=findpost&pid=1882791"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->That Lerk tilt is awesome and I agree the devs should definitely add it to the official build. It's very subtle but makes the Lerk flight feel way more natural.<!--QuoteEnd--></div><!--QuoteEEnd-->
    I disagree. Not subtle at all.
    While the effect is very cool indeed, I almost get motion sickness from just watching the video.
    It <i>must</i> be alot more subtle imo, but great idea none the less.
Sign In or Register to comment.