LUA info

rsdrsd Join Date: 2003-02-11 Member: 13405Members
<div class="IPBDescription">Posted by Charlie on getsatisfaction.com</div><!--quoteo--><div class='quotetop'>QUOTE </div><div class='quotemain'><!--quotec-->Hey Zoc!

You'll get a small collection of Lua files that form the basis for NS2 and modding on Spark. They are actually pretty simple:

Actor - Extends off Entity (basic class in engine, not script). Implements basic animation, animation blending and physics behavior.

Player - Extends Actor. The whole concept of "Players" is in script! This is one of the heavier classes and has code for game movement, gravity, view models, inventory management, view angles, posing, friction, weapon effects, player FOV, handling drawing/holstering weapons and reloading.

Weapon - Extends Actor

Rifle - Extends Weapon

Target - Extends Actor (animated dummy that plays sounds)

Scoreboard.lua - Has hooks that are called by a scoreboard swf (Flash) file

Server - Hooks for when clients connect to the server and which creates Player objects and associates them with clients

PlayerUI - Used by the swf on the rifle to display ammo and clips, as well as some very simple score and game time on the HUD

PlayerSpawn and TargetSpawn - Extends entity and is a spawn point that's placed in the map.

Game - Some utility functions and very simple game rules (spawning new target dummies, tracking score when they are killed)

It's a small example but should give you an idea how powerful our mod infrastructure will be!<!--QuoteEnd--></div><!--QuoteEEnd-->

Comments

  • devicenulldevicenull Join Date: 2003-04-30 Member: 15967Members, NS2 Playtester, Squad Five Blue
    Saw that, it's going to be very interesting when the code is actually released.
  • rsdrsd Join Date: 2003-02-11 Member: 13405Members
    Mmm can't wait. I work as a software developer using C#. Never used LUA, but I've been checking it out in anticipation. Look forward to getting stuck in tomorrow. (10:30pm here in SA, probably going to crash before release).
  • CowThingCowThing Join Date: 2010-03-03 Member: 70818Members
    Just so you know, Lua isn't an acronym, so you only capitalize the first letter.

    On topic, I can't wait to play with it. I love making scripts in Garry's Mod with Lua, and this looks a lot more powerful.
  • FocusedWolfFocusedWolf Join Date: 2005-01-09 Member: 34258Members
    edited April 2010
    <!--quoteo(post=1763971:date=Apr 9 2010, 05:04 PM:name=CowThing)--><div class='quotetop'>QUOTE (CowThing @ Apr 9 2010, 05:04 PM) <a href="index.php?act=findpost&pid=1763971"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Just so you know, Lua isn't an acronym, so you only capitalize the first letter.

    On topic, I can't wait to play with it. I love making scripts in Garry's Mod with Lua, and this looks a lot more powerful.<!--QuoteEnd--></div><!--QuoteEEnd-->

    I think LUA looks better then Lua or lua. Also we're not talking about the moon here. Just a bunch of C files to say the least.

    EDIT: Yes it's a language. But do we not also say "C++" and "c++". How about the language "C++/CLI"... which sometimes people refer to it as "CLI" or "MC++", due to the previous depreciated version. The reasons go on and on... how we call a language is only important to the point that people know what we're talking about. Maybe if your writing a article on the internet you might be more correct, and then you might not care :P
  • CowThingCowThing Join Date: 2010-03-03 Member: 70818Members
    <!--quoteo(post=1764035:date=Apr 9 2010, 04:55 PM:name=FocusedWolf)--><div class='quotetop'>QUOTE (FocusedWolf @ Apr 9 2010, 04:55 PM) <a href="index.php?act=findpost&pid=1764035"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I think LUA looks better then Lua or lua. Also we're not talking about the moon here. Just a bunch of C files to say the least.<!--QuoteEnd--></div><!--QuoteEEnd-->

    We're talking about the scripting language <a href="http://www.lua.org/" target="_blank">Lua</a>.
  • MidoMido Join Date: 2004-04-05 Member: 27742Members
    Weapon:SetFiringRate(99999)
  • Chris0132Chris0132 Join Date: 2009-07-25 Member: 68262Members
    They really weren't kidding when they said the entire game code is in lua.

    Hell if players aren't even hardcoded you could make a completely different game with lua and some art assets.
  • FocusedWolfFocusedWolf Join Date: 2005-01-09 Member: 34258Members
    <!--quoteo(post=1764458:date=Apr 9 2010, 09:26 PM:name=Chris0132)--><div class='quotetop'>QUOTE (Chris0132 @ Apr 9 2010, 09:26 PM) <a href="index.php?act=findpost&pid=1764458"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->They really weren't kidding when they said the entire game code is in lua.

    Hell if players aren't even hardcoded you could make a completely different game with lua and some art assets.<!--QuoteEnd--></div><!--QuoteEEnd-->

    We can also turn the "engine test" into a full functional game with custom maps.
  • SartekSartek Join Date: 2010-01-11 Member: 70081Members
    I can't wait for Natural Selection 2's engine test to come out. Wonder how easy it would be to add player damage :)
  • UncleRayUncleRay Join Date: 2010-03-08 Member: 70881Members
    <!--quoteo(post=1765074:date=Apr 9 2010, 11:44 PM:name=Sartek)--><div class='quotetop'>QUOTE (Sartek @ Apr 9 2010, 11:44 PM) <a href="index.php?act=findpost&pid=1765074"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->I can't wait for Natural Selection 2's engine test to come out. Wonder how easy it would be to add player damage :)<!--QuoteEnd--></div><!--QuoteEEnd-->

    You didn't get the news did you? LOL
  • rsdrsd Join Date: 2003-02-11 Member: 13405Members
    <!--quoteo(post=1763971:date=Apr 9 2010, 11:04 PM:name=CowThing)--><div class='quotetop'>QUOTE (CowThing @ Apr 9 2010, 11:04 PM) <a href="index.php?act=findpost&pid=1763971"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->Just so you know, Lua isn't an acronym, so you only capitalize the first letter<!--QuoteEnd--></div><!--QuoteEEnd-->

    Thanks for the correction. Good to know :)
  • CowThingCowThing Join Date: 2010-03-03 Member: 70818Members
    The Engine test is awesome so far, and I've been playing with the Lua.
Sign In or Register to comment.