Lua and external connectivity.
KillerBroetchen
Join Date: 2004-08-10 Member: 30508Members
<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 :)
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
The CLIENT side LUA scripts that are uploaded at runtime must be extremely restrictive.
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.
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.
Or say, I want to track certain statistics, for my own performance/skill testing.