Page 1 of 1

[SF2TILED] SF2 Map-making with Tiled Map Editor

PostPosted: Tue Sep 03 2019 11:25pm
by Wiz
This thread will cover progress on a new map-making solution I'm working on : SF2TILED.

Just a bit of context first :
Project SF2DISASM's recent tool SF2MapCreator now provides the ability to create whole new maps from a simple image file.
This opens up the possibilities quite dramatically, as you're now free to use any tool you want to produce this kind of input image.
More details about the image import process in this post :

But while importing existing maps from other games or minor editing could be fun, creating actual new maps from scratch can be tedious, as adjusting simple details like borders and corners can take a long time.

The purpose of SF2TILED is to provide base content, templates and best practices in order to work as efficiently as possible with the most appropriate map editor I could find : Tiled Map Editor.

Tiled comes with a brilliant feature : automapping.
In a few words, you can create a map with basic tiles which represent surface types, and then launch automapping to apply rules to automatically recognize patterns and set the appropriate tiles accordingly : borders, corners, multi-tile patterns, randomized tiles, etc.
More details on how it works here :
My goal with SF2TILED is to provide map templates which will make full use of automapping, to save as much time as possible on managing silly borders and corners everytime you want to create something new.

First iteration of this process : Overworld Maps ! :)
Detailed explanation for those interested :
TL;DR I now have more than 550 overworld automapping rules :excited: and here's what you can do with it :
(images link to whole map export)

- Re-creation of Granseal with base tiles :

- Trigger automapping, and here's the automated result only a few seconds later :

Another example with SF Final Conflict's battle 3 :

Constraints and best practices :
- Mountains and hills require to be setup only with 3-tile blocks, aligned with the block grid. The template maps have specific layers to display block grids in black or white.
- ...
- ...
- ... to complete.
- When importing with SF2MapCreator, make sure to use the original tilesets 101,102,103,104,105. For more advanced purposes you can avoid pre-importing tilesets 101,102,103,104, but tileset 105 contains water tiles, so it should be re-used to make sure water animations still work by pointing to the same tile indexes.
- To test your new map, you can replace an existing map's blocks and layouts, or you can create a new map at index 79 and so on (more on declaring new maps in the disassembly in a future HOWTO thread). Then you can edit the following file to apply your map's index as the first map for a new game :
Line 86 : "move.b #3,d0 ; HARDCODED new game starting map"
Change value 3 to your new map index, build and start a new game.

I'll complete this post with more details on the methodology, and the best practices to keep in mind.
Hopefully at some point I'll be able to create equivalent templates and rulesets for other kind of maps like town and castle environments.
But let's just enjoy this first step for a bit now. Overworld map creation is a lot of fun with Tiled, and I'm sure we can make some real good use of it ! ;)

Re: [SF2TILED] SF2 Map-making with Tiled Map Editor

PostPosted: Fri Oct 04 2019 10:57am
by Stordarth
This is amazing! I wish this had existed 10 years ago.

I've been out of the loop for a long time, do some of the maps still break the rom if you edit them?

Re: [SF2TILED] SF2 Map-making with Tiled Map Editor

PostPosted: Fri Oct 04 2019 2:29pm
by Wiz
Not anymore, thanks to your own detailed research about it, Stor ! :)
Details here :

But in SF2MapEditor, editing an existing map still isn't quite flexible enough in my opinion, as you can rely on the map's existing blocks only. Nevertheless you can still do great things just by arranging blocks, of course, but finer tuning needs tile-level editing.
Now creating new maps from an image file has become a good complementary approach, as you can work on a tile-level from Tiled map editor.

Re: [SF2TILED] SF2 Map-making with Tiled Map Editor

PostPosted: Fri Oct 04 2019 3:53pm
by Stordarth
Good to know my old endeavours proved helpful.

I don't really hack these days, but if you keep developing tools like this, I may have to dip my toe back in.