what would be a good way to go about sending information to a website during and after a game? things like units used, damage done, and who one to a script to be placed in a database.
would a LUA script work, or is that something that would need to be coded into the engine it's self?
submitting game results to web CGI
Moderator: Moderators
Re: submitting game results to web CGI
There are people who can explain better than me but the short answer is it can be done in Lua.
http://springrts.com/wiki/Lua_Socket
http://springrts.com/wiki/Lua_Socket
- Funkencool
- Posts: 542
- Joined: 02 Dec 2011, 22:31
Re: submitting game results to web CGI
I believe most games already do this to some extant with some help from the lobbies. I don't know much about it but I think lua collects stats and saves them, then the lobby/autohost will send those to the server. Pretty much the same way the replays are handled.
Last edited by Funkencool on 17 Apr 2014, 07:02, edited 1 time in total.
Re: submitting game results to web CGI
What is currently done is to have the data in the replay and have the webpage read it from there.
That is how awards currently work:
http://replays.springrts.com/replay/e42 ... 497174d8b/
(click "Show Winners" to see, at bottom)
is discussed here a bit:
http://springrts.com/phpbb/viewtopic.ph ... 20#p555473
That is how awards currently work:
http://replays.springrts.com/replay/e42 ... 497174d8b/
(click "Show Winners" to see, at bottom)
is discussed here a bit:
http://springrts.com/phpbb/viewtopic.ph ... 20#p555473
Re: submitting game results to web CGI
I know for sure ZK is compatible since it has a persistent game that runs based on the results. it's proprietary and mostly on their own server though.(at least,from what I heard from the chat)Funkencool wrote:I believe most games already do this to some extant with some help from the lobbies. I don't know much about it but I think lua collects stats and saves them, then the lobby/autohost will send those to the server. Pretty much the same way the replays are handled.
I could handle logging and stuff myself, probably with PHP or something but actually getting the data there is a new topic for me
Re: submitting game results to web CGI
That entire stuff is GPL2, feel free to browse here.it's proprietary and mostly on their own server though.(at least,from what I heard from the chat)
Mostly it works via autohost.
Re: submitting game results to web CGI
I mean the game that's based on the results. the engine it's self I could delve in if I had sufficient time to read it.Anarchid wrote:That entire stuff is GPL2, feel free to browse here.it's proprietary and mostly on their own server though.(at least,from what I heard from the chat)
Mostly it works via autohost.
Re: submitting game results to web CGI
Do you mean PlanetWars? No, none of that stuff is proprietary.
Note i'm not talking about engine (spring), but about zk code (planetwars, springie, etc).
The link above doesn't point to a spring github repo, it's a link to zk googlecode repo.
Note i'm not talking about engine (spring), but about zk code (planetwars, springie, etc).
The link above doesn't point to a spring github repo, it's a link to zk googlecode repo.
Re: submitting game results to web CGI
oh! it must have been the way I worded my question then. they probably thought I meant the machine or something. *facepalm*Anarchid wrote:Do you mean PlanetWars? No, none of that stuff is proprietary.
Note i'm not talking about engine (spring), but about zk code (planetwars, springie, etc).
The link above doesn't point to a spring github repo, it's a link to zk googlecode repo.
-
- Moderator
- Posts: 2464
- Joined: 12 Oct 2007, 09:24
Re: submitting game results to web CGI
The ZK system also sends information to the game. Players make commands loadouts on a website and then choose one ingame. It also sends awards gained at the end of the game to be counted on the site.
This is mostly done by the bots which host the battles. They communicate with the website and are able to set modoptions and have data sent to them via chat messages from lua. To use this method you will need a server to run the autohosts.
I don't have experience with Lua Socket but it looks like it should do what you want and with less infrastructure required.
This is mostly done by the bots which host the battles. They communicate with the website and are able to set modoptions and have data sent to them via chat messages from lua. To use this method you will need a server to run the autohosts.
I don't have experience with Lua Socket but it looks like it should do what you want and with less infrastructure required.
Re: submitting game results to web CGI
it would be cool to have a streamlined version of that,with automation. I'd have to be able to get Spring to quickly communicate with the outside world, as no play wants to wait 5 minutes to get a list of persistent buildings, which map should be selected,etc just because a blocking socket is used :)