forum.webdiplomacy.net

webDip dev coordination forum / public access todo list
It is currently Mon Nov 20, 2017 11:45 am

All times are UTC




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: map drawing and caching
PostPosted: Tue Jan 12, 2010 4:24 pm 
Offline

Joined: Thu Dec 18, 2008 12:24 pm
Posts: 55
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...


Top
 Profile  
 
PostPosted: Tue Jan 12, 2010 11:12 pm 
Offline

Joined: Wed Oct 08, 2008 12:47 pm
Posts: 726
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.


Top
 Profile  
 
PostPosted: Tue Jan 12, 2010 11:30 pm 
Offline

Joined: Thu Dec 18, 2008 12:24 pm
Posts: 55
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.


Top
 Profile  
 
PostPosted: Wed Jan 13, 2010 12:24 am 
Offline

Joined: Wed Oct 08, 2008 12:47 pm
Posts: 726
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.


Attachments:
Safe Build.zip [82.24 KiB]
Downloaded 223 times
Top
 Profile  
 
PostPosted: Wed Jan 13, 2010 12:26 am 
Offline

Joined: Thu Dec 18, 2008 12:24 pm
Posts: 55
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...


Top
 Profile  
 
PostPosted: Wed Jan 13, 2010 12:39 am 
Offline

Joined: Wed Oct 08, 2008 12:47 pm
Posts: 726
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).


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group