Community Tile-Based Level Editor? You don't say!

This forum is currently in read-only mode.
1 favourites
From the Asset Store
Hand-animated Sprite Base for isometric game/animation development
  • I've been working on my 'dream game' for the past few months now, and it's been going great - even better than I had expected. Gotta love Construct. However, I realized I'm going to have to make a tile-based level editor if I ever want to see it finished, and for a number of reasons. I'm sure most of you know what they are.

    So I started building one using Mort's example that uses arrays and the text manipulator object. I've made some progress and now have a working level editor with a snap-to grid. You can choose your tiles, flip/rotate them, give them private variables, change collision type, save to/load from files, and the like.

    Problem is, I don't know how practical it's going to be in the long run. For starters, the tiles you can select are actually sprite objects with multiple animation frames as the tiles. I chose to use sprite objects because I have no idea how I'd go about uploading an image and cutting it out into usable tiles, nor do I know how I'd manipulate and give said tiles the properties I mentioned earlier. Using sprite objects seems to be the only way to go.

    That brings up more problems. Because the level editor is a separate application from my game, there's no way to load these 'sprite object tiles' into the game because they only exist in the level editor. I can get around this problem by building the level editor inside my game's .cap, but because you can't transfer objects or layouts from .cap to .cap I'd have to rebuild it for every game I make. Not only that, but like I said earlier - each tile is a sprite object, so if you have too many of them in your level you're gonna get some major slowdown.

    Aside from all that, I'm not sure how I'd go about doing a few things like making a fill tool or selecting/modifying multiple tiles at a time.

    Finally, from what I've gathered there are a lot of people here who are begging for Construct to get a tile-based level editor, or atleast add the option. What's a 2D game maker without one? With all of that said, I propose we put our minds together and make our own. We can start with the one I made, or build a new one from the ground up (I hear using INIs or the S plugin would be better anyway. I'm not sure using mine would be the best way to go either, with everything I've mentioned about it.)

    Not having a tile-based level editor has been the only thing preventing me, and I'm sure a few others, from making all kinds of games. It has in MMF, It is in Construct, and I'm sure as hell not switching to GM or something else with one after spending so much time with the two.

    So what do you think?

  • I love the idea, even tough I haven't been an active user lately, but I'm not sure if you need variables and properties per tile, you could have the tiles as only graphics and a hidden object that actually stores and trigger things, don't you think?

    In another thread, someone posted a python script that was able to load a tile based map made in the map editor called Tilled, but don't remember if that generated map had properties or was only graphics.

  • Yes, this is a great idea. A tile based level editor would speed up the design process for top down and isometric games.

    But as Clud_GL mentioned it, i don't think ist is necessary to assign values and properties to the tiles. Saving and loading as a graphic is enough i think.

  • But as Clud_GL mentioned it, i don't think ist is necessary to assign values and properties to the tiles. Saving and loading as a graphic is enough i think.

    What would you use for this other than a sprite object? Also, if you want to interact with the tiles in any way they're going to need some kind of value. Think about things like terrain types - Your player's footstep sounds will change depending on what type of terrain you're walking on, or certain particles will be made when shooting a certain tile. Maybe some tiles will break when you stand on or shoot them. Some could be tiles that affect the player's movement like ice or treadmills. All of this would have to be added in the level editor too.

    Also, the editor would have to load all of your objects. Enemy spawners, doors, player start position, triggers, you name it. I figured using objects for everything would just be easier, but again, not the most practical approach I guess..

  • You might try begging David to finish the tile object plugin he started. Don't know where that'd get you though.

  • There's vague plans for a plugin that can do tile-based 'painting' of levels directly in the layout editor, but I don't know if it'll make 1.0.

    This was about 2 years ago. -cries-

    I wonder if David even comes around here anymore. Guess it couldn't hurt to ask him. Simply being able to 'paint' some form of tile in Construct's level editor by holding left click works for me.. provided they have some properties of their own.

  • He still comes around. He's a pretty busy guy though.

    Anyway, from what I recall of the alpha version of the tile plugin he made, it was only about half finished and really buggy. You couldn't even import tile sheets yet, I don't think. It just had some random Jazz Jackrabbit tiles as the default tile sheet. You could draw maps with the mouse like you said, and it had some auto-collision layer stuff already. I believe he meant to be able to assign different properties to tiles and such but like I said it was never finished. If he's not interested in continuing it, maybe he could be convinced to release the source so someone else can. It never hurts to ask, anyway.

  • Noticed a lot of posts about editors and arrays lately.

    I think you should probably figure out what functionality you have to have first.

    Like a strip, or single tiles.

    A strip would be fine for an external editor, but not really feasible for importing into construct.

    That is to say unless you use frames, but you have to remember that each frame adds to the total ram each particular sprite takes up.

    50 tiles at 4 frames each... you get the picture.

    Now its been shown that you can use a strip via tiled background, but then again setting up the events for that would be a bit contrived for less experienced users.

    So to me it looks like it should be tiles, but how do you want the editor to act.

    Do you want to click, or do you want to paint?

    Do you want a few basic tiles, or many tiles for corners etc.?

    There's actually a lot to consider, especially when you take into account you may want something somebody else doesn't.

    So what are the absolute basics everybody can agree upon?

  • Well I think all those who want some kind of tile editor want to (in my opinion):

    -to be able to "paint" with the mouse click tiles that are placed orthogonally (like some kind of by default snap to grid), these tiles having the ability to be over or below moving elements/characters/player. Or being able to draw the tiles in the different layers and they fit accordingly.

    -the tiles to be grouped in one "single large image" or "single set of images" where you can select 1 or a few more to do something like a cluster of tiles paint (for example a tree is made of 3 tiles so you can repeat the middle tile to make taller trees, but selecting the 3 tiles at the same time lets you draw many trees doing 1 click per tree).

    I guess this is the most important or basic.

    But Tokimsom ask for tiles that has properties/values in it; making sound per tile can be done by using an invisibles areas below the graphics if you ask me no need for precision there, but a graphical transformation per tile touched can get tricky without per tile interaction...mmmh...

  • Well I think all those who want some kind of tile editor want to (in my opinion):

    -to be able to "paint" with the mouse click tiles that are placed orthogonally (like some kind of by default snap to grid), these tiles having the ability to be over or below moving elements/characters/player. Or being able to draw the tiles in the different layers and they fit accordingly.

    Yeah snap to grid would probably be something everybody would want, but the tiles would still be 4 sided, so iso/ ortho would already be available that way.

    -the tiles to be grouped in one "single large image" or "single set of images" where you can select 1 or a few more to do something like a cluster of tiles paint (for example a tree is made of 3 tiles so you can repeat the middle tile to make taller trees, but selecting the 3 tiles at the same time lets you draw many trees doing 1 click per tree).

    I guess this is the most important or basic.

    Sounds nice, but would require a lot more events than its probably worth.

    But Tokimsom ask for tiles that has properties/values in it; making sound per tile can be done by using an invisibles areas below the graphics if you ask me no need for precision there, but a graphical transformation per tile touched can get tricky without per tile interaction...mmmh...

    Um, yeah you cant really import private variables, or create new objects.

    That's just way too specialized.

    Basically you want it to be as simple as possible, so that everybody can use it.

    But set up so that you can do more if you want.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • [quote:2wdbch4u]Basically you want it to be as simple as possible, so that everybody can use it.

    But set up so that you can do more if you want.

    Yeah I guess it would be best if it's easy and useful for everyone, personally I would like to be able to "draw" big stages using a few tiles easily, and as it was showed in the "platform school" games, using the graphics only as that and below of them having the real physical objects and events, this last part doesn't necessarily needs to be tile based, I think.

  • Well I guess this isn't actually going to happen. There are too many different ways to build a level editor and a single editor won't suit everyone, so. I suppose we can keep this around for general level editor discussion though.

    With that said..It's been established that using sprite objects as tiles is a bad idea. For collision & special tiles they would be good, but definitely not for graphical tiles that serve no purpose but to sit there and look pretty.

    That being the case, what do you think would be the best way to import these 'graphical tiles?' You would need to be able to upload an image, then cut out a single (or multiple) tiles to place somewhere on the editor. How would you go about this? What object would you use for the tile?

    • use TiledBackground object to store the tileset texture
    • change the TiledBackground size and image offsets accordingly to pick the desired tile (for example if you use 32x32 tileset and want to use a tile at 64x32 within the tileset, you set tiledbackground size to 32x32 and image offset to 64, 32 respectively to get the desired tile)
    • set position at desired location, paste into Canvas
    • optional: apply color filter (if you use white tiles, you can get them to be of any color!)

    This is much more efficient than sprites.

  • I also thinked that using sprites seemed a bad idea, but how to select what to tile inside the tiledbackground image object?, and then how to switch from one selection to another easily?

  • - use TiledBackground object to store the tileset texture

    - change the TiledBackground size and image offsets accordingly to pick the desired tile (for example if you use 32x32 tileset and want to use a tile at 64x32 within the tileset, you set tiledbackground size to 32x32 and image offset to 64, 32 respectively to get the desired tile)

    - set position at desired location, paste into Canvas

    - optional: apply color filter (if you use white tiles, you can get them to be of any color!)

    This is much more efficient than sprites.

    Clever.

    However, could you elaborate on that a bit?

    When 'selecting' a tile from the tileset, would you create a whole new tiled background object with the offset to place in the array? We do need to save this data after all. Also, you mentioned pasting into a canvas. I assume this is after loading the tiles who's offsets are saved in the array?

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)