Re: [Warzone-dev] Question on maps
On Sun, Apr 05, 2009 at 07:42:02AM +0100, Florian Schanda wrote: > A linux editor based on my effort would also run fine on windows and osx - If > I do write one it would be written in PyQt4. It is starting to look like Qt is the default widget set for Warzone tools. And yes a linux editor would be a good thing. -- Stephen Swaney sswa...@centurytel.net ___ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev
Re: [Warzone-dev] Question on maps
On Sunday 05 April 2009 02:58:30 kim metcalfe wrote: > ot is that what all this is about - not having a linux editor... if > thats the case > what happens to the windows editor once this other thing becomes available A linux editor based on my effort would also run fine on windows and osx - If I do write one it would be written in PyQt4. Florian ___ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev
Re: [Warzone-dev] Question on maps
actually the map editor is not that difficult once you understand the rules.\ reading the ENTIRE editworld document would help iron out any troublesome bits. failing that just ask and i would be more than happy to assist you with whatever the problem is ( windows only as we dont have linux editor.) ot is that what all this is about - not having a linux editor... if thats the case what happens to the windows editor once this other thing becomes available as i dont particularly care for " random" crap maps. unless you code up one hell of an awesome editor... i will wait to see what happens. and go from there. On Fri, Apr 3, 2009 at 1:43 AM, Zarel wrote: > On Fri, Apr 3, 2009 at 2:22 AM, Per Inge Mathisen > wrote: >>> I assume I need this to effectively define starting positions of players -- >>> each should be given two initial construction droids? No other items are >>> strictly necessary? >> >> Correct. > > Wait wait, I thought CCs were necessary, too. > > I echo Per, by the way. Having a usable map editor, as opposed to > EditWorld, which is extremely difficult to do anything with, would be > great. > > -Zarel > > ___ > Warzone-dev mailing list > Warzone-dev@gna.org > https://mail.gna.org/listinfo/warzone-dev > ___ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev
Re: [Warzone-dev] Question on maps
Florian Schanda wrote: > Our eventual aim is to write a random map generator for warzone Nice. I already have a start of that, but it is far from finished. Take a look at the "random_map" branch in the git://gitorious.org/warzone2100/gerard_.git repository. What I have currently got working is a relatively open map in different "themes" (arizona, rockies, urban). The urban setting looks really weird, as it is not flat enough to be a real city. To start a random map select one of the Rnd-* maps from the skirmish menu. What does not work yet is saving/loading (due to the fact that it uses the new terrain renderer) and network play. Both probably need support for a new map format. The code is in src/randommap.c. - Gerard ___ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev
Re: [Warzone-dev] Question on maps
Hello, Thanks for your answers. My follow up questions below are in the context of "what is strictly necessary to get started". I.e. I want to implement the absolute minimum to write a valid and playable warzone map; I can always flesh out the details later... On Wednesday 01 April 2009 17:37:57 Per Inge Mathisen wrote: > The map itself (tile data) is contained in the "game.map" file. In that map, there are gateways and zones (and equivalency zones). What are they - and are they strictly necessary? > Droids > are in the "dinit.bjo", I assume I need this to effectively define starting positions of players -- each should be given two initial construction droids? No other items are strictly necessary? > while features in "feat.bjo" and structures in > "struct.bjo". Assuming no starting bases and no eye candy on the map, these files could effectively be empty? > I recommend looking at my independent implementation > of a map reader that you can find in tools/map/mapload.c in trunk, > rather than looking at src/map.c and src/game.c, at least to begin > with. Thanks, that maploader could come in handy later on. > Also note that while savegames and initial starting maps may look > quite similar, they have large differences under the hood. I do not > see why anyone would want to even think about reading or writing > savegames from an external program. The idea is to only write initial maps, not manipulate savegames. Our eventual aim is to write a random map generator for warzone, hence we need a sensible backend to write the actual map. Something else that could fall out later from this effort is a level editor. > Hope this helps. Feel free to ask if you have more questions. Thanks again for your answers, Florian ___ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev
Re: [Warzone-dev] Question on maps
On Fri, Apr 3, 2009 at 2:22 AM, Per Inge Mathisen wrote: >> I assume I need this to effectively define starting positions of players -- >> each should be given two initial construction droids? No other items are >> strictly necessary? > > Correct. Wait wait, I thought CCs were necessary, too. I echo Per, by the way. Having a usable map editor, as opposed to EditWorld, which is extremely difficult to do anything with, would be great. -Zarel ___ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev
Re: [Warzone-dev] Question on maps
On Thu, Apr 2, 2009 at 11:00 PM, Florian Schanda wrote: > In that map, there are gateways and zones (and equivalency zones). What are > they - and are they strictly necessary? In 2.2 and later, gateways are only used by the AI as hints as to where to place defenses. If empty, the AI will use other methods to place defenses, so gateways are not necessary. Zones are not used. You must still place dummy headers for zones and gateways, though. In 2.1 and earlier, zones and gateways were used by the path-finding code. They are quite complicated to deal with, so I do not recommend dealing with them and rather dropping any support for 2.1 and earlier versions. >> Droids >> are in the "dinit.bjo", > > I assume I need this to effectively define starting positions of players -- > each should be given two initial construction droids? No other items are > strictly necessary? Correct. >> while features in "feat.bjo" and structures in >> "struct.bjo". > > Assuming no starting bases and no eye candy on the map, these files could > effectively be empty? You need to write a dummy header, but other than that it can be left empty. > Our eventual aim is to write a random map generator for warzone, hence we need > a sensible backend to write the actual map. Something else that could fall > out later from this effort is a level editor. That would be really awesome. You might want to talk to Gerard about your random map editor ideas, as I believe he is also working on such a thing. - Per ___ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev
Re: [Warzone-dev] Question on maps
On Wed, Apr 1, 2009 at 9:48 AM, Florian Schanda wrote: > I am looking into writing a python API for *writing* warzone maps, in > particular multiplayer maps. I had some questions on the files for each map - > if somebody could > a) point me to the relevant source code that parses them > b) tell me what they are meant to do / store > c) tell me if they are strictly necessary > that would be awesome. > > 2c-highground.gam > 2c-highground/dinit.bjo > 2c-highground/game.map > 2c-highground/feat.bjo > 2c-highground/struct.bjo > 2c-highground/ttypes.ttp > > As far as I can work it out the .map is parsed by map.c, and is the important > bit... I haven't looked at the rest of the source as I am unsure as to where > to start. The map itself (tile data) is contained in the "game.map" file. Droids are in the "dinit.bjo", while features in "feat.bjo" and structures in "struct.bjo". Terrain types are in "ttypes.ttp" but for maps using the ordinary tilesets that come with the game, you do not need to modify it, just make sure you use the correct one that matches the tileset. The .gam file contains savegame information - depending on the map version you are targeting, you may or may not have to put a lot of data in it. I recommend using one of the lowest version supported by the game to start with, such as version 11. There is also the need for an "addon.lev" file to describe the map - take a look at how map mods are doing it. The files, except for addon.lev, are binary files containing raw C structs merely dumped onto the disk. This makes them rather hard to parse correctly. I recommend looking at my independent implementation of a map reader that you can find in tools/map/mapload.c in trunk, rather than looking at src/map.c and src/game.c, at least to begin with. Also note that while savegames and initial starting maps may look quite similar, they have large differences under the hood. I do not see why anyone would want to even think about reading or writing savegames from an external program. Hope this helps. Feel free to ask if you have more questions. - Per ___ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev
Re: [Warzone-dev] Question on maps
On Wednesday, 1 April 2009 at 8:48, Florian Schanda wrote: > I am looking into writing a python API for *writing* warzone maps, in > particular multiplayer maps. I had some questions on the files for each map - > if somebody could > a) point me to the relevant source code that parses them > b) tell me what they are meant to do / store > c) tell me if they are strictly necessary > that would be awesome. > > 2c-highground.gam > 2c-highground/dinit.bjo > 2c-highground/game.map > 2c-highground/feat.bjo > 2c-highground/struct.bjo > 2c-highground/ttypes.ttp > > As far as I can work it out the .map is parsed by map.c, and is the important > bit... I haven't looked at the rest of the source as I am unsure as to where > to start. IIRC maps are the same format as savegames (that means all files are necessary), which are handled by src/game.c. ___ Warzone-dev mailing list Warzone-dev@gna.org https://mail.gna.org/listinfo/warzone-dev