Quick Links: Download Gideros Studio | Gideros Documentation | Gideros community chat | DONATE
Non-tiled map editor — Gideros Forum

Non-tiled map editor

totebototebo Member
edited October 2017 in General questions
Hey,

I need a level editor that can place objects in arbitrary positions and export to JSON or similar. I keep coming back to Tiled, though, which has support for this. But it feels like it's the wrong tool, since you also have to have a tileset, which I don't need.

Does anyone know of a level/map editor that allows free placement of objects?

Cheers,

Niclas
My Gideros games: www.totebo.com

Comments

  • Alternatively, has this code for Tiled support in Gideros been updated to support Object Layers and arbitrary positioning?

    http://giderosmobile.com/forum/discussion/699/using-tiled/p1
    My Gideros games: www.totebo.com
  • piepie Member
    edited October 2017
    I don't know if that code has already been updated, "my" version is not because I didn't need it yet.
    However reading lua exported tiled maps is not too hard: you could ignore tilelayers and parse only the objectgroups.
    I made a dummy map with an empty tileset and 3 icons randomly placed in a object layer:
    this is the relevant part of the lua file.
     
      layers = {
        {
          type = "tilelayer",
          name = "layertile 1",
          x = 0,
          y = 0,
          width = 20,
          height = 20,
          visible = true,
          opacity = 1,
          offsetx = 0,
          offsety = 0,
          properties = {},
          encoding = "lua",
          data = {
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
            0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
          }
        },
        {
          type = "objectgroup",
          name = "actors",
          visible = true,
          opacity = 1,
          offsetx = 0,
          offsety = 0,
          draworder = "topdown",
          properties = {},
          objects = {
            {
              id = 1,
              name = "",
              type = "",
              shape = "rectangle",
              x = 232,
              y = 144,
              width = 32,
              height = 32,
              rotation = 0,
              gid = 1,
              visible = true,
              properties = {}
            },
            {
              id = 2,
              name = "",
              type = "",
              shape = "rectangle",
              x = 184,
              y = 184,
              width = 32,
              height = 32,
              rotation = 0,
              gid = 1,
              visible = true,
              properties = {}
            },
            {
              id = 3,
              name = "",
              type = "",
              shape = "rectangle",
              x = 400,
              y = 192,
              width = 32,
              height = 32,
              rotation = 0,
              gid = 2,
              visible = true,
              properties = {}
            }
          }
        }
      }
    as you can see for each element in layers there is a type to use as filter, and each element in type "objectgroup".objects have its properties ready to be used.

    take a look at tiledmap.lua in this archive, I am sure that with some if then and cut&paste you'll get what you need, and maybe it's the time that gideros gets a full featured support of Tiled maps
    http://giderosmobile.com/forum/discussion/6948/tilemap-object-and-tiled-tile-flip/p1
    ;)
  • It's easier to use a utility like this and have a routine that figures things out OR build a secret editor into the game.
    Coder, video game industry veteran (since the '80s, ❤'s assembler), arrested - never convicted hacker (in the '90s), dad of five, he/him (if that even matters!).
    https://deluxepixel.com
  • Thanks guys. Yeah, I also think Tiled is the best way to go. Was hoping someone had done this before, because I am very very lazy. Now I need to do some actual work!
    My Gideros games: www.totebo.com
  • hgy29hgy29 Maintainer
    Actually I did it for 'Arthur', but I am afraid it isn't generic enough to be sharable...
  • Tiled is the best way to go. As others have said, just ignore tile layers and you will be fine.

    Likes: totebo

    +1 -1 (+1 / -0 )Share on Facebook
  • @hgy, I suppose that's the issue. The use of those type of objects can be anything. I'm going to load specific RUBE JSON files for each object. Which is probably a tad unusual. :)

    Likes: antix

    My Gideros games: www.totebo.com
    +1 -1 (+1 / -0 )Share on Facebook
Sign In or Register to comment.