Runtime level editor, where to begin? 2/3d

hello unity folks. this is prob a very broad and general question but

i want to create a Runtime level editor for the company i work for atm. or rather as a intern.

it’s fully 2D mobile game. And what i have given some thought on so far is

  • Node system,
  • Fully integrated Simple scripts to apply on game objects. like moving, saying stuff etc.
  • type of graphics, tuned to young people in the range of 3-6 year’s old.

i have so far also created a inventory system to hold the items.

now i like to know what i should be careful about if it’s something that can be said before its done even.

any tips are extreamly helpful and i will be grateful for any of em

JSON is a handy way to serialize stuff, plus you can pull it up in a text editor and debug what is going wrong, as well as easily make custom blobs of data with a text editor, then load them.

As for enums, don’t use them when you serialize. Just DON’T. Trust me. Unity and JSON in general will serialize them as a simple integer, and then in the future if you reorder your enums (add new ones, delete old ones) all your data will be just flat wrong, and that will be a hard bug to track down.

Not only that, seeing that a potion is “type”: 22 is not nearly as useful as “type”: “poison tree sap”.

Use strings instead, and don’t be afraid to make them nice and meaningful to you because YOU will be the one in there debugging it.

As for other tips, start small. Writing a level editor alongside a game is a task that rapidly balloons out of control if you aim for the stars. And by small I mean, make the first version require a reference to one of your existing levels, and then make an editor that (for example), changes the player spawnpoint by a little bit, or turns the sky yellow, or whatever. Start small: until you get a feel for what is involved in driving it with data this way, you won’t know the best way to go.

1 Like