Build map editor in to WZ

Ideas and suggestions for how to improve the Warzone 2100 base game only. Ideas for mods go in Mapping/Modding instead. Read sticky posts first!
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Build map editor in to WZ

Post 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.
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Build map editor in to WZ

Post 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?
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Build map editor in to WZ

Post 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.
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Build map editor in to WZ

Post 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...
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Build map editor in to WZ

Post by Emdek »

aubergine, that's not really map editing. :-P
But would be nice to have, it was often requested to give trucks ability to modify terrain.
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Build map editor in to WZ

Post by NoQ »

Yeah, and broken dambs :3
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Build map editor in to WZ

Post 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.
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Build map editor in to WZ

Post 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.
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Build map editor in to WZ

Post by Emdek »

Exactly, also it would require additional algorithms to guarantee that resulting map would be playable (enough flat and connected areas etc.).
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
User avatar
effigy
Regular
Regular
Posts: 1217
Joined: 22 Jan 2010, 03:21
Contact:

Re: Build map editor in to WZ

Post 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?
This is why some features aren't implemented: http://forums.wz2100.net/viewtopic.php?f=30&t=7490&view=unread#p87241
User avatar
Emdek
Regular
Regular
Posts: 1329
Joined: 24 Jan 2010, 13:14
Location: Poland
Contact:

Re: Build map editor in to WZ

Post 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.
Nadszedł już czas, najwyższy czas, nienawiść zniszczyć w sobie.
The time has come, the high time, to destroy hatred in oneself.


Beware! Mad Qt Evangelist.
User avatar
NoQ
Special
Special
Posts: 6226
Joined: 24 Dec 2009, 11:35
Location: /var/zone

Re: Build map editor in to WZ

Post 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).
User avatar
aubergine
Professional
Professional
Posts: 3459
Joined: 10 Oct 2010, 00:58
Contact:

Re: Build map editor in to WZ

Post 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 ;)
"Dedicated to discovering Warzone artefacts, and sharing them freely for the benefit of the community."
-- https://warzone.atlassian.net/wiki/display/GO
Urnight
Rookie
Rookie
Posts: 29
Joined: 05 Jun 2012, 02:10

Re: Build map editor in to WZ

Post by Urnight »

Bump and Support
Post Reply