Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Create ingame map / prefab editor #199

Closed
15 tasks done
rm-code opened this issue Nov 7, 2017 · 1 comment
Closed
15 tasks done

Create ingame map / prefab editor #199

rm-code opened this issue Nov 7, 2017 · 1 comment

Comments

@rm-code
Copy link
Owner

rm-code commented Nov 7, 2017

After playing around with tons of different editors and file formats I think the best way to add new map content to the game is to write an ingame editor.

  • First of all there would be no need for any conversion between external formats and the ones used by OTR (plus any mapping to actual content).
  • With a custom map editor we can directly load all tile and worldobject templates we have in the game and use them to create new content.
  • We can also easily add special information (like road alignment Rotate prefabs so they face nearby roads #186)
  • It would also be easily accessible by players and modders later on

TODOs

  • Screen with grid and camera
  • Draw Mode
  • Fill Mode
  • Erase Mode
  • Different cursor sizes
  • Different canvas sizes
  • Hide object layer on keypress
  • Highlight layer if type is selected (make other translucent?)
  • Tab between select lists
  • Layout grid resizable
  • Show cursor mode, selected brush, brush size, grid size on UI
  • Custom names
  • File loading screen ... scrollable

TODOs Refactor

  • PrefabCanvas

FIXME

  • EditorLoadingScreen has still normal input
@rm-code
Copy link
Owner Author

rm-code commented Nov 13, 2017

Layout files

layout = {
    id = 'layout'
    mapwidth  = 6,
    mapheight = 6,
    prefabs = {
        XS = {
            {
                x = 8,
                y = 2
            },
            {
                x = 3,
                y = 6
            }
        },
        S = {
            -- ...
        }
        -- ...
    }
}

Prefab files

prefab = {
    id = "test",
    size = "XS",
    height = 8,
    width = 8
    grid = {
        {
            worldObject = "worldobject_lowwall"
            tile = "tile_soil"
        },
        -- ...
    }
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant