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

nSidianSidia Join Date: 2012-08-15 Member: 155651Members
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
«1

Comments

  • ZekZek Join Date: 2002-11-10 Member: 7962Members, NS1 Playtester, Constellation, Reinforced - Shadow
    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.
  • ShakerShaker Join Date: 2002-11-21 Member: 9582Members, NS2 Map Tester, Reinforced - Shadow
    Yeah, but what about those triangles in the corners of the maps??
  • turtsmcgurtturtsmcgurt Join Date: 2012-11-01 Member: 165456Members, Reinforced - Supporter
    edited March 2013
    poorly written post, but valid complaint.
  • tarquinbbtarquinbb Join Date: 2012-11-03 Member: 166314Members
    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 Join Date: 2004-09-05 Member: 31404Members
    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 Join Date: 2009-06-04 Member: 67683Members
    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?
  • YMICrazyYMICrazy Join Date: 2012-11-02 Member: 165986Members
    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 Join Date: 2010-01-03 Member: 69869Members
    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) Join Date: 2012-10-31 Member: 165262Members, Reinforced - Shadow
    lwf wrote: »
    A real language like C#? What the actual fuck?

    If he had said Java I would have shat myself laughing.
  • FrothybeverageFrothybeverage Join Date: 2003-02-15 Member: 13593Members
    At least he didn't say Pascal.
  • RautapalliRautapalli Join Date: 2010-07-23 Member: 72710Members, Reinforced - Shadow
    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.
  • RoobubbaRoobubba Who you gonna call? Join Date: 2003-01-06 Member: 11930Members, Reinforced - Shadow, WC 2013 - Shadow
  • buhehebuhehe Join Date: 2012-05-15 Member: 152140Members
    Writing the whole game twice, in 2 different languages?
    You must have never programmed in your life, that's an insane idea IMHO.
  • rmbrown09rmbrown09 Join Date: 2012-10-17 Member: 162592Members
    Write it in Haskell lel
  • Angry ChildAngry Child Join Date: 2012-12-05 Member: 174256Members
    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?
  • BLACKSasquatchBLACKSasquatch Join Date: 2013-03-04 Member: 183675Members
    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 Join Date: 2010-07-26 Member: 73044Members, Super Administrators, Forum Admins, NS2 Developer, NS2 Playtester, Squad Five Blue, Squad Five Silver, Squad Five Gold, Reinforced - Onos, WC 2013 - Gold, Subnautica Playtester
    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.
  • RautapalliRautapalli Join Date: 2010-07-23 Member: 72710Members, Reinforced - Shadow
    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++.
  • weezlweezl Join Date: 2008-07-04 Member: 64557Members, Reinforced - Shadow
    My vote for programming language is FORTRAN!
  • ScardyBobScardyBob ScardyBob Join Date: 2009-11-25 Member: 69528Forum Admins, Forum Moderators, NS2 Playtester, Squad Five Blue, Reinforced - Shadow, WC 2013 - Shadow
    edited March 2013
    weezl wrote: »
    My vote for programming language is FORTRAN!
    Assembly. Its the fastest language available. What could go wrong?
  • SquishpokePOOPFACESquishpokePOOPFACE -21,248 posts (ignore below) Join Date: 2012-10-31 Member: 165262Members, Reinforced - Shadow
    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




  • CrushaKCrushaK Join Date: 2012-11-05 Member: 167195Members, NS2 Playtester
    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. ;)
  • KamamuraKamamura Join Date: 2013-03-06 Member: 183736Members, Reinforced - Gold
    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.
  • tarquinbbtarquinbb Join Date: 2012-11-03 Member: 166314Members
    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 Join Date: 2012-08-29 Member: 156802Members, Reinforced - Gold
    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.
  • Katana-Katana- Join Date: 2008-11-25 Member: 65575Members
    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 Join Date: 2012-11-04 Member: 166951Members
    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.
  • rmbrown09rmbrown09 Join Date: 2012-10-17 Member: 162592Members
    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.
  • draktokdraktok Join Date: 2013-02-18 Member: 183156Members
    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.
This discussion has been closed.