I dont understand why the game logic is only coded in lua... Please tell me why.

nSidianSidia Members Join Date: 2012-08-15 Member: 155651Posts: 208
OK yeah you want people to mod tha game an shi cool cool. But people don't buy games to mod... at least normal people. I don't understand why you cant just have the game coded in a real language like c# along side the lua.
When ever you play in pure stock default ns2 servers your client and the server run on c#. But when u see a neat0o0 modded server and join. Your client starts running off the lua game code. So people can still write there ezpz lemon breezy mods but now.!. If people actually want to play a smooth game. Then they can. Don't tell me its my comp because its not. Im not being rude im just sayin. NS2 could be way better then it is right now. Getting there isn't hard. It just takes some common sense... like not coding the entire game logic in script. I didn't buy this game to play mods. Im tired of taking a huge performance hit just because UWE wants the game to be modder friendly. Im also tired of hearing that its slowly getting better. If you guys would of stuck with the source engine you would of never had this problem to begin with. I have less load on my cpu when im playing arma3 alpha... then with ns2. If its not worth the time then please consider not coding the entire game logic in lua for your next project. Thanks
turtsmcgurtAaronElCurve
«1

Comments

  • ZekZek Members, NS1 Playtester, Constellation, Reinforced - Shadow Join Date: 2002-11-10 Member: 7962Posts: 4,690 Advanced user
    First off, building the entire codebase in both C# and LUA is an insane amount of overhead that would lead to countless bugs and more than double their dev time. It's either/or, they can't have it both ways. The game being coded in LUA makes it easier for them to work with as well, not just modders.
    buhehe_jay
  • ShakerShaker Members, NS2 Map Tester, Reinforced - Shadow Join Date: 2002-11-21 Member: 9582Posts: 405 Fully active user
    Yeah, but what about those triangles in the corners of the maps??
    My Stream! Usually playing NS2 or mapping for NS2. Sometimes other stuff.
    http://www.twitch.tv/shakertime
    aka nau
  • turtsmcgurtturtsmcgurt Members, Reinforced - Supporter Join Date: 2012-11-01 Member: 165456Posts: 581 Advanced user
    edited March 2013
    poorly written post, but valid complaint.
    AaronEl
  • tarquinbbtarquinbb Members Join Date: 2012-11-03 Member: 166314Posts: 1,123
    nSidia wrote: »
    OK yeah you want people to mod tha game an shi cool cool. But people don't buy games to mod... at least normal people. I don't understand why you cant just have the game coded in a real language like c# along side the lua.
    When ever you play in pure stock default ns2 servers your client and the server run on c#. But when u see a neat0o0 modded server and join. Your client starts running off the lua game code. So people can still write there ezpz lemon breezy mods but now.!. If people actually want to play a smooth game. Then they can. Don't tell me its my comp because its not. Im not being rude im just sayin. NS2 could be way better then it is right now. Getting there isn't hard. It just takes some common sense... like not coding the entire game logic in script. I didn't buy this game to play mods. Im tired of taking a huge performance hit just because UWE wants the game to be modder friendly. Im also tired of hearing that its slowly getting better. If you guys would of stuck with the source engine you would of never had this problem to begin with. I have less load on my cpu when im playing arma3 alpha... then with ns2. If its not worth the time then please consider not coding the entire game logic in lua for your next project. Thanks

    i don't know about arma3, but ns2 runs better AND looks better than arma2.

    ns2 looks better than a lot of games. for me the major headache with performance is that maximum settings (minus AA) and minimum settings seem to have a 10-20 average fps differential. there is no easy 'directx 8 mode' or anything.
  • SixtyWattManSixtyWattMan Members Join Date: 2004-09-05 Member: 31404Posts: 708 Fully active user
    nSidia wrote: »
    OK yeah you want people to mod tha game an shi cool cool. But people don't buy games to mod... at least normal people. I don't understand why you cant just have the game coded in a real language like c# along side the lua.
    When ever you play in pure stock default ns2 servers your client and the server run on c#. But when u see a neat0o0 modded server and join. Your client starts running off the lua game code. So people can still write there ezpz lemon breezy mods but now.!. If people actually want to play a smooth game. Then they can. Don't tell me its my comp because its not. Im not being rude im just sayin. NS2 could be way better then it is right now. Getting there isn't hard. It just takes some common sense... like not coding the entire game logic in script. I didn't buy this game to play mods. Im tired of taking a huge performance hit just because UWE wants the game to be modder friendly. Im also tired of hearing that its slowly getting better. If you guys would of stuck with the source engine you would of never had this problem to begin with. I have less load on my cpu when im playing arma3 alpha... then with ns2. If its not worth the time then please consider not coding the entire game logic in lua for your next project. Thanks

    Please consider rewriting the entire game for me.
  • FuleFule Members Join Date: 2009-06-04 Member: 67683Posts: 401
    tarquinbb wrote: »
    nSidia wrote: »
    OK yeah you want people to mod tha game an shi cool cool. But people don't buy games to mod... at least normal people. I don't understand why you cant just have the game coded in a real language like c# along side the lua.
    When ever you play in pure stock default ns2 servers your client and the server run on c#. But when u see a neat0o0 modded server and join. Your client starts running off the lua game code. So people can still write there ezpz lemon breezy mods but now.!. If people actually want to play a smooth game. Then they can. Don't tell me its my comp because its not. Im not being rude im just sayin. NS2 could be way better then it is right now. Getting there isn't hard. It just takes some common sense... like not coding the entire game logic in script. I didn't buy this game to play mods. Im tired of taking a huge performance hit just because UWE wants the game to be modder friendly. Im also tired of hearing that its slowly getting better. If you guys would of stuck with the source engine you would of never had this problem to begin with. I have less load on my cpu when im playing arma3 alpha... then with ns2. If its not worth the time then please consider not coding the entire game logic in lua for your next project. Thanks

    i don't know about arma3, but ns2 runs better AND looks better than arma2.

    ns2 looks better than a lot of games. for me the major headache with performance is that maximum settings (minus AA) and minimum settings seem to have a 10-20 average fps differential. there is no easy 'directx 8 mode' or anything.

    ns2 runs better than... hold on, what about <30 fps in every combat with insane PCs?
    In-game: Fylke
    GamerkatzeMinimum
  • YMICrazyYMICrazy Members Join Date: 2012-11-02 Member: 165986Posts: 688 Fully active user
    The entire game runs off lua. Default and modded server. I think it was time constraints and it being easier to program the game by scripting in lua. Either way we are definitely stuck with lua and the small increments in performance. I hope they do not use lua in future projects as these performance issues will only be repeated again and because performance is a really important factor for most PC gamers especially those at the competitive level. I do like the spark engine though so I'm glad that was made.

    As a whole though I have to agree with your post as another average gamer but it is too late to make changes to what has already been decided.
  • nsguynsguy Members Join Date: 2010-01-03 Member: 69869Posts: 238
    We've had plenty of threads like this, and many of us agree that using LUA was stupid, but it's too late now.
  • SquishpokePOOPFACESquishpokePOOPFACE -21,248 posts (ignore below)Members, Reinforced - Shadow Join Date: 2012-10-31 Member: 165262Posts: 1,669 Advanced user
    lwf wrote: »
    A real language like C#? What the actual fuck?

    If he had said Java I would have shat myself laughing.
    To be fair, you have to have a very high IQ to play Natural Selection 2. The gameplay is extremely subtle, and without a solid grasp of military strategy and advanced mathematics you won't even win a single game. Theres also the game's nihilistic outlook, which is deftly woven into the game. The maps and artwork draw heavily from Riddley Scott's Alien franchise, for instance. The players understand this stuff, they have the intellectual capacity to truly appreciate the depth of the game, to realise that it's not just great, that it also says something about LIFE. As a consequence people who dislike Natural Selection 2 truly ARE idiots. of course they wouldn't appreciate, for instance, the humour in the Marines' existential catchphrase "how do I get to be so good", which itself is a cryptic reference to the high degree of intelligence required to play the game as intended. I'm smirking right now just imagining one of those addlepated simpletons scratching their heads in confusion when spectating a game. What fools... how I pity them. And, yes, by the way, i DO have a Fade tatoo. And no, you cannot see it. it's for the ladies' eyes only, and even then they have to demonstrate that they are within 50 hive skill points of my own (preferable lower) beforehand. Nothin personnel kid.
    _Necro_
  • FrothybeverageFrothybeverage Members Join Date: 2003-02-15 Member: 13593Posts: 848
    At least he didn't say Pascal.
  • RautapalliRautapalli Members, Reinforced - Shadow Join Date: 2010-07-23 Member: 72710Posts: 151 Advanced user
    Squishpoke wrote: »
    lwf wrote: »
    A real language like C#? What the actual fuck?

    If he had said Java I would have shat myself laughing.

    The funny thing is that Java is lightyears ahead of Lua when it comes to speed.
    McGlaspieMinimumAurOn2
  • RoobubbaRoobubba Who you gonna call?Members, Reinforced - Shadow, WC 2013 - Shadow Join Date: 2003-01-06 Member: 11930Posts: 3,191 Fully active user
    Perl FTW.
    For all your gorge busting needs.
    It is very strange how some1 who spend so much time makeing videos to help mans, can fall and take miror image of dark ages bourgeoisie, outdated set of belifs
    How True.
    gioYuuki
  • buhehebuhehe Members Join Date: 2012-05-15 Member: 152140Posts: 131
    Writing the whole game twice, in 2 different languages?
    You must have never programmed in your life, that's an insane idea IMHO.
    SquishpokePOOPFACEMcGlaspie
  • rmbrown09rmbrown09 Members Join Date: 2012-10-17 Member: 162592Posts: 169
    Write it in Haskell lel
    Specs --
    i7 4770k CPU
    H100 Liquid Cooling
    GTX 690 Overclocked
    16GB DDR3 2400MHz Ram
    256GB SSD Crucial M4
    27" 2560x1440 Catleap
    Razer BlackWidow Keyboard
    Logitech G9X Mouse
    900D Super Tower
  • Angry ChildAngry Child Members Join Date: 2012-12-05 Member: 174256Posts: 129
    If it's "just that easy" lets have you step up to the plate for them and program their entire game for them in a new language,



    so well have that by wednesday, yeh?
    SquishpokePOOPFACE
  • BLACKSasquatchBLACKSasquatch Members Join Date: 2013-03-04 Member: 183675Posts: 15
    Rautapalli wrote: »
    The funny thing is that Java is lightyears ahead of Lua when it comes to speed.

    I got better FPS on NS2 then minecraft ironically enough
  • McGlaspieMcGlaspie www.team156.com Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, Reinforced - Onos, WC 2013 - Gold, Subnautica Playtester Join Date: 2010-07-26 Member: 73044Posts: 966 admin
    Rautapalli wrote: »
    Squishpoke wrote: »
    lwf wrote: »
    A real language like C#? What the actual fuck?

    If he had said Java I would have shat myself laughing.

    The funny thing is that Java is lightyears ahead of Lua when it comes to speed.
    While this is true, you lose a lot of speed (in this context) when wiring up a JNI bridge to communicate with OpenGL/DirectX. Java for games is feasible though, take a look at http://jmonkeyengine.com/. Now, if there was a version of the JVM with native hooks into OpenGL/DirectX...that would be a whole other story. No thanks to Oracle though, because they're slowly destroying Java and any interesting future possibilities like this.

    While in some regards the gist of OP's post has some merit, it's not the massive problem most people make it out to be. In fact, there are still quite a few things UWE can do to provide some fairly significant (realistically speaking) performance gains. Imo, they made a highly risky, but ultimately good choice. NS2/Spark is so modifiable it kind of bakes my brain. History has shown the games that make modding easy have a much longer life-span. Half-Life being an obvious example.
    MikiesoxIronHorse
  • RautapalliRautapalli Members, Reinforced - Shadow Join Date: 2010-07-23 Member: 72710Posts: 151 Advanced user
    edited March 2013
    Rautapalli wrote: »
    The funny thing is that Java is lightyears ahead of Lua when it comes to speed.

    I got better FPS on NS2 then minecraft ironically enough

    I don't see the irony here considering that Spark is written in C++.
    AurOn2
  • weezlweezl Members, Reinforced - Shadow Join Date: 2008-07-04 Member: 64557Posts: 518 Fully active user
    My vote for programming language is FORTRAN!
  • ScardyBobScardyBob ScardyBob Forum Admins, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow Join Date: 2009-11-25 Member: 69528Posts: 4,983 mod
    edited March 2013
    weezl wrote: »
    My vote for programming language is FORTRAN!
    Assembly. Its the fastest language available. What could go wrong?
    Post edited by ScardyBob on
    buhehe
  • SquishpokePOOPFACESquishpokePOOPFACE -21,248 posts (ignore below)Members, Reinforced - Shadow Join Date: 2012-10-31 Member: 165262Posts: 1,669 Advanced user
    edited March 2013
    ScardyBob wrote: »
    weezl wrote: »
    My vote for programming language is FORTRAN!
    Assembly. Its the fastest language available. What could go wrong?

    That question can be answered in one word:

    jmp




    Post edited by SquishpokePOOPFACE on
    To be fair, you have to have a very high IQ to play Natural Selection 2. The gameplay is extremely subtle, and without a solid grasp of military strategy and advanced mathematics you won't even win a single game. Theres also the game's nihilistic outlook, which is deftly woven into the game. The maps and artwork draw heavily from Riddley Scott's Alien franchise, for instance. The players understand this stuff, they have the intellectual capacity to truly appreciate the depth of the game, to realise that it's not just great, that it also says something about LIFE. As a consequence people who dislike Natural Selection 2 truly ARE idiots. of course they wouldn't appreciate, for instance, the humour in the Marines' existential catchphrase "how do I get to be so good", which itself is a cryptic reference to the high degree of intelligence required to play the game as intended. I'm smirking right now just imagining one of those addlepated simpletons scratching their heads in confusion when spectating a game. What fools... how I pity them. And, yes, by the way, i DO have a Fade tatoo. And no, you cannot see it. it's for the ladies' eyes only, and even then they have to demonstrate that they are within 50 hive skill points of my own (preferable lower) beforehand. Nothin personnel kid.
    buhehe
  • CrushaKCrushaK Members, NS2 Playtester Join Date: 2012-11-05 Member: 167195Posts: 1,182 Advanced user
    Should have gone Unreal Engine all the way. Then they would only have needed 1-2 years to develop the game and still had it moddable with a scripting language. ;)
    Suggestions:
    Tech Path of Hive actually upgrades the Hive itself
    Give Gorges telepathic control over their Bait Ball for Overlord-style commanding of Babblers

    And please allow to turn rooms into emergency-lit or dark versions if infestations grows over an unbuilt or damaged power node socket.
  • KamamuraKamamura Members, Reinforced - Gold Join Date: 2013-03-06 Member: 183736Posts: 669 Advanced user
    tarquinbb wrote: »
    nSidia wrote: »
    i don't know about arma3, but ns2 runs better AND looks better than arma2.

    You can't be serious. Arma 2 is a battlefield simulator, it simulates a huge, miles wide open landscape with dozens of units controlled by independent, non-scripted AI driven agents, that communicate in squads, are capable of using vehicles etc., while ns2 simulates max 20 or so player controlled agents running around in claustrophobic tunnels on a relatively small map.

    Arma 2 and NS2 scale simply cannot be compared, it's like comparing a banking network database backend with your grocery list in an Excel spreadsheet.

    NS2 looks and plays beautiful, but please compare it to games of a similar scale, like Counter Strike, Team Fortress, or AvP, maybe.
    Each day, hundreds of enthusiastic new players rush to join the ranks of the TSF to protect the universe, our beloved and the values of our society from the alien menace.

    Glory to the TSF! Glory to Arstotzka ! Glory to the mods!
  • tarquinbbtarquinbb Members Join Date: 2012-11-03 Member: 166314Posts: 1,123
    edited March 2013
    Kamamura wrote: »
    tarquinbb wrote: »
    i don't know about arma3, but ns2 runs better AND looks better than arma2.

    You can't be serious. Arma 2 is a battlefield simulator, it simulates a huge, miles wide open landscape with dozens of units controlled by independent, non-scripted AI driven agents, that communicate in squads, are capable of using vehicles etc., while ns2 simulates max 20 or so player controlled agents running around in claustrophobic tunnels on a relatively small map.

    Arma 2 and NS2 scale simply cannot be compared, it's like comparing a banking network database backend with your grocery list in an Excel spreadsheet.

    NS2 looks and plays beautiful, but please compare it to games of a similar scale, like Counter Strike, Team Fortress, or AvP, maybe.

    being able to mount the hubble space telescope to your face so you can see an enemy in a far away galaxy doesn't make the game look better.

    neither game made shortcuts to prioritize performance. ns2 went for atmosphere with outstanding visuals and arma2 went for geeky simulator stuff.

    besides, i only mentioned arma2 because the OP mentioned arma3 and arma3 is just an 'updated' arma2.
  • gnoarchgnoarch Members, Reinforced - Gold Join Date: 2012-08-29 Member: 156802Posts: 259 Advanced user
    edited March 2013
    I think OP has a valid point about lua being a pile of shit when it comes to performance. I think they should at least consider porting the game logic to c#, at least someone should take a week or so and validate how much work it would be to do so. After all UWE needs to do shitloads of optimization, especially if they really want NS2 to become a eSports thing you need at least STABLE 60 FPS on a "normal high end" machine from which NS2 is quite far away.
    Also this performance thing wont solve itself with newer CPUs and stuff because future hardware will more and more use parallelization which is exactly where NS2 sucks at.

    So what I'm saying is that if 2 guys at UWE can port the whole logic to c# within say half a year, this could be both the most effective and cheapest way to get rid of this whole performance thing.

    Also, I dont think to compare it with arma is any good because arma is magnitudes more complex than NS2. Also, Arma 2 runs quite smoothly on my computer while NS2 lategame fails to do so. You can compare NS2 with games like BF3 and you'll have to agree that BF3 runs considerably faster with consioderably more players.
    Also it is completely irrelevant how good NS2 looks, because graphics is NOT the bottleneck.
    AaronElFunkyMike
  • Katana-Katana- Members Join Date: 2008-11-25 Member: 65575Posts: 351
    I don't know where people are getting the impression that c# is significantly faster than Lua.

    Also you can't port from Lua to C#, or C++ for that matter. The languages are fundamentally different. It would be complete rewrite. It would introduce new and wonderful bugs. I can't imagine it would take less than 6 months to rewrite the game logic, and then you don't really have any guarantee that it would be faster.
  • _jay_jay Members Join Date: 2012-11-04 Member: 166951Posts: 17
    Work smarter not harder.

    If they had done the whole thing in another language, there's a good chance we'd still be waiting for the game to be released in another couple years time and when it did come out we'd be saying "Aliens Colonial Marines and The War Z were far superior games to NS2!"

    Just because it could be written in a more 'efficient' language, it doesn't mean the game would run better. Lower level languages like C/C++ mean increased code complexity, this increases the time to develop (more LOC per function), increases bug-rates, increases testing required, readability (assume bob writes his code and then jim takes over, jim looks at bob's and goes 'holy wtf' and then takes another 5 hours to figure out what b_tt_fun_onos_ride() does), etc.

    Just to throw some arbitrarily random numbers out there, there'd easily be 5 hours of work involved compared to every 1 lua hour of work. Over time this means less free content, slower patch releases, and longer to break even on development costs.

    For a small team like UWE, using LUA like they did was probably a smart thing to do. All the serious stuff is done in serious language anyway. Anyway, C# is pretty damn high.
    kais_4AurOn2SquishpokePOOPFACE
  • rmbrown09rmbrown09 Members Join Date: 2012-10-17 Member: 162592Posts: 169
    edited March 2013
    CrushaK wrote: »
    Should have gone Unreal Engine all the way. Then they would only have needed 1-2 years to develop the game and still had it modable with a scripting language. ;)

    Should have gone with Source engine. Still modable and easy to run as Mario64. Would have made for a far larger player base because far more people could actually enjoy playing the game on normal computers. Installed TF2 again last night for fun. While I understand that game isn't quite as graphically demanding and doesn't have quite the GPU pull, I still never dropped below 250FPS with 16x AF and 16x AAQF whatever. On high settings -ambient and AA, I can pull almost 60's late game around a hive if I am lucky.
    Specs --
    i7 4770k CPU
    H100 Liquid Cooling
    GTX 690 Overclocked
    16GB DDR3 2400MHz Ram
    256GB SSD Crucial M4
    27" 2560x1440 Catleap
    Razer BlackWidow Keyboard
    Logitech G9X Mouse
    900D Super Tower
  • draktokdraktok Members Join Date: 2013-02-18 Member: 183156Posts: 253 Fully active user
    edited March 2013
    I personally despise the source engine. Hammer is the worst editor ever, source hates alt tabbing and although we have the same mic issue - mic issues suck when all i can hear is heavy screaming


    (By mic issue i mean not being able to turn up voices in game over gameplay sounds) You can kinda do that here, but it's not perfect.
    Also more recently known as Water Horse
This discussion has been closed.