Custom Level Editor?

This forum is currently in read-only mode.
From the Asset Store
Allows players to create their own levels/maps, save and load them.
  • I am considering building a level editor, and I was wondering if anyone has any suggestions as to what objects or methods might be worth looking into. To be a bit more precise, I am looking to build a level editor that has the following characteristics.

    1: Supposing that I built a game that included this hypothetical level editor, an end user should be able to build a level from within the game application, rather than Construct. (This may be obvious, but I just wanted to clarify what I meant by "Custom Level Editor".)

    2: From the game application, I would like to be able to save and load level files.

    3: A level file should be able to store object instance xyz positions, as well as private variable values.

    As far as I can tell, the main options I have for storing level data are the Text object, the Array object, the Hash Table object, the INI object, and possibly some strange usage of the save /load game actions. Of those, I'm leaning towards the Hash Table object at the moment, being that it's far faster to read from and write to than an INI, and will likely be significantly more flexible than an Array or the save/load actions, in terms of what I can store and how I can store it. Obviously there are drawbacks as well, and so before spending a lot of time on it, I figured I'd see if anyone has any advice or suggestions.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Honestly I use .ini files along with level editing saving and loading I use hash tables as a varible container for each object that needs pvs because they are easy to set up at runtime. I also made a plugin that makes for easy loading back in for the .ini file and recently modded it to be able to load values into a hash table attached to an object as long as they are in containers.

    the problem with hash table it there is no way to easily Identify the object unless you did something like 1name = sprite1 1x=36 1y=24 1z=3 wich could get tedious especially if you wanted pvs to be loaded as well.

    with an .ini file every thing is grouped nicely and easy to go load and loop through.

    [1]

    oid=1

    x=34

    y=36

    z=3

    a=130

    speed=160

    range=30

    all those values are easily loaded into the runtime with one event

    -foreach group- create object (ini.currentgroup,oid), at (currentgroup,x), (current group y) on layer (currentgroup, z) at angle current group,a.
    --for each Item 
    --current item =/= a,x,y,z,oid-> hash table insert key STR(currentItem), with value ini.value(currentgroup, current Item)[/code:l2poat0l]
    
    Thats pretty close the the sytax I just got off a 12 hour shift at work I have a cap where I tested this and it worked perfectly ill see if I cant dig it up for you ( you would need to install my plugin though)
Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)