LUA - the file system and NS2

bhazbhaz Join Date: 2009-11-11 Member: 69353Members
<div class="IPBDescription">Reading / writing to the disk</div>What I'm wondering here, is if the LUA implementation used in NS2 will be powerful enough to read and write, to / from files on the server. If so, this could open up a huge amount of possibilities for both modders and server admins, ideas that were only possible in NS1 through the use of metamod.dll and its never ending confusion, and even then it couldn't interact directly with the game.

Just a short list of possibilities:
<ul><li>Live stats tracking, viewable both in-game and out</li><li>New persistent game-modes, that save even when a player leaves the server</li><li>Integration with external apps, IRC etc.</li><li>Huge use in competitive gaming (game results, ladders, tournaments, administration)</li></ul>

Thoughts? Confirmation? More ideas even?

Comments

  • BiglinesBiglines Join Date: 2003-12-07 Member: 24094Members, Constellation
    I don't see why LUA wouldn't be capable of doing it, as long as it is implemented by UWE. There is of course the question of security, if they allow that sort of thing, it could be that some mods would be able to damage people's machine, or phish info and things like that (that is assuming any server can load any mod and the game downloads the mod).

    but ye, if lua is as powerful as they make it out to be, pretty much any game could be created (ns2 is totally in LUA, only the engine is in c++ as far as I can tell from Max's blog post) depending how much they allow mods to change core game mechanics pretty much the sky is the limit.
  • Draco_2kDraco_2k Evil Genius Join Date: 2009-12-09 Member: 69546Members
    I don't see what any of this has to do with writing server files. I think what you actually want is a sort of mySQL access, a cloud system, which is at the very least possible (GMod does it).
  • PopenatorPopenator Join Date: 2009-08-27 Member: 68617Members
    This is a completely valid question with no discernible answer. Speculations do not help - only a dev could answer this correctly.
  • JirikiJiriki retired ns1 player Join Date: 2003-01-04 Member: 11780Members, NS1 Playtester, Squad Five Silver
    Disk writing is not necessary, but socket connections would be. Disk writing has a lot of race conditional problems unlike a proper database (Like PostgreSQL). There're some security concerns aswell.

    In NS1 our ENSL plugin doesn't need need disk writing at all. We've different people running the plugin on their servers, and for them, and it would be pointless to store anything locally on their servers.
  • TinCanTinCan Join Date: 2006-12-11 Member: 59010Members
    edited February 2010
    I'm sure Lua has read/write functionality or some sort or a binary file format at least to let a program read and write files on a server.
  • Dalin SeivewrightDalin Seivewright 0x0000221E Join Date: 2007-10-20 Member: 62685Members, Constellation
    Most Lua implementations I've seen only have read/write access via certain functions that are controlled by the implementor (i.e. A INI Config writer/reader, but you wouldn't be able to write an exe to the file system, or virus). Lua has read/write access by default as well as access to the Operating System, but all of that functionality is hopefully disabled for the implementation.

    What you would want is a socket to be used for making connections through the network. You wouldn't want Lua to directly access a servers read/write, you'd want Lua to ask the server for a file, or ask the server to write specific data to its disk drives. Whether they have a socket implementation available for mods to use is unknown but it is a good probability that they would, otherwise many popular types of plugins would be impossible to create otherwise as well as their existing Lua code which uses such functionality.
  • bhazbhaz Join Date: 2009-11-11 Member: 69353Members
    edited February 2010
    Just to clarify, I wasn't being specific about the whole writing files thing (files, SQL db's etc.), I hardly know anything about lua or programming in general myself. I was talking more about the possibilities if something like this is / were possible. :)
Sign In or Register to comment.