create nice map stats with the spring demonaut! - Page 3

create nice map stats with the spring demonaut!

Various things about Spring that do not fit in any of the other forums listed below, including forum rules.

Moderator: Moderators

User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: create nice map stats with the spring demonaut!

Post by knorke »

Pako wrote:I made a widget to write SVG animations, it works a lot better than generating a GIF. Only problem is, it's a widget so while playing it only records the other team. Is there an easy way to hack a gadget into the game?
When spectating widgets "see" every team. For players I am pretty sure that can not work as it would make cheating possible.


Altored_Divide_BA_6e_anim.svg
This shitty forum doesn't seem to support SVG but all modern browsers should play SVG animations fluently. Purchase a newer browser or contact a local browser developer if there are problems. It is tested with Opera and Internet explorer 6.
Hm, firefox shows this: http://replays.adune.nl/minimaps_1024/A ... de.sd7.jpg and Internet Explorer wants to download the file. Irfanview does not play it either, needs a plugin. I'll try that later.
Dragon45 wrote:Can you dump the dots to an external format with some additional information about say, metal / energy cost of the unit? I could throw some clustering algorithms and graphical analysis at it to come up with Metal/Energy Center of Mass for players and so on, heatmaps of activity etc. Probably useless but also fnu.
zomg they be stealing mah project. :shock:
Like this: http://pastebin.com/SvwTU34z ?

The newer version of my lua widget includes position, unit names, cost, health and some other stuff.
I have attached it. By playing with this LÖVE2d I learned a bit and now see it is a bit ugly (not that I knew before)
Maybe set
local markers = false
local testmsg = false
otherwise it will spam a lot ;) It still will a little :roll:
You can modify it whatever you want but give update if you do something interessting ;)
The commanderstatus log thing is temporary, buggy and needs fixing:
-original owner (name) of commander should be logged to track players /taking and sharing commanders
-mods with buildable commanders ie THIS
-commanders that get resurrected ie BA
-morphing
-in general, players having more than one commander

Demonaut can do alot of stuff now (build order + favorite unit of player) but I lack time/energy to put it all together.
Attachments
tp_eventlog_OF.lua
(9.94 KiB) Downloaded 122 times
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: create nice map stats with the spring demonaut!

Post by TradeMark »

Pako wrote:I made a widget to write SVG animations, it works a lot better than generating a GIF. Only problem is, it's a widget so while playing it only records the other team. Is there an easy way to hack a gadget into the game?

Altored_Divide_BA_6e_anim.svg
This shitty forum doesn't seem to support SVG but all modern browsers should play SVG animations fluently. Purchase a newer browser or contact a local browser developer if there are problems. It is tested with Opera and Internet explorer 6.
Nice! Doesnt take so much space either. Btw you should use 360x360 size images instead, it will load and animate a lot faster! I get huge lag with the 1024x1024 image once it is loaded in the background :?

These kind of animations would be cool to see on the replays site... although not many browsers supports SVG, need to download it separately.

I use adobe SVG viewer, it works on IE perfectly (with 320x320 background image). I couldnt get that svg working with firefox...

Edit: Can you make flash version from it? Maybe transparent flash, so its possible to embed it directly on any background image.
User avatar
Dragon45
Posts: 2883
Joined: 16 Aug 2004, 04:36

Re: create nice map stats with the spring demonaut!

Post by Dragon45 »

No flash plox, HTML5 would be preferred.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: create nice map stats with the spring demonaut!

Post by knorke »

I use adobe SVG viewer, it works on IE perfectly (with 320x320 background image). I couldnt get that svg working with firefox...
got it working with that quide:
http://www.basimo.de/words/archives/200 ... vg-plugin/
in english:
*install Adobe SVG Viewer
*C:\Programme\Geimeinsame Dateien\Adobe\SVG Viewer 6.0\Plugins\ ("Shared Application Data" or something) has two files: NPSVG6.dll and NPSVG6.zip copy to firefox\plugins\
*Enter about:config in firefox, search for "svg" and set svg.enabled=false to disable Firefox own (bugged) sgv render
*restart ff
---
Wow, the animation is very nice and much smoother than gif! :)
Did not know svg could do such things.
So the svg has coordinates and then moves shapes along a path defined by dx,dy during the lifetime of that unit? I am lucky I did not try this with a javascript approach, svg is so much better.
Problem is it is not complety accurate for example the black commander ([sos]poppy) moves forward and in the motion builds some stuff. I think at least the factory takes long enough to build that his stopping would be visible.

The idea of using a textbased image format amazes me. Not knowing how to output pictures from Lua widgets was one of the reasons I made an external program.
Care to explain more about your widget? Ie how do you recognize commanders, what happens if a player shares a com or they get revived from wrecks etc.
Pako
Posts: 174
Joined: 12 Jul 2009, 18:57

Re: create nice map stats with the spring demonaut!

Post by Pako »

knorke wrote:Demonaut can do alot of stuff now (build order + favorite unit of player) but I lack time/energy to put it all together.
I don't remember any real use for demonaut. Maybe eventually it could combine a nice bitmap to overlay the ingame map so that players can see what are the tactical positions in that map.
TradeMark wrote:Nice! Doesnt take so much space either. Btw you should use 360x360 size images instead, it will load and animate a lot faster! I get huge lag with the 1024x1024 image once it is loaded in the background :?
It is supposed to be zoomed a lot (Ctrl+mouse wheel). Use Opera if it's slow, I have a shitty computer and it runs fine. The dots should be proprtionally a little bigger for a smaller image and small units should be removed.
TradeMark wrote:These kind of animations would be cool to see on the replays site... although not many browsers supports SVG, need to download it separately.
I dont know a modern browser that doesnt support SVG. Even my 5 year old Nokia phone with 4 year old Symbian OS supports SVG animations. My animation may use a new or rare technique?
TradeMark wrote:Edit: Can you make flash version from it? Maybe transparent flash, so its possible to embed it directly on any background image.
Bad joke.
Dragon45 wrote:No flash plox, HTML5 would be preferred.
SVG is in HTML5.
knorke wrote:got it working with that quide:
http://www.basimo.de/words/archives/200 ... vg-plugin/
Install Opera and it works even better and faster.
knorke wrote:The idea of using a textbased image format amazes me. Not knowing how to output pictures from Lua widgets was one of the reasons I made an external program.
Care to explain more about your widget? Ie how do you recognize commanders, what happens if a player shares a com or they get revived from wrecks etc.
The widget is just an early version and many improvemenst would be easy to add like air units to triangles. That slight unsynced moving could be a little bug or SVG rendering bug. SVG animation have a good amount of timing controls and I didn't even try them.

There could actually be many bugs but onlyquite primitive SVG objects are used.

Whole widget is suprisingly simple and light. It saves all created units' positions every 20 seconds and saves the unit path to SVG file when it dies. When udef.isCommander dies only <circle> is replaced with <text>.CommanderNames[teamID] . Therefore I wonder why there is such unsync with commander motion.

SVG could work for demonaut too, basically only a handy string lib is needed but an SVG with thousands of objects is a lot bigger and slower than a bitmap. Best would be drawing the graphs in SVG and embedding the heat map images in SVG (maybe several files).
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: create nice map stats with the spring demonaut!

Post by TradeMark »

So, instead of making compatible websites, you tell everyone to install Opera.

FAIL.

This is also why i suggest flash: it works on everywhere and its fast. No, im not joking.
User avatar
hoijui
Former Engine Dev
Posts: 4344
Joined: 22 Sep 2007, 09:51

Re: create nice map stats with the spring demonaut!

Post by hoijui »

hey! very nice! :D
just ignore the trolls!

SVG is clearly the best choice here. flash might be better supported right now, but that is the only advantage. SVG has risen ever since it was introduced (eg, see Wikipedia images), and as animation is in HTML5 as you say, i am sure it will take a big leap forward again. we do not need our stuff to look shiny on the product we will release tomorrow, and then forget about it. we want a good... the best long term solution, which this clearly is.
User avatar
AF
AI Developer
Posts: 20687
Joined: 14 Sep 2004, 11:32

Re: create nice map stats with the spring demonaut!

Post by AF »

There is a whole class of hardware for which flash isn't supported, or the support is 'mobile flash' which isn't really workable.

Flash can't be used in IMG tags on forums, has more security vulnerabilities, introduces rendering artefacts if you try to do anything more than a basic box, can't be used as backgrounds or elements in CSS styling, requires hacks for a lot of functionality to work that you get out the box everywhere else, and relies on proprietary tools and tool-chains

Whereas you can generate an SVG in a lua widget and display it anywhere on a supporting browser.
User avatar
TradeMark
Posts: 4867
Joined: 17 Feb 2006, 15:58

Re: create nice map stats with the spring demonaut!

Post by TradeMark »

I tried that SVG on my cellphone and it didnt even show the background, and the animation was horribly slow. I bet it can be made faster with flash, you have much more rendering optimization options with flash. Also the filesize should get smaller too.
AF wrote:Flash can't be used in IMG tags on forums
We dont need them to be on forums.
AF wrote:Whereas you can generate an SVG in a lua widget and display it anywhere on a supporting browser.
I can generate flash if i want.
Pako
Posts: 174
Joined: 12 Jul 2009, 18:57

Re: create nice map stats with the spring demonaut!

Post by Pako »

TradeMark wrote:So, instead of making compatible websites, you tell everyone to install Opera.
Opera has a very good SVG support and it is not so hard to install. I don't even have the current firefox installed and it could take hours of debugging which I don't have now.
TradeMark wrote:I tried that SVG on my cellphone and it didnt even show the background, and the animation was horribly slow. I bet it can be made faster with flash, you have much more rendering optimization options with flash. Also the filesize should get smaller too.
SVG is not meant for animating thousands of units but it's fast enough and can be easily generated and optimized.

Browser trying to save the file is only MIME or <img> tag missing. If this forum would support svg it would works just as animated gif.
t0rb3n
Posts: 58
Joined: 17 Dec 2008, 11:22

Re: create nice map stats with the spring demonaut!

Post by t0rb3n »

+opera
-flash
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: create nice map stats with the spring demonaut!

Post by knorke »

That slight unsynced moving could be a little bug or SVG rendering bug. SVG animation have a good amount of timing controls and I didn't even try them.[...]
It saves all created units' positions every 20 seconds and saves the unit path to SVG file when it dies. When udef.isCommander dies only <circle> is replaced with <text>.CommanderNames[teamID] . Therefore I wonder why there is such unsync with commander motion.
I think it is because positions are saved only every 20 seconds. So if a unit stands still for 10 seconds and then moves a certain distance in 10 seconds in the animation it looks the same as if the unit would have travelled the distance in 20 seconds. With the coms it is just more noticable because they walk & stop alot. It does not really matter that much though and I dont know how it could be fixed without increasing file size.
If this forum would support svg it would works just as animated gif.
After the simple fix, it does for me now. (in Firefox)
Current svg support of install version FF might be buggy but I think it will be fixed eventually and html5 stuff will replace flash in some areas.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: create nice map stats with the spring demonaut!

Post by knorke »

It is now possible to see all uploaded game stats thingies at http://knorke.net23.net/battlereports/ hooray.
Do not mind the .jpg files, they are old and mostly from failed tests. :roll:

New uploads will be .html like this:
http://knorke.net23.net/battlereports/A ... g.txt.html

The knorkebot is currently in Springie XTA host.
Will it have recorded 1 or even 2 games when I come back in the evening? Oh the excitment.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

the colors...changing, moving...closing in...RUN!

Post by knorke »

Image
:shock:
[16:01] [s2]bobbel !ban knorkebot
[16:01] * bobbelhost * Full ban added for user "knorkebot" (perm-ban)

:shock:
User avatar
manolo_
Posts: 1370
Joined: 01 Jul 2008, 00:08

Re: create nice map stats with the spring demonaut!

Post by manolo_ »

they dont liek you knorke :), is there a way to include this directly into the lobby/install-package, because its worth to support it
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: create nice map stats with the spring demonaut!

Post by knorke »

robophobia :)
for including in an official installer package it is still changing too much. if someone is really interessted to try it out i might put together a release version. But at the moment it is not worth the hassle to make menu, documentation etc if it changes again anyway...

http://knorke.net23.net/battlereports/
the reports with the new unit movement thing image have "MOAR" in the filename if someone wants to browse.

knorkebot is currently noobing it up at:"TrainingCamp (noobs welcome)" and probally will for the next few hours or so.
timex789
Posts: 6
Joined: 30 Jul 2010, 05:57

Re: create nice map stats with the spring demonaut!

Post by timex789 »

Hey, I would love to play around with your knorkebot. I don't need a full installer the files with a hint or two about where to put them would be more than enough. I haven't worked with lua before, but I think I could figure it out.
User avatar
knorke
Posts: 7971
Joined: 22 Feb 2006, 01:02

Re: create nice map stats with the spring demonaut!

Post by knorke »

cool, ill upload a zip later.
would do now but i got to go now and it will take a few mins to comment out teststuff etc. (i am redoing some things and atm the menu is broken so i always just change settings in the code :roll: )
User avatar
smoth
Posts: 22309
Joined: 13 Jan 2005, 00:46

Re: create nice map stats with the spring demonaut!

Post by smoth »

Can it do a heatmap yet for where units kill from or at least where they die on the map?
timex789
Posts: 6
Joined: 30 Jul 2010, 05:57

Re: create nice map stats with the spring demonaut!

Post by timex789 »

Thanks!
Post Reply

Return to “General Discussion”