spring replay site - Page 7

spring replay site

For the discussion of infrastructure improvements and changes.

Moderator: Moderators

Post Reply
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: spring replay site

Post by Jools »

Along what knorke says and what's done in ba, how would I/we/someone easiest make a similar thing for xta?

What I think of is this: XTA has some awards that get awarded when a player with one unit kills over 25 units, kind of old WW1-type kill list awards. One award is for units that survive battle and the other for units that killed heroically but died. But they consist of:
-- UnitDefID
-- TeamID
-- Number of kills (optionally also birth- and deathtime in minutes, but not essential)

So my idea would be to send those as LuaMsg after game ends. Could they then be compiled in some user page, for example on

http://replays.springrts.com/player/84842/

maybe under an "Awards" section? Would that be hard to implement? And if "someone" is willing to do this, would there be some kind of proposed standard to use for the LuaMSg fields?
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Re: spring replay site

Post by dansan »

I'm planning on rewriting the parsing code in a way, that it'd be easy for everyone to extend it for their mod. But currently I'm changing the entire design and thus every single template, so it'll have to wait. I'm almost ready to release the new site.

Until then... there is no standard... I propose that you use some marker for XTA-awards "\199" or so and then append the required info like:

Code: Select all

\199..<award-type>..'_'..<TeamID>..'_'..<UnitDefID>..'_'..<numKills>..'_'..<birthTime>..'_'..<deathTime>
Would that line cover every award you can think of?
If you cannot fill in a value for a field, then you can just use a nonsensical value (a negative one for example).
Is UnitDefID stable throughout mod versions? In BA I think it's not - don't know about XTA. Maybe use unit names (CORCOM) instead?

If you supply me with a replay that contains the message, I can write the parsing code. Adding a section to the players page is no problem. Statistics can also be added to the hall of fame if you like.
User avatar
KingRaptor
Zero-K Developer
Posts: 838
Joined: 14 Mar 2007, 03:44

Re: spring replay site

Post by KingRaptor »

Is the search function broken for anyone else?
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: spring replay site

Post by Jools »

dansan wrote: Is UnitDefID stable throughout mod versions? In BA I think it's not - don't know about XTA. Maybe use unit names (CORCOM) instead?
I'm not 100% sure actually, I would think unifDefID is more stable than name. For example core mobile artillery was recently renamed "pillager", I'm not sure how the unitIDefID number is produced.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: spring replay site

Post by knorke »

unifDefID vs unitName:
unifDefID is the order in which units were read by engine.
So for practical purpose it is basically random and can change anytime:
Whenever mod adds a new unit or removes a unit (even unused test units)
Some maps include units, that changes ids too.

unitNames get changed too, but only by modders who knows why and how.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: spring replay site

Post by Jools »

Oh, I thought unitDefID was somehow tied to this tag in unitdef:
unitname=arm_beaver;
unitnumber=25;
objectname=arm_beaver.3do;
User avatar
FLOZi
MC: Legacy & Spring 1944 Developer
Posts: 6240
Joined: 29 Apr 2005, 01:14

Re: spring replay site

Post by FLOZi »

Not in the slightest.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: spring replay site

Post by Jools »

Ok, then unit name is maybe better. But is the replay site case sensitive? And why does linux always have so much problem with the case? The last question is rhetoric?
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Re: spring replay site

Post by dansan »

KingRaptor wrote:Is the search function broken for anyone else?
Sorry - it is. I upgraded the framework and it silently broke the text completion widget. I'm almost finished with my secret complete site rewrite, so I'm not fixing it.
knorke wrote:unifDefID vs unitName:
unifDefID is the order in which units were read by engine.
So for practical purpose it is basically random and can change anytime:
Whenever mod adds a new unit or removes a unit (even unused test units)
Some maps include units, that changes ids too.

unitNames get changed too, but only by modders who knows why and how.
I noticed this, when I wanted to show the correct faction used ingame (vs the one chosen in lobby). Faction change (by widget) detection works for BA & TA, but interpretation is difficult. For BA it can be guessed because there are just 2 factions, and the initial one is known from start-sctipt, but for TA with 3 factions it's not that simple. I began collecting the IDs for every release, but gave up...
Jools wrote:Ok, then unit name is maybe better. But is the replay site case sensitive? And why does linux always have so much problem with the case? The last question is rhetoric?
Windows is case sensitive too (being written in c++), but tries hard to hide it, using string.upper() on all strings it encounters ^^ The replay site does that too where it makes sense - for example in the broken search. unitNames could be treated case insensitiv as well :)
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: spring replay site

Post by Jools »

Okay, I've made a proposal to the award message sent from XTA, it would look like this:

Code: Select all

local awardsMsg = table.concat({XTA_AWARDMARKER,":",isAlive,":",team,":",name,":",kills,":",age})
Which outputs a message like this for each award unit:
Ç:1:0:Maverick:27:4
It seems the "\199" string gets converted to Ç here, but can the replay site still read it?

The fields for heroes award would be:
1: string '\199', identify XTA unit award
2: isAlive: 1
3: teamID, owner of the corresponding unit. Should this be better to have as player name, or is this accessible from replay file anyway? (0/Jools)
4: name of unit to get award (Maverick)
5: number of kills (27)
6: age of unit when game ends (4)

This is how the corresponding window looks in XTA:
Image

Then there would be almost a similar message for the other award, the lost in service award with these fields.
1: string '\199', identify XTA unit award
2: isAlive: 0
3: teamID, owner of the corresponding unit. Should this be better to have as player name, or is this accessible from replay file anyway? (0/Jools)
4: name of unit to get award (Commander)
5: number of kills (43)
6: age of unit when game ends (1)

This is how it looks in XTA, it's the same as the former except instead of age there is birth and death separately, but I thought it's better to merge them to get the same format in both messages:
Image

Does this sound as plausible way to do it? Does anything else need to be sent to the replay site?

Edit: who put cats in that image?
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Re: spring replay site

Post by dansan »

Jools wrote:

Code: Select all

{XTA_AWARDMARKER,":",isAlive,":",team,":",name,":",kills,":",age}
Sounds good, but there is no way to distinguish the two awards. I propose to add a number to indicate the type of award after the \199: 0: hero, 1: lost, etc.

Code: Select all

XTA_AWARDMARKER,":",awardType,":",isAlive,":",team...
If possible, please use only positive numbers, as that will make parsing simpler.
Jools wrote:3: teamID, owner of the corresponding unit. Should this be better to have as player name, or is this accessible from replay file anyway? (0/Jools)
teamID is better than name. I'd need it anyway and there is already a mapping teamID->name.
Jools wrote:Does this sound as plausible way to do it? Does anything else need to be sent to the replay site?
I think we'll be fine with this. Can you create a test replay with some award messages? Beware: the message may only be in the replay created by an autohost.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: spring replay site

Post by Jools »

dansan wrote:
Jools wrote:

Code: Select all

{XTA_AWARDMARKER,":",isAlive,":",team,":",name,":",kills,":",age}
Sounds good, but there is no way to distinguish the two awards. I propose to add a number to indicate the type of award after the \199: 0: hero, 1: lost, etc.
That's the "isAlive" field. I can rename it to something like "isHeroAward", but I think it's only the values that matter anyway.
dansan wrote:

Code: Select all

XTA_AWARDMARKER,":",awardType,":",isAlive,":",team...
If possible, please use only positive numbers, as that will make parsing simpler.
Sure, I also added a ":" between each field, is it easier to just send a sequence of fields?
dansan wrote: Can you create a test replay with some award messages? Beware: the message may only be in the replay created by an autohost.
Yes, but it must first be implemented in XTA. If a test version gets in contact with rapid, it's like the shit hits the fan. Version conflicts etc. But maybe I can test it on a local autohost.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: spring replay site

Post by Jools »

And I'm really curious with regard to the cats. Maybe it was imgurs april fools joke or something? Here's how the image looks from my computer:

Image
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Re: spring replay site

Post by dansan »

Jools wrote:That's the "isAlive" field. I can rename it to something like "isHeroAward", but I think it's only the values that matter anyway.
I'd like to think of it as an enumeration, rather that a boolean, in case you decide to have more than two award types.
Jools wrote:Sure, I also added a ":" between each field, is it easier to just send a sequence of fields?
That's fine.
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: spring replay site

Post by Jools »

Now someone put ducks in that image |:
User avatar
Jools
XTA Developer
Posts: 2816
Joined: 23 Feb 2009, 16:29

Re: spring replay site

Post by Jools »

Now there's a real replay which should have an award:
http://replays.springrts.com/replay/9b4 ... 51cdf4421/

The award should be for MotionLines Sentinel that killed 28 units. Well done!
dansan
Server Owner & Developer
Posts: 1203
Joined: 29 May 2010, 23:40

Re: spring replay site

Post by dansan »

Yeah! I finished the complete rewrite of the view-part of the replay site.

I learned a lot of JS on the way... "learning by doing" :)
I'm particularly proud of the "browse archive" page. It was really tricky to code and to make it usable from the UI as well as by GET-URL-args (to replace all the list-pages). --> In the landing page or a replay page, you can click for ex. on the game[version]/map/match date/uploader, and it will be used as a filter on the browse page. On the browse page adding filters will filter the results without a page reload. All filters can be combined.

The hall of fame shows the BA Awards now.

Missing is to show the BAwards on the players page, and to make the theme changeable... I have a feeling the player filter on the browse page is buggy... add XTA awards support etc... 20 open issues ;)

I want to make game specific landing pages. I have asked Tim to add subdomains for each game (or a catchall DNS entry), but he hasn't responded yet... anyone can contact him more directly than forum PM?

Did I mention it's responsive design? Not that anyone would actually look at the site when not playing, so on a big screen, but it has support for tables and phones now too :)
User avatar
Jazcash
Posts: 5309
Joined: 08 Dec 2007, 17:39

Re: spring replay site

Post by Jazcash »

Love the redesign, really great work Dansan!

An API would be awesome.
User avatar
bibim
Lobby Developer
Posts: 952
Joined: 06 Dec 2007, 11:12

Re: spring replay site

Post by bibim »

Very nice work Dansan, it looks much better!
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: spring replay site

Post by knorke »

Hooray for awards. Think this game-stats-to-webpage is really something that can be expanded on.
(Reminds me I also wanted to do something for my game.)

Personally I was okay with the simple old layout, but of course if players are to use it a bit more fancy design like the new one is better :)

But it seems to break in Firefox: (looks normal in Internet Explorer)
Image
Text really tiny in default zoom:
http://abload.de/img/blav1s93.png

fakeedit: above two things just magically fixed themself? site update or cache maybe? Other things still there.

Long map names overlap:
Image

Are the page numbers supposed to be like vertical like
1
2
3
4
5
?
Looks bit strange, usually it is 1 2 3 4 5 because it saves vertical space.

Old layout required fewer clicks, at least how I used it:
I liked how to see latest replays of one mod, it was only one click on the modname on frontpage.
Now it is three clicks: 1) Browse Archive 2) Game-button 3) select game

At the moment recently played matches take up most space on frontpage, but think for most players those are not so interessting and pretty random.
Maybe have only one row of "recently played games", another row of "currently popular" (based on downloads, comments) and then there is still some space to have the game-selector on frontpage?

There is already "Most popular replays" but it is only text, not nice images like the recent ones. (and the difference between "most popular" and "currently popular")

For the search results:
Maybe have small map-thumbnail beside the mapname? Think especially for new players easier to recognize by picture.

In the list on http://replays.springrts.com/browse/ it would be nice if it also showed game-name. So that one can for ex. click "yesterday" and scroll through the list until one finds an interessting game-map combo.

I would assume when players log-in to site, many do it to find their own replays. Atm one has to click own name topright, then scroll down past the stats/ranking.
Seems trivial but users miss such things all the time..Maybe at top of playerpage button/anchor-link thing named "My recent games"?
Could also show that right after login.
Post Reply

Return to “Infrastructure Development”