map drawing and caching
Page 1 of 1

Author:  orathaic [ Tue Jan 12, 2010 4:24 pm ]
Post subject:  map drawing and caching

I was just tlaking to gilgatex about Fog of war, and a thoguht occured to me.

If i'm not mistaken webdip keeps a cache of maps on the server; would it not reduce bandwidth/server load to instead keep a cache of unit positions and territory ownership - then when requested have the client draw/redraw the map based on the info given.

css/javascript should be capable of handling it, (but ideally I wouldn't want to have the user need to re-download same css/javascript each time they load a new page - even better would be to allow the user modify said css files on their local machine - which would allow them change the colours of things to account for things like colour-blindness... but maybe i'm mad) anyway, just some thoughts...

Author:  figlesquidge [ Tue Jan 12, 2010 11:12 pm ]
Post subject:  Re: map drawing and caching

This is the objective of the SVG map that I was working on this time last year.
Unfortunately I didn't allocate enough time to it, so it never got completely finished, but Kestas has the code and I would suggest this is probably next after variants.
If you want I can send you the code to have a look at.

Author:  orathaic [ Tue Jan 12, 2010 11:30 pm ]
Post subject:  Re: map drawing and caching

yeah, thanks, it would be cool to see what you've been working on.

i've been promising to let myself do some work on some variants when my current project is finished, which i'm hoping will be soon.

Author:  figlesquidge [ Wed Jan 13, 2010 12:24 am ]
Post subject:  Re: map drawing and caching

Attached on this post.
The idea is that all the code is linked in to map.svg
Whilst the map file itself is pretty hefty, that would cache on the users computer, and from then on all that is required is an XML file explaining who controls what.
I've also got a more powerful version where the system had basic support for entering orders via point & click.
Its not in a very easy format for you to have a look at (sorry about that) but to make it work propperly I need a feed off an active site with maps and games to view, and there was (a year ago) a setup that allowed this to happen, but I don't think its still available.

Safe [82.24 KiB]
Downloaded 229 times

Author:  orathaic [ Wed Jan 13, 2010 12:26 am ]
Post subject:  Re: map drawing and caching

the point and click orders was similar to something i had planned to write for another game but i think the order completion code is different here. (though allowing misorders would be nice and simplify the code i think) drag and drop should be easy enough to do...

Author:  figlesquidge [ Wed Jan 13, 2010 12:39 am ]
Post subject:  Re: map drawing and caching

That would be a way of doing it.
After all, webDip checks all the orders coming in as it is.

As Kestas currently has a javascript based order system, it wouldn't be at all hard to do. I think one of the reasons for the delay in incorporating it (that package there works perfectly fine for drawing, redrawing, history, show/hide layers) is that much of the javascript within it is similar to code already used on board.php to calculate orders, and as such I believe Kestas wants to combine the two rather than running separate systems.

Personally I think it would be nice to put it in as soon as possible, and that the minor hassle of the user downloading two copies of some javascript data is nothing compared with the savings made in maps, and the reduced loading time on history would be pronounced.
I would like to see it placed in the page and online as board2.php. Only those in the know would use it anyway (no need to add a link) and so it would work as a useful beta-testing system (if this was an issue perhaps access could be limited to those marked as 'donators' for the test period).

Page 1 of 1 All times are UTC
Powered by phpBB® Forum Software © phpBB Group