Conqueror: HTML5 :  Conqueror! Forum
Open discussion for the HTML5 version of Conqueror here.  
info about mapmaking (SVG?)
Posted by: Paars ()
Date: January 28, 2014 04:49AM

According to 'about section' in 'help' SVG is used for creating the current maps? as output/input xml files with the information contained about image(objects) and properties etc.This is what I understood after reading wikipedia bout it.

If this is the case I would like to see an example file which information is stored for conquerorgame maps, so I can build a customized easy to use map editor/creator(already created 1 for a big part) which saves its output in an xml file with all used properties which can then serve as a direct input file.(combined with all the country images used).

But perhaps its not used in this way or im missing some important part. Anyway, if its pretty much like this I would have no problems building(finishing) this mapmaker.

Options: ReplyQuote
Re: info about mapmaking (SVG?)
Posted by: XuuL ()
Date: January 28, 2014 03:55PM

Sounds cool. I used JSON instead of XML and the images stuff is directly inside SVG or linked via CSS.

I will show u when i have time ;)

Options: ReplyQuote
Re: info about mapmaking (SVG?)
Posted by: Paars ()
Date: January 28, 2014 11:17PM

ok just checked up on json, but it's all part of the html 5 standards it looks like.

trying to set up the basic simplefied idea of the mapmaker.

for a new map, the things listed here below are imo the only unique data needed for creating a new map. (might miss something).

option mapname should be saved.
max amount of players minimal 2, max 16 has to be stored.
(possible background img? map width/height or doesnt that have to stored)
countryname(countryID?),(relative x,y pos if counting from top-left) and the actual Countryimages.
countries neighbors
label/txtfield probably centered on its countryImage for the armies.

(the map should be selecteble for play which would be added, but since this is just testing first, we can arrange probably to do those tests on a testpage)

the countryImages I dunno for sure, but I think they are all part of 1 subclass that handles the colors and opacity during the game.(white background with 1px colored border?)Or do they need a diffrent standard?

placing countries is also working by drag n drop(which is supported with svg 2 i read) in which i can save the countries ->name and x,y pos

dunno if the linking-> connecting neighbors all has to be typed manually currently, but my first tryout test version already has the option setting neighbors where u can just point and click. and automaticly saved as text when u save the map.

for the rest i can implement a bunch of handy features and error/bug checking(like displaying a warning when there's a country without any neighbors). and easy manually checking if all countries are linked they way u want etc.

So just my first attempt at a theoretical model. probably some svg stuff that might have to be dealt with diffrently but that I can read into more then.


ah just checked [] funny how internet explorer used to have filters supported(a few) and none of the other browsers because they said it didn't belong in html lol. and now ie doesn't support it properly.

json and svg don't seem to hard, time consuming maybe but it's embedded in the html document on that site. so creating the correct output code to be used as input code for conqgame is doable, when i have the specifics. :)

Edited 2 time(s). Last edit at 01/29/2014 12:10AM by Paars.

Options: ReplyQuote

Sorry, only registered users may post in this forum.