Who can write a Spark TV proxy server?
<div class="IPBDescription">like hltv / uttv</div>The idea behind this is programming a Proxy
which connects to a SparkEngine-gameserver
and streaming it to other clients - like hltv was.
Also a Client would be useful, where Spectators
could look to more than one player at once.
I think EnemyTerritory had this.
Could this be done serverside?
<!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo-->Featurelist:<!--sizec--></span><!--/sizec-->
<ul><li>delay, password, maxusers, port, ip,
rate, updaterate, kick, ban</li><li>dispatch users</li><li>proxies should could connect to each other:
gameserver->masterproxy->proxieservers->clients</li><li>own voice and chatsystem, so spectators
could chat with each others and commentatorscan
commentate the game like at TV.
(commentators can use voicecom specs can't?)</li><li>it should be possible to place text messages,
images and videos (flash support is already in!?)
on the screen. Important feature foradvertisement.</li><li>Graphical Admin Interface (gai)</li><li>storage of settings in files hot loading of themtrough the gai</li><li>server should be able torecord and replay demos</li></ul>
which connects to a SparkEngine-gameserver
and streaming it to other clients - like hltv was.
Also a Client would be useful, where Spectators
could look to more than one player at once.
I think EnemyTerritory had this.
Could this be done serverside?
<!--sizeo:3--><span style="font-size:12pt;line-height:100%"><!--/sizeo-->Featurelist:<!--sizec--></span><!--/sizec-->
<ul><li>delay, password, maxusers, port, ip,
rate, updaterate, kick, ban</li><li>dispatch users</li><li>proxies should could connect to each other:
gameserver->masterproxy->proxieservers->clients</li><li>own voice and chatsystem, so spectators
could chat with each others and commentatorscan
commentate the game like at TV.
(commentators can use voicecom specs can't?)</li><li>it should be possible to place text messages,
images and videos (flash support is already in!?)
on the screen. Important feature foradvertisement.</li><li>Graphical Admin Interface (gai)</li><li>storage of settings in files hot loading of themtrough the gai</li><li>server should be able torecord and replay demos</li></ul>
Comments
Atm most streams i look are via own3d.com and xsplit.
(last big event was Assembly Winter 2011)
or a webapplet for watching in a browser?
i do not think this can be done without uwe.
u know that owne3d.tv is from austria too ;)?
I know own3d is from austria - atm the best streaming service if you ask me... Their programm (xsplit) has lots of cool features, only a little thing still needs some work => you cant record fullscreenmodes of applications, means that you need to use window mode in your monitor resolution and fake maximize it via programms like Shiftwindow...
buffering
annoying commentators
videofragmets
###### resolution
unwanted overlays
have to pay for viewing
..
.
but it would be so cool to have both combined!
I think most of it is. What this sounds like really is a mod where an ns2tv client can connect to a server and do little but receive data and ping to prove connectivity. This is where things start to get tricky however. The ns2tv client needs to also act like its own relay server allowing people to connect and do nothing but spectate and watch all the live data being sent through it. If this can be done purely with LUA I'm unsure. I'm sure its possible to build pure spectator clients to receive the gameplay data and connect them directly to the game server, but this would take up lots of slots and also slow down the game because of all the connected clients; making the separate relay server a requirement.
The networking is all in C. It would be utterly insane to do all the low level networking in Lua, you would get awful performance.
I've modded NS LUA somewhat and I'll say its doable in theory but I wouldn't get hopes up on performance. Too much overhead to relay data.
But exposing Socket API methods to Lua would be nice, or even some basic raw data fetch or stream APIs. Then custom DLLs can be disabled, and all will be right with the land.
Probably won't work like that, though.
Another idea is to wait for demo recordings to be supported, then try steaming demo recordings from one player to the web (and let spark playback demo recordings downloaded from the web in real time) as a way to do it as well.
What you hypothetically would need is to start a local server and client, just like if you are starting a local game. Only difference is, that the client does <i>not</i> connect to the local server, but a remote server. Then you would need some possibility to transfer data from the client VM to the server VM.
Determining <i>what</i> data should be transferred is actually an easy task and doesn't even need to be rewritten with every built. Just override the function Shared.LinkClassToMap to store all the classes/ents/networkvars in a table before calling the original Shared.LinkClassToMap. That way you would have the table of vars rebuilt everytime you start your proxy and if the devs change any of them, you would have the current vars automatically. (Actually that's the same thing I'm doing for my record plug-in). Additionally you would need the angles and origin Vector of every entity as these are not explicitly stated as networkvars.
The difficult thing would be doing the actual transfer. (Even if server and client run on the same physical machine, they are separate virtual machines). As a workaround the data could be dumped in temporary file(s). A smart possibility would be writing a C/C++ library that allows to temporary store in and read data from the RAM but that would depend on how DLLs are handled by the engine. If the server and the client would have running their own instance of the DLL, data transfer on that way wouldn't be possible. If the engine however would create only one instance of every DLL then both server and client could access the same part of the RAM.
Then the server needs to create every entity that started its existence in the client and destroy every entity that is not longer there on the client, the others need their vars updated. And of course the server needs to allow spectator clients only.
Last but not least the server running the actual game server needs a modification, too. As I already pointed out in another thread, clients only receive updates about entities that can be seen or heard from the current position. There is a Lua function called GetIsEntityRelevantForPlayer or similar (can't currently check cause I'm writing this on a computer that doesn't have NS2 installed). It would need to be overridden to always return true if the client is a Spark TV proxy.
You see: networking between game server-->Spark TV proxy and between Spark TV proxy-->Spectator would entirely been done by the game's own network code and you don't need to know anything about it.
buffering
annoying commentators
videofragmets
###### resolution
unwanted overlays
have to pay for viewing
..
.
but it would be so cool to have both combined!<!--QuoteEnd--></div><!--QuoteEEnd-->
Demosmoother? Oh yes please!
or tell me which features have you planed so far?
tell us more technical details pls!!!!
So what you have now is something like a HLTV that can record games? I would love that mod :P
Release? :P
great job man, keep it up. just wondering what is the file size like?
Alright, keep it up. We will still be here :P
Hot ###### man, looking forward to seeing this. Out of curiousity, how many cpu resources does this currently consume and approximately how many kbs/mbs of hdd space are used for the demo file for each second recorded?
yeah sounds cool, keep us updated!
if you need help msg me, maybe i can help!!!
btw hltv server could RECORD and PLAY demos!
so you uploaded the demo to the hltv server and played it.
all the viewers who connected to the hltv server where watching
the same demo live :)
Very close, I'm using bzip2 to compress\decompress the demos on-the-fly, so it's already built into the file-format
i think i know why, but before i write crap and expose my ignorance, i better just ask you why you made this choice :P