yairm210 / Unciv

Open-source Android/Desktop remake of Civ V
Mozilla Public License 2.0
8.01k stars 1.51k forks source link

Improvements for the map editor #11784

Open hugo-lezigoto opened 2 weeks ago

hugo-lezigoto commented 2 weeks ago

Before creating

Problem Description

Recently, I have started to build maps and I have seen some improvements that can be done to improve the map editor.

Related Issue Links

No response

Desired Solution

1- an autosave system that save your map by itself every few minutes for exemples

2- an "control z" option to go back and undo the action you just did

3- differents shape of "pencils" when you are placing differents types of terrain, this can be used to create shapes more easily

Alternative Approaches

No response

Additional Context

Sorry if I made english errors in my texts, anyway awsome game, continue like this.

hackedpassword commented 2 weeks ago

Your first idea does seem practical. Think we've been looking for an undo function for a while, might happen one day. As for shapes, that doesn't seem practical since the brush can scale 1-5 tile radius, and you could potentially use another smaller size to carve into a bigger brush. Using combinations of brushes and floodfill you should be able to get the desired result.

SomeTroglodyte commented 2 weeks ago

Map editor already has a long list of to-do's: https://github.com/yairm210/Unciv/blob/master/core/src/com/unciv/ui/screens/mapeditorscreen/MapEditorScreen.kt#L45-L60

... and back then I didn't even bother to write down the undo, seemed too costly to me. Back then the normal game didn't have undo either. Needs either a complete transaction system with rollback-able change descriptors, or a deep clone per undo level -> RAM. Or autosave each mini edit step to disk... Shaped brushes - far too complicated. As you can see I had thought of a "hexagonal copy-paste" brush type...

But the first todo is more important and unless someone deals with that first (and it doesn't seem like a fun pastime to me either atm), I'd vote against any other changes.

hackedpassword commented 2 weeks ago

So is it infeasible to retain the last map click action and pass that back as a forward-motion negation of the same action?

hackedpassword commented 2 weeks ago

Actually, that sounded like a good idea, til loss of tile info wouldn't be restored. Just Gotta Do It Right