Page 2 of 2
Re: Build map editor in to WZ
Posted: 09 Jan 2013, 19:24
by Emdek
Anyway, I don't see a real reason for full blown map editor built in. There maybe is a room for something simple that would allow to polish map using "native" rendering (since external editor has to emulate game engine), but it doesn't make sense to put all advanced stuff there. This will bloat source (a bit) and make engine more complex.
BTW, I really feel that my efforts are totally ignored and since I don't have any additional motivation it explains why my map editor didn't progressed much than loading map data and only displaying it in 2D view.
Re: Build map editor in to WZ
Posted: 09 Jan 2013, 19:33
by aubergine
You're efforts aren't ignored. But my guess is that to most map makers until your editor reaches a point that allows them to creating working maps it's essentially just an "interesting code experiment".
Another benefit of doing map editor in WZ -- more people will see it, there's a 2D editor already built in (mini map) and you scan scale it and toggle on/off easily enough.
BTW, what would you consider to be "advanced stuff"? I assume things like automatic terrain generation, PNG heightmaps, etc? Are there other things?
Re: Build map editor in to WZ
Posted: 09 Jan 2013, 19:48
by Emdek
aubergine, when I've started this project there was no real and fully functional alternative yet. There was only EditWorld, I'm not sure if Flame was even available for public back then. Most of the work that is visible today was done back in 2010 (with some effort I could find screenshots uploaded back then).
I don't want to rant but find people that would like to help (I need someone to work on 3D view) or show at least some interest in it so I would at least have motivation to work on it.
Also it's not just "code experiment", it has full map parsing (done by
SafetyOff) and working 2D terrain rendering.
Example:
http://simplest-image-hosting.net/png-0-gg2640
For me advanced stuff is mostly anything other than commands like:
- change tile texture,
- put object,
- remove object,
- rotate / flip (object or tile),
- increase or decrease tile height.
Re: Build map editor in to WZ
Posted: 16 Jan 2013, 12:08
by aubergine
Another benefit to having map editing features in the base game, they could be used for in-game effects.
For example, in Goth's cam4, it starts with two crashed transports.
Now imagine if it start with them flying in, heavily damaged with smoke pouring out the back, then they crash in to the ground, digging a trench and leaving debris behind them, smashing through some trees, with (skyscraper collapse) dust clouds being created, complete with a nice grinding metal sound effect, until they come to rest...
Re: Build map editor in to WZ
Posted: 16 Jan 2013, 12:30
by Emdek
aubergine, that's not really map editing.

But would be nice to have, it was often requested to give trucks ability to modify terrain.
Re: Build map editor in to WZ
Posted: 16 Jan 2013, 12:38
by NoQ
Yeah, and broken dambs

Re: Build map editor in to WZ
Posted: 17 Mar 2013, 16:32
by NoQ
BTW, what would you consider to be "advanced stuff"? I assume things like automatic terrain generation, PNG heightmaps, etc? Are there other things?
Well, srsly.
Given just
setTileType(x,y,type),
setVertexHeight(x,y,height), and
setVertexColor(x,y,color), we can already
- Have a new JS-based map format (put the map data into the extra script), which will mostly satisfy me (no need to invent a new map format if we have this).
- A map generator (a special map containing a single non-interactive generator algorithm; works in multiplayer by producing a random seed with syncRandom() and works in skirmish by saving the seed in the script context and re-generating map on loading).
- Implement season changes (more snow in winter) and broken dambs and what not.
With
setTileDecal(x,y,decal) we can add craters below destroyed stuff and so on. With
setGroundTexture(color,pngfile) and
setDecalTexture(decal,pngfile) we can have any custom textures we ever wanted.
Maybe just merge JS heaven there? (: I can try doing most of this myself when i have some time; i'd most likely have problems with texture loading functions (but we already have an example), but other stuff is in an area i already more or less understand.
Re: Build map editor in to WZ
Posted: 17 Mar 2013, 17:13
by Per
NoQ wrote:Have a new JS-based map format (put the map data into the extra script)
Are you aware of how many data points a max sized map has? 250 * 250 = 62 500 tiles. Even if all you are going to do is set the tile height and type, that's over 120 000 script function calls.
If you were to go down this (somewhat insane but perhaps brilliant?) road, at least put that data into an array and pass that array to a script function... I have no idea what kind of performance you'd get, though. Potentially atrocious, but only one way to find out, I guess.
Re: Build map editor in to WZ
Posted: 17 Mar 2013, 17:18
by Emdek
Exactly, also it would require additional algorithms to guarantee that resulting map would be playable (enough flat and connected areas etc.).
Re: Build map editor in to WZ
Posted: 17 Mar 2013, 18:29
by effigy
Emdek wrote:
I made a map editor.
Have you ever released any windows binaries? I'm sure you'd get more people testing your progress that way, though maybe you don't need that kind of help?
Re: Build map editor in to WZ
Posted: 17 Mar 2013, 18:59
by Emdek
effigy, nope, it's not yet ready for this stage (since it's still more like 2D viewer...), although creating them would be now much easier (after dropping unfinished and unmaintained 3D part, to be replaced by
QGLViewer or something like that).
I'm currently working on other projects since apparently there is
nearly zero interest in cross platform map editor.
Re: Build map editor in to WZ
Posted: 17 Mar 2013, 20:36
by NoQ
If you were to go down this (somewhat insane but perhaps brilliant?) road, at least put that data into an array and pass that array to a script function...
Yeah that should be better (eg. we don't need to re-calculate continents 62500 times).
Re: Build map editor in to WZ
Posted: 18 Mar 2013, 01:05
by aubergine
Or even have a JS API function that dumps the map data to a file and another function that can load map data form a file. In other words, new map format

Re: Build map editor in to WZ
Posted: 22 Mar 2013, 03:41
by Urnight
Bump and Support