Answer the question
In order to leave comments, you need to log in
How to make a level editor in the game?
I'm making a pixel game and I want to make an editor in it, but how. it is necessary: to allow the player to draw the background, to give the opportunity to set obstacles, copy them, upload their music, upload the level to the network, I will deal with the rest by analogy. Throw off some video or article or write it yourself or something else, otherwise I didn’t find anything myself.
Answer the question
In order to leave comments, you need to log in
Look at the work with the system and
Tipo 's assets
AssetDatabase.CreateAsset(asset, path);
AssetDatabase.SaveAssets();
AssetDatabase.Refresh();
var stream = new FileStream(path), FileMode.OpenOrCreate, FileAccess.Write);
var writer = new BinaryWriter(stream);
writer.Write(anyChar);
writer.Close();
stream.Close();
Show what the level will be (example), determine what will be in it, what objects, background, objects with which you can interact, static objects. Depending on all of the above, you need to think about how you encode information, for example, a map like in a teraria, you can encode it into a text file (the position of the character is equal to the position of the object, its symbol means the type of object) or texture (by pixel position and color) .
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question