[Idea] OpenRA MapCreator

An idea for an image importer generating maps

Information and discussion for custom maps and mods.
Post Reply
User avatar
FRenzy
Posts: 268
Joined: Sun Jun 26, 2016 8:00 am

[Idea] OpenRA MapCreator

Post by FRenzy »

The idea
In the objective of facilitating the process of mapmaking, I've came across the idea of a tool that could generate a map from a bitmap image.

The idea was inspired from this 2014 work from "umairazfar" : viewtopic.php?f=83&t=16890
He developed a tool that generates some assets from ASCII code. Unfortunately the Dropbox links to the software are dead. I have no idea how his code works or would work.

But still, let's take this idea further : instead of writing ASCII code, we could use drawing applications (Photoshop, Illustrator, and equivalents), to create small bitmap maps, where each pixel matches a cell in the map.

Of course, the generated map would be coarse and very basic, and manual work is needed from the mapmaker. Nevertheless, the basic structure of the map would be ready, and the needed work would be only polishing and decorating.

Usefulness
The real advantage of such a process is to be able to use all the tools of modern drawing software, without needing to implement them into the map editor. It would include :

- Drawing tools : Brushes (draw surfaces) / Fill / ...
- Measurement tools : Grid / Guides / Measure / ...
- Structural tools : Symmetry / Copy / Rotation / Scale / ...

The latter would be some the most useful functions, as mapmakers often come across the issue of needed symmetry, re-scaling the map, ...

Prototype
Using any software of his choice, the mapmaker creates a bitmap image, of the size of the desired map.
Predefined colors (*need to define a palette, for various software) would match different assets of the map editor, such as :
Resources and mines / Water / River / Cliffs / Roads / Trees / Player spawns / Capturable / ... (non exhaustive list)

For each category, the importer will use the most simple sprite available (cf roads, river, ...). Then, the mapmaker will have to polish it all, and choose the sprites he desires.

BMP image :
Image

Scaled for understanding :
Image

Theoritical result :
Image

(disregard the different capturables : it should be the same asset (Oil Derrick for instance) )
Last edited by FRenzy on Thu May 31, 2018 2:21 pm, edited 2 times in total.

User avatar
FRenzy
Posts: 268
Joined: Sun Jun 26, 2016 8:00 am

Re: [Idea] OpenRA MapCreator

Post by FRenzy »

Oh wait, the idea is already there ... https://github.com/OpenRA/OpenRA/pull/14533 :D
Last edited by FRenzy on Thu May 31, 2018 1:50 pm, edited 1 time in total.

User avatar
FRenzy
Posts: 268
Joined: Sun Jun 26, 2016 8:00 am

Re: [Idea] OpenRA MapCreator

Post by FRenzy »

(reserved for future usage )

User avatar
FRenzy
Posts: 268
Joined: Sun Jun 26, 2016 8:00 am

Re: [Idea] OpenRA MapCreator

Post by FRenzy »

Alright, so I've been able to build SirCake's MapSketchImporter https://github.com/CH4Code/OpenRA/tree/ ... chImporter , works pretty well !

The importer uses color ranges for 13 possible colors, 9 of which are used by default for standard assets.
The color ranges allow to finely choose distinguishable colors. Therefore, I've built a palette of these colors, than can be used in graphics editors :

Image
(EDIT : the standard palette might differ a bit across mods / tilesets. This palette works for the 3 non-interior RA palettes)

I have attached below the palette files (.aco for Photoshop / Gimp, .ase for Illustrator / .gpl for Inkscape). As SirCake stated, Paint's palette should work too. And here
Attachments
MapSketchImporter-Palettes.zip
MapSketchImporter palette files (.aco for Photoshop / Gimp, .ase for Illustrator / .gpl for Inkscape).
(2.26 KiB) Downloaded 242 times
Last edited by FRenzy on Fri Jun 01, 2018 8:50 pm, edited 2 times in total.

User avatar
FRenzy
Posts: 268
Joined: Sun Jun 26, 2016 8:00 am

Re: [Idea] OpenRA MapCreator

Post by FRenzy »

I have been asked how to obtain the MapImporter, here's how I did (compiling steps + some troubleshooting) :

1- Get the code from : https://github.com/CH4Code/OpenRA/tree/ ... chImporter ("Clone or Download", then "Download ZIP", then unzip it)
2- Before compiling, some code seems outdated and might give compiling errors. You need to take the "thirdparty" folder from the bleed version of OpenRA : https://github.com/OpenRA/OpenRA (same steps), and replace it in MapSketchImporter's unzipped folder
3- Then, you can compile as stated here : https://github.com/OpenRA/OpenRA/wiki/Compiling
Basically for Windows :
- Run "make.cmd" and choose the "all" option.
- Run "launch-game.cmd" after compilation.

4- The tool will be then found in the traditional Map Editor in-game.

SirCake
Posts: 393
Joined: Thu Feb 04, 2016 5:40 pm

Re: [Idea] OpenRA MapCreator

Post by SirCake »

Great work on the palettes, Frenzy ! Saves some time on trial and error figuring out if a color matches :)

Inkscape should be the best tool for creating a map, since all shapes can be edited and moved after placing. Its vector graphics, so that might mean its cumbersome at first, but it offers great potential for copy-pasta :)

Did't manage to punch out a SKD/standalone version this weekend, but I'm on it...

User avatar
FRenzy
Posts: 268
Joined: Sun Jun 26, 2016 8:00 am

Re: [Idea] OpenRA MapCreator

Post by FRenzy »

Some quick experiments with MapSketchImporter. Terrain, cities, forests superposed in image software, then directly generated by the import.

Image

Image

User avatar
FRenzy
Posts: 268
Joined: Sun Jun 26, 2016 8:00 am

Re: [Idea] OpenRA MapCreator

Post by FRenzy »

Naval map / DDay idea ... Defenders vs Attackers ?
(using Google Earth + Photoshop only !)

Image

User avatar
KOYK_GR
Posts: 68
Joined: Fri Aug 26, 2011 12:46 pm

Re: [Idea] OpenRA MapCreator

Post by KOYK_GR »

wow! very nice!!

eskimo
Posts: 333
Joined: Tue Jan 17, 2017 9:59 pm

Re: [Idea] OpenRA MapCreator

Post by eskimo »

Nice! Should help with initialising ideas

Post Reply