microstudio icon indicating copy to clipboard operation
microstudio copied to clipboard

Map Editor Improvments

Open HomineLudens opened this issue 2 years ago • 3 comments

Other that the ones already mentioned in #134 and #50 It would be great have some more capabilities in the map editing.

  • Allow to flip vertical and horizontal sprites when placing tiles, right now we are forced to multiply same assets with different mirroing/rotation
  • Add a bitfield to sprites to mark them a solid/breakable/collectible etc etc. Sort of grouping same kind of tiles to later check against player or entities.
  • Assign a custom tag to specific tile placed in the map (tile at x & y cell) so to retrive it runtime and use as trigger for passages/events/specific behavior

Any suggestion or discussion is welcome to better shape a pivot tool.

HomineLudens avatar Jun 19 '22 21:06 HomineLudens

So like the custom properties in the Tiled Map Editor?
Tiled - Custom Properties

Oh oh, would that require a major rework of the whole Map structure, or would it be just a matter of adding more lists and functions to manage them?

Maybe the option to define a set of custom properties for that map (global for that map) and then the options to set them for each tile (default setting during definition?).

Having different custom properties for each tile and their management might be a bit hazardous =)

TinkerStudio avatar Jun 20 '22 00:06 TinkerStudio

I definitely took inspiration from tiled for the custom property. Flexible but maybe a bit resource hungry.

I believe most of the customization can be injected without breaking existing API due the flexibility nature of JS. I can also say that avoid braking the current API should be a priority for the large amount of doc and samples already wrote.

The request rise from my personal experience when it comes to use the Map Editor to make some games. Right now, out of the quick Engine scenario, it often require a lot of code to track tiles and makes interesting levels. This result in a hard wall for newcomers.

HomineLudens avatar Jun 20 '22 16:06 HomineLudens

Would it be a stretch to suggest that tiles could also store information about the directions from which they could be collided or not? I mean, as in, you could set it to allow moving through it if you walk to the tile from the left, but from the right it blocks you. RPG Maker does this (or at least used to).

I don't know the implementation details, but I presume it can be stored in a few bits. But the interface for this would have to be provided by engine, I think.

For most other things, though (breakable, collectible, etc), I think all that the interface needs to do is allow setting a few arbitrary flags, where the meaning of each could be left for the programmer to decide. Just give people 8 or 16 flags (or whatever deemed enough) and people do whatever they want with them.

if (map tile at position has flag3 on) then 
     make_final_boss_weap()
end

Skaruts avatar Sep 02 '22 16:09 Skaruts