NS2c

15681011

Comments

  • YuukiYuuki Join Date: 2010-11-20 Member: 75079Members
    edited November 2012
    Here's my stuff: <a href="https://github.com/Staross/NS2c/commits/Dev" target="_blank">https://github.com/Staross/NS2c/commits/Dev</a>

    The root of the movement is in GroundMoveMixin:UpdateMove() :

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->    if self.PreUpdateMove then
            self:PreUpdateMove(input, runningPrediction)
        end
        
        local velocity = self:GetVelocity()
        // Don't factor in forward velocity if stunned.
        if not HasMixin(self, "Stun") or not self:GetIsStunned() then
            // ComputeForwardVelocity is an expected callback.
            velocity = velocity + self:ComputeForwardVelocity(input) * input.time
        end
        
        // Add in the friction force.
        // GetFrictionForce is an expected callback.
        local friction = self:GetFrictionForce(input, velocity) * input.time

        ...
        
        if self.gravityEnabled and self:GetGravityAllowed() then
            // Update velocity with gravity after we update our position (it accounts for gravity and varying frame rates)
            velocity.y = velocity.y + self:GetGravityForce(input) * input.time
        end
        
        // Add additional velocity according to specials.
        self:ModifyVelocity(input, velocity)
        
        // Clamp speed to max speed
        if self.OnClampSpeed then
            self:OnClampSpeed(input, velocity)
        end
        
        velocity = self:UpdatePosition(velocity, input.time, input.move)<!--c2--></div><!--ec2-->

    You mainly want to look at ComputeForwardVelocity, GetFrictionForce, ModifyVelocity and OnClampSpeed. Then depending on the lifefoms they can be spread around Player.lua, Alien.lua, Marine.lua and the lifeform file (e.g. Skulk.lua).
  • maessemaesse Join Date: 2010-04-08 Member: 71213Members
    I haven't committed anything special yet, because there is some bugs that I needs to iron out (all non-horizontal surfaces are broken), but the main goldSrc stuff is in there.

    Take a look:

    <a href="http://www.youtube.com/watch?v=DCMozbFRZs8" target="_blank">http://www.youtube.com/watch?v=DCMozbFRZs8</a>

    <center><object width="450" height="356"><param name="movie" value="http://www.youtube.com/v/DCMozbFRZs8"></param><embed src="http://www.youtube.com/v/DCMozbFRZs8" type="application/x-shockwave-flash" width="450" height="356"></embed></object></center>
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    Did you make a majority of these changes within the player class? Or is this currently specific to the skulk?
  • maessemaesse Join Date: 2010-04-08 Member: 71213Members
    Most of the actual code is in the Player class, but it's enabled through a custom GroundMove mixin, which are included from each class - so it can be disabled on a pr. class basis if wanted. Classes using the normal GroundMoveMixin should work as usual.
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    Looks good, would be interested in trying that out.. let me know if you need any help with some bugs/quirks
  • maessemaesse Join Date: 2010-04-08 Member: 71213Members
    I've pushed my latest changes to the fork. I got the stuck bugs fixed and been jumping around for like an hour, haha.. Personally I think it feels totally like NS1 now, except that maybe there is a bit too much airacceleration (and some other small stuff to tweak). The marines coincidentally also feels very NS1 vanilla now, they bunnyhop the same way (ie. poorly, only works up along ramps or for getting small boosts from railings). The hold-down-w speed-boost for aliens will have to be reworked in there again though.

    Also, I notice this little thing when I was modifying some code:
    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->function Onos:GetAcceleration()

        local acceleration = Player.GetAcceleration()<!--c2--></div><!--ec2-->
    Player.GetAcceleration? Not the Alien.GetAcceleration that adds celerity acceleration boost?

    Is there a place we can report simple stuff like that to UWE?
  • WilsonWilson Join Date: 2010-07-26 Member: 72867Members
    edited November 2012
    I tried to port over just the friction code form gldsrc/source, but I had an issue. It's not really important since maesse has done it already but I was doing it more as a programming exercise and I'm trying to figure out what I did wrong.

    The friction was working correctly, but speed would vary depending on FPS. If I set maxfps 20 then I would move slower.

    I used input.time in drop and then scaled the velocity vector exactly like maesse's code, but for some reason it didn't work...

    Here is the code: <a href="http://codepad.org/gewwqd7s" target="_blank">http://codepad.org/gewwqd7s</a>

    EDIT: Just copied maesse's code over and it didn't work either so I guess it's something to do with the Mixin.
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    That Onos Accel bug may actually just be something I boggered up, I'll have to check that out.

    Theres quite a few issues I have/had found over my time working with NS2, generally I had been reporting them via a PT but anymore I havent really had the desire to do that for various reasons, Im not really sure the best way to do that now.

    - Vanilla NS2 Onos does infact use the correct code to account for celerity, so that was just my mistake (or i had to remove celerity for accel cause of a bug, i cant remember atm lol).
  • maessemaesse Join Date: 2010-04-08 Member: 71213Members
    Hey Wilson, I haven't looked at your code, but sounds like the problem is that you basically multiply by input.time twice.. I had the same issue earlier, which is why I ended up making the custom mixin. You can do a result:Scale(1.0/input.time) though, and it'll even out.
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    Tried out the movement changes, and def feels better than anything I had come up with sofar. My only critique would be you might loose speed a little to quickly when making turns close to 45 degrees, but its been a while since I did bhop in gldsrc.

    Since it doesnt look like you changed much for marines, the double jump code I had already added seems to still work well, and does really start to feel like NS1. Probably the last item of focus would be crouching.
  • Trance420Trance420 Join Date: 2010-03-31 Member: 71135Members
    wiggle walk available? lol... now we the main focus will be adding more people to play this
  • YuukiYuuki Join Date: 2010-11-20 Member: 75079Members
    I also had some really weird behavior with friction, to test it I was directly plugging a constant force and a constant friction into GroundMoveMixin and I wasn't getting the correct speed (force over friction). I don't know if it's NS2 or NS2c related or if it was some other changes I made, I should check further.
  • LofungLofung Join Date: 2004-08-21 Member: 30757Members
    edited November 2012
    does it work with the current build? some of my players showed interested and would like to try it out :D

    edit: just to say it doesnt work very well. i could download it from steam with my game but the server client just couldnt find the mod ns2c.

    it says

    Download mods
    VAC Enabled
    Starting download of 'NS2c'
    Error: Error installing mod 'NS2c" <download failed: 28>
    Finished downloading and installing mods
    Error: Mod wasn't available

    probably an steamworkshop issue?
  • JektJekt Join Date: 2012-02-05 Member: 143714Members, Squad Five Blue, Reinforced - Shadow
    I am getting the same error trying to download the mod onto a dedicated server.
    <a href="http://www.unknownworlds.com/ns2/forums/index.php?showtopic=124547" target="_blank">http://www.unknownworlds.com/ns2/forums/in...howtopic=124547</a>
  • LofungLofung Join Date: 2004-08-21 Member: 30757Members
    edited November 2012
    just to say, a bit off topic if might be. tried co mode again and it just doesnt work. the same problem
  • echsechs Join Date: 2002-12-27 Member: 11568Members, Constellation
    Amazing mod, thankyou!
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    Hi Guys,

    Before I start too much guessing, can someone tell me how the github zip file is supposed to be used on a Server?

    I see that the github page referenced the mod ID but using the automatic download fails when I try to use it, so I tried extracting the zip to my mods folder with the ID from the github page and a random timestamp after the _ (I believe I read that was supposed to be a timestamp from my reading).

    How exactly are you supposed to install this I can't find any instructions? It looks to have a whole bunch of model replacements etc and I don't have enough experience with NS2 mods yet to know if mod folders are able to substitute all these files or if I should be trying to overwrite the core files etc so any assistance would be great :)
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    Well I got this working with a manual download, I forgot the stupid "m" at the beginning of the folder.

    I have been posting messages in the Server section trying to figure out why this does not seem to want to download automatically and requires a manual install.

    I tested my client however with not having the mod at all and it seemed to download automatically and everything fine.
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    Also Dragon I notice you are including eclipse_beta and tanith_beta maps.

    Might I suggest not including them in your mod and instead adding them as a pre-req similar to how Combat Mod does it? i.e. -mods "NS2C eclipse_beta tanith_beta"

    This should:

    Reduce the overall NS2C package size a little
    Ensure that if there are future patches/modifications to the maps you don't need to release a whole new build
    Reduce any potential double downloads if the players have played on a server previously running eclipse or tanith betas?
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    edited November 2012
    Also currently with the Workshop mod download version there is an error:

    When I go to shoot my pistol at an enemy structure at least, no bullets, no firing sounds etc fire and I get a script error which I have posted on Github:

    <a href="https://github.com/xToken/NS2c/issues/206" target="_blank">https://github.com/xToken/NS2c/issues/206</a>

    If I fire my pistol at the floor etc it works fine.

    Same thing with the Axe.
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    Yea the main version on github/workshop is broken atm, mainly just waiting on wrapping up some movement changes before we publish a new version.

    The reason for including those maps is the current workshop versions have issues, on eclipse you cannot take southloop rt, and tanith has a slew of problems. Eclipse is still being worked on but will not be updated on workshop for the time being, im not sure if Tanith is still being worked on, dont think ive seen SSJYoda around.
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    NS2c Patch 4
    The main goal of this patch was the reworking of the movement system again, with Maesse completely re-creating movement from GoldSource.
    Also added with this change was an AdvancedMovement option, which currently is off by default just eliminates forward inputs when strafing and airborne. When switched on, the inputs and movement will work like HL1.
    For bug fixes and changes this patch mainly fixes some small bugs preventing the mod from working correctly.
    Added TRES to Marine HUD.
    Fixed error when attempting to damage anything.
    Fixed deluxe model conflicting with heavy armor model.
    Adjusted speeds of all classes to bring more in line with NS1.

    With this patch we also would like to welcome Maesse to the team, who is solely responsible for the re-creation of the goldsource movement code.

    This patch is uploaded to workshop and is running on the 2 servers that I run now!
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    edited December 2012
    Great work Dragon,

    There was one bug found during our testing, Aliens can't build additional Hive's:

    <!--c1--><div class='codetop'>CODE</div><div class='codemain'><!--ec1-->[Server] Script Error #11375: lua/ConstructMixin.lua:113: attempt to call method 'ConstructOverride' (a nil value)
        Call stack:
        #1: SharedUpdate lua/ConstructMixin.lua:113
            self = Hive-1274 {alive=1, animationBlend=0, animationGraphIndex=16, animationGraphNode=0, animationSequence2=-1, animationSequence=0, animationSpeed2=1, animationSpeed=1, animationStart2=0, animationStart=325.44622802734, armor=0, attachedId=753, buildFraction=0, cloaked=0, cloakedFraction=0, collisionRep=0, commanderId=-1, constructionComplete=0, currentOrderId=-1, flinchIntensity=0, fullyCloaked=0, gameEffectsFlags=0, health=7000, healthIgnored=0, inCombat=0, lastTakenDamageAmount=22, lastTakenDamageOrigin=Vector {x=59.865383148193, y=-6.8987998962402, z=-57.01651763916 }, lastTakenDamageTime=501.09854125977, lastTargetId=-1, layer1AnimationBlend=0, layer1AnimationGraphNode=10, layer1AnimationSequence2=-1, layer1AnimationSequence=-1, layer1AnimationSpeed2=1, layer1AnimationSpeed=1, layer1AnimationStart2=0, layer1AnimationStart=0, locationEntId=1770, locationId=5, maxArmor=0, maxHealth=7000, modelIndex=27, occupied=0, physicsGroup=2, physicsGroupFilterMask=0, physicsType=4, recentHealthChanged=0, researchProgress=0, researchingId=1, sighted=1, teamNumber=2, techId=158, timeLastHealed=663.92230224609, umbratime=0, underConstruction=0, visibleClient=0 }
            deltaTime = 0.028451940044761
            effectTimeout = 1
        #2: lua/ConstructMixin.lua:141
            self = Hive-1274 {alive=1, animationBlend=0, animationGraphIndex=16, animationGraphNode=0, animationSequence2=-1, animationSequence=0, animationSpeed2=1, animationSpeed=1, animationStart2=0, animationStart=325.44622802734, armor=0, attachedId=753, buildFraction=0, cloaked=0, cloakedFraction=0, collisionRep=0, commanderId=-1, constructionComplete=0, currentOrderId=-1, flinchIntensity=0, fullyCloaked=0, gameEffectsFlags=0, health=7000, healthIgnored=0, inCombat=0, lastTakenDamageAmount=22, lastTakenDamageOrigin=Vector {x=59.865383148193, y=-6.8987998962402, z=-57.01651763<!--c2--></div><!--ec2-->

    I expect the hives are supposed to build themselves? We are able to use heal spray to build it more, however even if we heal spray to 100% it will never complete and always stays in Un-built state.

    Also with NS2C options is there supposed to be a config file generated in the config folder? i.e. AdvancedMovement

    Or where is this option?
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    edited December 2012
    Oops, not sure how that broke since it all worked when testing before i published, but the publish did fail 3 times :/..

    The option for AdvancedMovement is in the main menu options, it will show up under Camera Animation, but only once the mod is active (either you join a game running it, or you go to mods in the menu and make it active).

    That assert with constructmixin should be corrected now also, for the hive and the whip.
  • YuukiYuuki Join Date: 2010-11-20 Member: 75079Members
    The movement really feels like ns1 now, good job on that. Maybe the wall jump could be boosted though, it feels really lacking coming from ns2. The marine jump crouch is sweet as well, even if the camera is shaking a bit.
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    <!--quoteo(post=2038848:date=Dec 3 2012, 04:32 AM:name=xDragon)--><div class='quotetop'>QUOTE (xDragon @ Dec 3 2012, 04:32 AM) <a href="index.php?act=findpost&pid=2038848"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Oops, not sure how that broke since it all worked when testing before i published, but the publish did fail 3 times :/..

    The option for AdvancedMovement is in the main menu options, it will show up under Camera Animation, but only once the mod is active (either you join a game running it, or you go to mods in the menu and make it active).

    That assert with constructmixin should be corrected now also, for the hive and the whip.<!--QuoteEnd--></div><!--QuoteEEnd-->

    Oh are you saying this is a client-side feature not a Server-side?
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    Yes clients can choose how they want the movement to work. Wall jumping is tricky to balance as too much gain makes it abuse able because it offers evasive movement and a speed increase.
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    Ok we found another bug tonight?

    If you use Shades to cloak structures they cloak fine.

    However if Marines use a scan it uncloaks all structures and only Hives re-cloak.

    The rest of the structures stay uncloaked forever.

    if you put another Shade down, it still doesn't cloak the other structures only itself until a scan is done.

    Hope this makes sense!
  • RothgarRothgar Join Date: 2009-11-13 Member: 69372Members
    Is it just me or do the fades seem to be able to dish out too much damage?

    I haven't played NS1 for a while but they seem to be a bit over the top?
  • xDragonxDragon Join Date: 2012-04-04 Member: 149948Members, NS2 Playtester, Squad Five Gold, NS2 Map Tester, Reinforced - Shadow
    Yea the shade bug is something that makes sense with how I changed some detection events. For the fade, there are some hit detection issues still with NS2 which really makes the aliens in NS2c seem slightly too powerful.
Sign In or Register to comment.