aliens

Author Topic: tiled (mapeditor.org) as tool for designing maps  (Read 12812 times)

Offline werty

  • Sergeant
  • **
  • Posts: 16
    • View Profile
tiled (mapeditor.org) as tool for designing maps
« on: May 22, 2014, 07:42:48 pm »
Hi.
I was looking for user-friendly mapping tool for openxcom and found nothing.
I've found tiled is very simple and sufficient for designing isometric maps.
Want to change tiled to support reading and writing maps to openxcom files.
One of core problems I already solved - added "level" attribute to TileLayer and now it supports tile height
I know I can reverse-engineer C# code of mapview to get results, but not sure if it would be fast enough to not to loose motivation.
If someone interested in contributing to this beginning, please let me know here.

Offline Warboy1982

  • Administrator
  • Commander
  • *****
  • Posts: 2333
  • Developer
    • View Profile
Re: tiled (mapeditor.org) as tool for designing maps
« Reply #1 on: May 23, 2014, 02:42:18 am »
the trouble i'm guessing you'll face is that all the map data is stored separately from the maps themselves, the graphics, and the AI nodes for pathing. structure is somewhat similar to:

[.MAP File]
contains (L*W*H) tile entries, each with potential references a floor, a north wall, a west wall, and an object.

[.MCD File]
numeric data table, 61 bytes per entry. floor/wall/object references in the map file refer to entries in these files. MCDs also contain references to corresponding .PCK/.TAB files with the terrain sprites. these are referred to by the map sequentially based on file order.
also contains references to scang.pck for the minimap sprite and loftemps.dat for the 3d representation of the object.

[.RMP File]
a database of nodes on the map, containing info on unit spawn positions and patrol destinations. generally used by the AI to make its way around the map before XCom is discovered.

Offline LCSand

  • Captain
  • ***
  • Posts: 73
    • View Profile
Re: tiled (mapeditor.org) as tool for designing maps
« Reply #2 on: May 23, 2014, 09:59:04 am »
Hi.

So you hacked tiled to support multiple levels above each other?
Good work, that was the main obstacle to it being useful for the xcom/ufo games.

https://www.ufopaedia.org/index.php?title=MAPS
https://www.ufopaedia.org/index.php?title=MCD
https://www.ufopaedia.org/index.php?title=TERRAIN

That said the old xcom format is very limited and it might again be time to think about a new format for post 1.0 time.
Might even be based on the native tiled format(xml based).

If you need help I could write a converter in either c/c++ or python, when I have a little more free time.

Offline werty

  • Sergeant
  • **
  • Posts: 16
    • View Profile
Re: tiled (mapeditor.org) as tool for designing maps
« Reply #3 on: May 23, 2014, 07:26:48 pm »
tiled is a opensource project in qt, I just added some code to support level height in px for map and lvl number for TileLayer. Additionally made some fixes to proper drawing.

Offline werty

  • Sergeant
  • **
  • Posts: 16
    • View Profile
Re: tiled (mapeditor.org) as tool for designing maps
« Reply #4 on: May 23, 2014, 07:30:03 pm »
This is a very good idea to create new map format, as using old xcom format for modding is like animating zombies from dead bodies. Can we discuss somewhere new format? I can develop it instead of making reader and writer for tiled, it would be much easier.

Offline Angelus_EV

  • Colonel
  • ****
  • Posts: 181
  • Trust no one
    • View Profile
Re: tiled (mapeditor.org) as tool for designing maps
« Reply #5 on: May 23, 2014, 08:06:40 pm »
This is a very good idea to create new map format, as using old xcom format for modding is like animating zombies from dead bodies. Can we discuss somewhere new format? I can develop it instead of making reader and writer for tiled, it would be much easier.

+1

Online Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: tiled (mapeditor.org) as tool for designing maps
« Reply #6 on: May 23, 2014, 09:41:47 pm »
First feature I would like to see is 4 walls supported by this new format (and in OXC).

Offline LCSand

  • Captain
  • ***
  • Posts: 73
    • View Profile
Re: tiled (mapeditor.org) as tool for designing maps
« Reply #7 on: May 23, 2014, 11:26:57 pm »
Well you can just discuss that here in the forum maybe create a new topic for that.

A new tileset format would be needed then as well I think.
And for example by changing from pck to png(already supported by oxc anyway) we could get rid of the pallete problem.

Lets gather a bit of input from everyone first: What file formats could use an overhaul and what should the new formats acomplish/handle?

Online Yankes

  • Commander
  • *****
  • Posts: 3194
    • View Profile
Re: tiled (mapeditor.org) as tool for designing maps
« Reply #8 on: May 24, 2014, 12:48:57 am »
removing palettes introduce new problems :> color shift relay on palette index.

Offline werty

  • Sergeant
  • **
  • Posts: 16
    • View Profile
Re: tiled (mapeditor.org) as tool for designing maps
« Reply #9 on: May 24, 2014, 01:34:12 am »
Can someone provide me sample xcom tileset for general purposes? PNG format preffered.

Offline werty

  • Sergeant
  • **
  • Posts: 16
    • View Profile
Re: tiled (mapeditor.org) as tool for designing maps
« Reply #10 on: May 24, 2014, 02:38:34 am »
tiled multi level view screenshot

Offline LCSand

  • Captain
  • ***
  • Posts: 73
    • View Profile
Re: tiled (mapeditor.org) as tool for designing maps
« Reply #11 on: May 24, 2014, 06:43:23 am »
removing palettes introduce new problems :> color shift relay on palette index.
You mean for lighting and stuff?
How did the ufo2000 guys do that?
But I do not object to palettes in general just the use of different ones and the problem that arises when you try to mix them.
Does xcom always use the same palette for battlescape? Or can they be tileset specific?

Offline LCSand

  • Captain
  • ***
  • Posts: 73
    • View Profile
Re: tiled (mapeditor.org) as tool for designing maps
« Reply #12 on: May 24, 2014, 07:34:06 am »
Can someone provide me sample xcom tileset for general purposes? PNG format preffered.
This is for ufo2000 but it should be what you are looking for.
https://www.xcomufo.com/forums/index.php?showtopic=242025394

Offline Solarius Scorch

  • Global Moderator
  • Commander
  • *****
  • Posts: 11408
  • WE MUST DISSENT
    • View Profile
    • Nocturmal Productions modding studio website
Re: tiled (mapeditor.org) as tool for designing maps
« Reply #13 on: May 24, 2014, 02:32:09 pm »
I understand the hypothetical new editor would include a converter of the old UFO/X-Com format, right? Yuo wouldn't have to make all maps again from scratch?

Offline werty

  • Sergeant
  • **
  • Posts: 16
    • View Profile
Re: tiled (mapeditor.org) as tool for designing maps
« Reply #14 on: May 24, 2014, 10:45:19 pm »
I understand the hypothetical new editor would include a converter of the old UFO/X-Com format, right? Yuo wouldn't have to make all maps again from scratch?
The best solution for this to create converter and do the batch conversion so all old maps would be available in new format