GTKMM Map Editor

Get some help with creating maps or modding.
Need a map editor or other tools, look here!
User avatar
Nemo
Greenhorn
Posts: 7
Joined: 01 Jan 2010, 10:42
Location: Michigan, USA
Contact:

GTKMM Map Editor

Post by Nemo »

Warzone 2100 is a rather neat game. Great job all the developers and artists.

Though one thing bothers me: the lack of a decent and easily accessible map editor for linux.

Yes, I know that EW32 will work if WINE is configured correctly, but I'd rather not have to resort to using WINE if it can be helped. Also EW32 exports the map files to *.wdg which is currently not used in favour of the more generic *.wz archive. (nice use of *.zip format I must say)

I have read that the wxWidgets port of EW32 has slowed to a crawl if at all.

So, I've decided to try my hand at developing a map editor from scratch in c++ using gtkmm. This project will at first be a personal learning and refresher task (it's been half a year since coding anything) that I might release to the community should it work well enough.


First Objectives:
1-1. Learn the *.lnd format structure for saving/loading maps.
1-2. Create the saving/loading functions.
1-3. Display the map in 2D and 3D viewports.

Secondary Objectives:
2-1. Create map editing functions.
2-2. Add height-map importing/exporting.
2-3. Learn the file formats within the *.wz such as *.addon.lev, *.gam, *.map, *.bjo, *.tag, *.ttp
2-4. Add *.wz export function


Naturally all the obvious parts that go with the objectives were not listed for simplicity. However, if you feel there needs to be a feature that needs to be implemented don't hesitate to speak up.

And if any of you know of any documentation, source code, or other information that I should focus on to speed up getting started, please tell.

As for a name for the editor: I was thinking Atlas


Wish me luck ;)


--
Nemo
Oh no, not another learning experience!?
User avatar
Berg
Regular
Regular
Posts: 2204
Joined: 02 Sep 2007, 23:25
Location: Australia

Re: GTKMM Map Editor

Post by Berg »

Feature that is unusable in edit world is the ability to paint a tile map and import it in png or other graphics format it would be nice to have this in your new editor
Your project is greatly needed I feel, for the editor we have is very temprermental.
Good luck with it and if you need anything I can help with I'm glad to help.
NOTE:- I cant code, cant spell, but I have gimp.
:)
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: GTKMM Map Editor

Post by Zarel »

Good luck! We really do need lots of help with getting a new map editor.
User avatar
lav_coyote25
Professional
Professional
Posts: 3434
Joined: 08 Aug 2006, 23:18

Re: GTKMM Map Editor

Post by lav_coyote25 »

i have a few items (over 5 gigs of historical stuff) - if you need to have a look at some of the old things... just ask. :)
User avatar
Nemo
Greenhorn
Posts: 7
Joined: 01 Jan 2010, 10:42
Location: Michigan, USA
Contact:

Re: GTKMM Map Editor

Post by Nemo »

define "historical stuff"

5 Gigs....wow. That's the download limit my ISP gives me per month.

/rant
stupid Verizon Wireless Broadband EVDO policies :evil:
/endrant
Oh no, not another learning experience!?
User avatar
lav_coyote25
Professional
Professional
Posts: 3434
Joined: 08 Aug 2006, 23:18

Re: GTKMM Map Editor

Post by lav_coyote25 »

Nemo wrote:define "historical stuff"

5 Gigs....wow. That's the download limit my ISP gives me per month.

/rant
stupid Verizon Wireless Broadband EVDO policies :evil:
/endrant
from the beginning to now. anything to do with the game. i also helped qamly with testing. i am not a coder... i make maps and docs... as for suggestions to make the editor better yes - enabling the campaign map save portion of the editor.

xD
User avatar
Nemo
Greenhorn
Posts: 7
Joined: 01 Jan 2010, 10:42
Location: Michigan, USA
Contact:

Re: GTKMM Map Editor

Post by Nemo »

lav_coyote25 wrote:from the beginning to now. anything to do with the game.
Thought so.

I'd feel honored to peer into Warzone's past. The question now is how to obtain that colossal collection. Perhaps if you put it on a webserver somewhere and sent me a link. Then I'd borrow my friend's DSL connection to download it.

Thanks in advance if you still wish to share.


--
Nemo
Oh no, not another learning experience!?
User avatar
Zarel
Elite
Elite
Posts: 5770
Joined: 03 Jan 2008, 23:35
Location: Minnesota, USA
Contact:

Re: GTKMM Map Editor

Post by Zarel »

Guide server is always available. If you can send it to me, I'll put it on the server.
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: GTKMM Map Editor

Post by Per »

The first place to start to learn the map format is the map tools. See tools/map in the repository (use trunk).

Also be aware that there are significant differences between 2.3 and trunk in how maps are rendered, due to the new terrain renderer in trunk.
User avatar
lav_coyote25
Professional
Professional
Posts: 3434
Joined: 08 Aug 2006, 23:18

Re: GTKMM Map Editor

Post by lav_coyote25 »

Zarel wrote:Guide server is always available. If you can send it to me, I'll put it on the server.
had a look and found the original source for the editor - was ANY work done on this by any of the devs??? if so its already in the SVN sourceforge. if not i can send you a zip file approx 69.8 MB (73,281,536 bytes) on disk size.
that would be the editworld folder and the editworld folder (wdg only) both are source code.
:3 xD
User avatar
Nemo
Greenhorn
Posts: 7
Joined: 01 Jan 2010, 10:42
Location: Michigan, USA
Contact:

Re: GTKMM Map Editor

Post by Nemo »

Per wrote:The first place to start to learn the map format is the map tools. See tools/map in the repository (use trunk).
Sweet, already have trunk.
Per wrote:Also be aware that there are significant differences between 2.3 and trunk in how maps are rendered, due to the new terrain renderer in trunk.
Does the rendering make a difference in the file structures? If not it won't make a difference as I'm going to write my own rendering engine. My brain prefers to operate in object-oriented mode.

I pretty much only need to learn how the various files are structured and what types and ranges of data are used for what variables. Though anything else that might help me to better understand the formats will greatly improve my coding speed.

--
Nemo
Oh no, not another learning experience!?
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: GTKMM Map Editor

Post by Per »

The file structures are the same. For trunk, there is IIRC a lot of stuff you do not have to worry about that you need to take into consideration for 2.3 to get tiles that look fine side by side each other. Google the mailing list archives for the diorama discussions, or just read the diorama sources for details. Or just learn by trial and error ;)
User avatar
Nemo
Greenhorn
Posts: 7
Joined: 01 Jan 2010, 10:42
Location: Michigan, USA
Contact:

Re: GTKMM Map Editor

Post by Nemo »

**** STATUS UPDATE *****

Hey! So I've got some stuff done on my map editor. It took longer than expected to reach this point due to real life stuff and the difficulties surrounding learning how to add an opengl context to a gtkmm widget.

Current features:

*Make new map from 1x1 to 255x255 tiles
*Load map from .lnd file (not fully implemented)
*Zoom In/Out with mouse scroll wheel
*Pan(drag) map around with left mouse button and drag
*Rotate map around camera focus with right mouse button
*map mesh is displayed in Trunk-style render (vs the classic render)
*terrain textures use the Trunk-style texpages (currently RGB mode only vs indexed color mode)
*toggle view of major and minor grid lines

So I guess you can consider Atlas Warzone 2100 Map Editor (AWZME) currently just a map "viewer" but that will change shortly.

I'm still having trouble determining the correct terrain ground type based on the .lnd file. The only one I have to work with is greatmap4.lnd (4c-greatmap). If you think you know what's going on, or would like to help, let me know.

Check out these screenshots:
The red vertical line is the camera focus.
The Pan Multiplier sets the speed at which you can drag the map around.
As you can see, I still have a ways to go in terms of fine-tuning my layer blending. But it works for now.

-a new 10x10 map with default yellow sand texture

Image

-greatmap4.lnd

-major and minor grid lines
Image

-major grid lines only
Image

-no grid lines
Image

-zoomed out
Image
Oh no, not another learning experience!?
KukY
Regular
Regular
Posts: 1859
Joined: 20 Mar 2009, 21:56

Re: GTKMM Map Editor

Post by KukY »

This is going to be interesting...
User avatar
Rman Virgil
Professional
Professional
Posts: 3812
Joined: 25 Sep 2006, 01:06
Location: USA

Re: GTKMM Map Editor

Post by Rman Virgil »

.

Have you seen Flail13's newly released FlaME - a fully functioning WZ map editor ?

Here:

viewtopic.php?f=5&t=4630

Reminds me of that expression: "Feast or famine..."

- Regards, RV :ninja:

.
Post Reply