This subproject of great NOTA world have some parts
Lua widget, that makes SVG files
- Alpha version is finished
- you can check the code on project site
Using bitmap icons - the same like in game
- [+] - icons are finished
[-] - icons are ugly and only way how to work with them is using filters (not comfortable)
[-] - icons are stored on-line and there are downloaded - so no watching off-line
[-] - if many units (more then 100-200) Firefox and Opera are not fast enough and you see slideshow, only in Chrome you see nice smooth moves
- [-] - you have to create many new icons
[+] - but icons are nicer and its easier to work with them (coloring, black borders)
[+] - big numbers of units are not so bad for any browser
Currently the vector aprroach is under development, we work on new icons now, polishing the size, and solving some strange interpretation of SVG in some browsers.
BTW1: we found this forum thread where there are previous tries of other people to make SVG replay. (Un)fortunately we found it when our widget was almost fisnihed - but for comparation its good and there are some good ideas and dead branches of developent.
BTW2: Today (10.10.12) IljaK said, he let look the world on his widget doing almost the same - his svgs are advanced in one way - it shows the players chat and drawing, too.
BTW3: There was made some arrangement with Dansan that there will be possible to upload SVG replays to replays storage near end of the year, maybe (Conditions of this deal are not specified, yet, its not solved what to do with automaticly sent replays - are they valuable enough?, registred or registred+trusted+ users can upload files?, etc..)
BTW4: Big thx for dansan replay storage, we use map images stored there for background of our replays - note - in current state on-line viewing is still needed
Currently under eyes of:
- PepeAmpere
- TheFace
- Widget record everytime you play as Spectator (so when watching standard replay, too) and saves result in ./demos or ./demos/nota-tv (if created)
- Theres present some older version in NOTApack (for windows users) - you can just download and test
- Currently work just for NOTA, but theres no problem to "localize" the widget for other games. Its done by creating "<mod_name>-icontypes.lua" in Widgets/nota-tv/ folder from your game icontypes.lua and adding transition info for using new icons (its still changes, when final release, the manual or some easier solution will be here)
- not started yet
- it will be some kind of neverending "broadcasting", mostly SVG replays + some autogenerated stuff (like news from forum, last comments in choosen forums, short autocreated adds, next program)
- http://nota.machys.net/tv - would be the adress (NOT DONE)
- lobby should contain the same as the page "broadcasting"
- lobby will offer watching svg files like standard video with pause, rewind and other controls.
- lobby let you easily change the settings of recording widget to change the default speed of replay and the how preciese the moves are captured (for creating your own videos)
- danil_kalina
- a1983
There is idea to have some 5-15 second pause between every match show in "page-TV broadcasting" where some "whats next" and "whats new in spring comminty" stuff will be placed
- because of lack of manpower, this only nice idea, nothing more
- One random headline from springrts.com news tab
- Next 1-3 replays info
- some changes in ledders and maybe info from PlanetWars
- ...
1) ignore first four lines
Code: Select all
<?xml version="1.0" standalone="no"?>
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<!--
Code: Select all
[general]
- each on own line
- name of setting starts on first letter, ends with ":"
- sector of settings ends with empty line and with next section
- all values of current version of SVG file are listed below:
Code: Select all
gameID:67d59b503e300574a0996a1f97174d8b
everyWhichFrame:120
speedUp:2
shift:5
realSpeedUp:4
mapName:Valles_Marineris_v2
gameVersion:91.0
gameModName:NOTA 1.69
gameLength:0:16:7
widgetVersion:0.58
alliances:3
playerCount:5
gameID (string)
everyWhichFrame (int)
speedUp (int)
shift (int)
realSpeedUp (float)
mapName (string)
gameVersion (string)
gameModName (string)
gameLength (string) -> <int>:<int>:<int>
widgetVersion (string)
alliances (int)
playerCount (int)
4) another section - [playersInfo], that contains data about players. From previous section you know the number of players (called in spring "teams") and number of teams (called in spring "alliances").
- Section ends with empty line
- line without "-" at the beggining means - here is team no. <some_integer>
- line with "-" is line describing one players property (how? described below)
Code: Select all
[playersInfo]
team:1
-0,0,256,256,[NOD]Smoke_Fumus,ru,5
-1,150,0,256,[o]PepeAmpere[CZ],cz,6
team:2
-2,0,159,256,danil_kalina,ru,5
-3,0,129,129,PoW,sk,4
types of variables:
idNumber (int)
Red (int <0-255>)
Green (int <0-255>)
Blue (int <0-255>)
PlayerName (string)
twoLettersCodeOfFlag (string)
Rank (int)
6) Section of Notalobby settings ends with first ending comment symbol below the playersInfo section
Code: Select all
-->
Code: Select all
[IconDefinitions]
I show you some basic example and there will be some partial examples below (not everytime part of this one - this on is only ilustration of one block).
Code: Select all
<ellipse id="57" ry="2" rx="2" y="-1" x="-1" class="p1">
<set attributeName="visibility" to="visible" begin="17.5s" dur="27s"/>
<animateMotion path="M 230 513 l 15 2 l 18 10 l 20 -1 l 13 -15 l 10 -6 l 12 -6 l 20 -3 l 17 -11 l 19 -6 l 21 0 l 20 0 l 19 -1 l 18 0 l 20 0 l 15 -4 l 12 -1 M 499 471 z" begin="17.5s" dur="9s"/>
<animateMotion path="M 499 471 M 499 471 z" begin="26.5s" dur="9s"/>
<animateMotion path="M 499 471 l 15 -3 l 8 3 l -7 -3 l -7 -2 l -21 -2 l -20 1 l -12 -16 l -15 -12 l -8 -12 l -8 -10 l -13 15 l -4 8 l 7 10 l 5 -7 l 2 -17 l 15 -5 l 20 -3 l 2 0 M 457 411 z" begin="35.5s" dur="9s"/>
</ellipse>
First line of definition every time gives you information about the icon itself, it can start with three possible tags:
- "<rect" - means rectangle defintion
Code: Select all
<rect id="52" height="8" width="8" y="-4" x="-4" visibility="hidden" class="p4">
- "<ellipse" - means dot definition
Code: Select all
<ellipse id="54" ry="2" rx="2" y="-1" x="-1" visibility="hidden" class="p1">
- "<path" - all other icons definition
Code: Select all
<path id="3" d="m-6.06312,-0.598846l5.650921,-4.111298l5.650938,4.111298l-2.158445,6.652451l-6.984957,0l-2.158457,-6.652451l0,0z" visibility="hidden" class="p2">
All three types of icons have some common parameters
- id - unique identifier (created by widget, lower number means unit was made sooner, bigger -> later)
- class - class containts specification of color, stroke-strength and default visibility, its string made as:
"p" + "<0..n>"
for example: p2 or p0
where n is number of players (teams) and its the first number that was at player description in section [playersInfo]
- for rect - height, width, relativeX,relativeY
Code: Select all
width="8" height="8" y="-4" x="-4"
- for ellipse - rx, ry, relativeX,relativeY
Code: Select all
rx="2" ry="2" x="-1" y="-1"
- for path - some path definig the icon (this will be maybe enhanced by some global definition)
Code: Select all
d="m-4.93437,2.77619l1.87515,-4.70625l6.25048,0l1.87515,4.70625l-10.00077,0z"
look at example:
Code: Select all
<set attributeName="visibility" to="visible" begin="21s" dur="83.5s"/>
begin = time of video, when icon shows on the screen
dur = time, for which the icon stays on the screen
for Danil: if you want to change the speed of the video (and get real game time speed), just mulitply these two values by realSpeedUp parameter, that is prepared for you in section [general]
THIRD AND OTHER LINES
every line from third to one before last starts with
Code: Select all
<animateMotion path="
1) it is desctiption of no move, of static unit sitting on the place for some time. Example:
Code: Select all
<animateMotion path="M 122 280 M 122 280 z" begin="5s" dur="226s"/>
Code: Select all
<animateMotion path="M 230 513 l 2 -1 l 21 1 l 18 8 l 19 -4 l 14 -9 l 11 -7 l 20 -3 l 17 -10 l 19 -6 l 20 0 l 19 -4 l 19 -1 l 18 -1 l 17 8 l 16 1 l 17 4 l 0 0 M 497 489 z" begin="16.5s" dur="9.5s"/>
- Values after "M" are absolute position values of icon (first x, second y)
- Values after "l" are relative pos values of icon (first x, second y) so you get new absolute value by addition previouse absolute (x,y) value with current (x,y) value.
- It makes sense, that in all cases you start with M value.
- Every move ends with M value, too.
- Desctiption of move itself ends with "z".
LAST LINE
On last line theres closing tag of one three types i described in FIRST LINE section. So one of these
</rect>
</ellipse>
</path>
Other notes
- only videos made by widget 0.588 and higher keeps these rules
- there are some things not specified correctly and deeply (for example drawing of icons and work with colors - i will complete the sections that will make problems later)