how do i Create a map editor that shares users creation?

0 favourites
  • 5 posts
From the Asset Store
Fully commented source code/event sheet & sprites to create a space shooter game
  • Hello everyone, i already build a map editor but would like to know if there is a way to let the users share their creations???

  • It's a little involved, but quite doable. You serialize objects using the asJSON expression, which basically turns an object into a string. You can then put all the JSON strings into an array, then JSON the array, which give you one long string that represents the entire level. You can put this big string into a text file, or upload it to a database somewhere for sharing.

    To get your level back, get that string back form the text file or database, then create an array and setFromJSON. Then, for each item in the array, create an object and setFromJSON on that object, using the text from that point in the array. You may need a separate array to remember what type of object you need to create. Keep doing this and popping the strings out of the array until it is empty

  • @ thanks

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • ok i just realized that i have no idea of how to do that :v

  • Start with figuring out how to save and restore one type of object from JSON, and go from there. All the rest builds on that

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