submitting game results to web CGI

submitting game results to web CGI

Discuss game development here, from a distinct game project to an accessible third-party mutator, down to the interaction and design of individual units if you like.

Moderator: Moderators

Post Reply
zgames
Posts: 17
Joined: 04 Jul 2011, 07:32

submitting game results to web CGI

Post by zgames »

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?
User avatar
SinbadEV
Posts: 6475
Joined: 02 May 2005, 03:56

Re: submitting game results to web CGI

Post by SinbadEV »

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
User avatar
Funkencool
Posts: 542
Joined: 02 Dec 2011, 22:31

Re: submitting game results to web CGI

Post by Funkencool »

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.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: submitting game results to web CGI

Post by knorke »

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
zgames
Posts: 17
Joined: 04 Jul 2011, 07:32

Re: submitting game results to web CGI

Post by zgames »

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 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)

I could handle logging and stuff myself, probably with PHP or something but actually getting the data there is a new topic for me
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: submitting game results to web CGI

Post by Anarchid »

it's proprietary and mostly on their own server though.(at least,from what I heard from the chat)
That entire stuff is GPL2, feel free to browse here.

Mostly it works via autohost.
zgames
Posts: 17
Joined: 04 Jul 2011, 07:32

Re: submitting game results to web CGI

Post by zgames »

Anarchid wrote:
it's proprietary and mostly on their own server though.(at least,from what I heard from the chat)
That entire stuff is GPL2, feel free to browse here.

Mostly it works via autohost.
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.
User avatar
Anarchid
Posts: 1384
Joined: 30 Nov 2008, 04:31

Re: submitting game results to web CGI

Post by Anarchid »

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.
zgames
Posts: 17
Joined: 04 Jul 2011, 07:32

Re: submitting game results to web CGI

Post by zgames »

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.
oh! it must have been the way I worded my question then. they probably thought I meant the machine or something. *facepalm*
Google_Frog
Moderator
Posts: 2464
Joined: 12 Oct 2007, 09:24

Re: submitting game results to web CGI

Post by Google_Frog »

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.
zgames
Posts: 17
Joined: 04 Jul 2011, 07:32

Re: submitting game results to web CGI

Post by zgames »

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 :)
Post Reply

Return to “Game Development”