Lua and external connectivity.

KillerBroetchenKillerBroetchen Join Date: 2004-08-10 Member: 30508Members
edited October 2009 in Ideas and Suggestions
<div class="IPBDescription">Please make external communication possible.</div>I have a small whish regarding to the Lua functionality. I would like to be able to open one or two sockets within scripts to be able to communicate to an external service. For example I would like to be able to expose game events to an external script, which parses them and creates web statistic about players and a few more things i don't want to tell now :)

I'm aware that the gamecode will/should run in it's own sandbox to prevent exploiting trough evil scripts, so it would be probably sufficient to limit this socket functionality that it should only connect to the local machine. And again, I would like to be able to expose _and_ to recieve data. So that I can outsource further processing to something else, in a programming language of my choice :) A socket would be fine because it would probably allow efficient data transmission. If a raw socket should be too problematic, than please implement at least some other kind of layer which makes communication possible, maybe an message based API to send and recieve data, for example in the JSON format. (no bloated xml please :-/)

That's all so far :)

Comments

  • homicidehomicide Join Date: 2003-11-10 Member: 22451Members
    More generally, the SERVER needs to be able to interface with 3rd party LUA libraries.

    The CLIENT side LUA scripts that are uploaded at runtime must be extremely restrictive.
  • JirikiJiriki retired ns1 player Join Date: 2003-01-04 Member: 11780Members, NS1 Playtester, Squad Five Silver
    I agree on this, we would need this functionality too.
  • locallyunscenelocallyunscene Feeder of Trolls Join Date: 2002-12-25 Member: 11528Members, Constellation
    It's an interesting idea.

    In general I would be careful with relying on communication with an outside server. I think TF2 servers are annoying when I have to wait for their over-elaborate community webpage to load(or figure out that the webpage is down) when I just want to join the game.

    While this particular example is easy to avoid, I think that this is an easy trap to fall into in general.
  • spellman23spellman23 NS1 Theorycraft Expert Join Date: 2007-05-17 Member: 60920Members
    <!--quoteo(post=1731556:date=Oct 9 2009, 11:46 AM:name=locallyunscene)--><div class='quotetop'>QUOTE (locallyunscene @ Oct 9 2009, 11:46 AM) <a href="index.php?act=findpost&pid=1731556"><{POST_SNAPBACK}></a></div><div class='quotemain'><!--quotec-->It's an interesting idea.

    In general I would be careful with relying on communication with an outside server. I think TF2 servers are annoying when I have to wait for their over-elaborate community webpage to load(or figure out that the webpage is down) when I just want to join the game.

    While this particular example is easy to avoid, I think that this is an easy trap to fall into in general.<!--QuoteEnd--></div><!--QuoteEEnd-->

    But if we get to do zomg stat tracking, I'm totally in. Just less stupid welcome screens.
  • kcbnackcbnac Join Date: 2004-01-19 Member: 25484Members, Constellation
    Yes, I love the idea. That way say, my Logitech G15 Gaming Keyboard can easily get all sorts of data - say, I have a little tool running that I get to customize on-the-fly what gets displayed.

    Or say, I want to track certain statistics, for my own performance/skill testing.
  • KillerBroetchenKillerBroetchen Join Date: 2004-08-10 Member: 30508Members
    Mainly I aimed at the server, not the client, for security reasons.
  • EmooEmoo Ibasa Join Date: 2002-12-20 Member: 11198Members
    Could be on the server and client, as long is it was just a restricted local socket communication. You would still need a 3rd party application to do anything with the data, so client's aren't likly to be compromised because of a dodgy lua script as it would require them to install the dodgy lua application as well, which won't be downloaded from a server. But stuff like logitech keyboard info could still be done.
Sign In or Register to comment.