So is it impossible to make a level editor?

Community Forums/Monkey Talk/So is it impossible to make a level editor?

sswift(Posted 2011) [#1]
There appears to be no way to save data in Monkey, aside from the game's state as a string in a file you can't control the location of and which could be named anything.

So how are we supposed to make level editors for the games we write in Monkey? Rewrite the game in Blitzmax?


therevills(Posted 2011) [#2]
I made a simple level editor when Monkey was first released:

http://www.monkeycoder.co.nz/Community/topics.php?forum=1047&app_id=47

So once you finished the level, you pressed space and it spat out a huge string which you would copy and paste into a text file ;)

In the full version of Monkey there is the new OS module which works only in glfw and stdcpp, but you can save and load files (instead of just one string).

Last edited 2011


skidracer(Posted 2011) [#3]
New OS module looks something like this so you can just use GLFW target when running the editor version of your game:



If you want storage on other platforms it's worth looking into using 'the cloud', especially if you are designing on desktop and play testing on device.

Last edited 2011


shinkiro1(Posted 2011) [#4]
I asked that question myself and decided to use BMax. I use an existing sprite/entity system I coded in BMax as a backend and export the data to xml -> Which I then read in with monkey. You don't have to really port the whole game to BMax, logic is mostly irrelevent in an editor.

EDIT: Working 1 week, 3 days on the editor and have already implented: selecting, moving, rotating, scaling. I think in about a week I will be finished.

I would recommend using BMax because it already provides you with a gui and a system to take care of events. In monkey you have to code that all yourself which will not only result in longer dev-time but probably in a suboptimal editor, which in my opinion is quite important for a game.

Last edited 2011


GfK(Posted 2011) [#5]
Blitzmax and Monkey are pretty similar anyway, save for a few 'gotchas' that you might come across if you write your editor in Blitzmax and your game in Monkey. First, no Long datatypes, or Doubles. Also, Byte has been replaced by Bool. Finally, there's no stream support for loading the data into your game in Monkey - instead you'll have to load it with LoadString, and parse it from there. No big deal though as you're still parsing a bunch of data, just from a string instead of from a stream.


Wiebo(Posted 2011) [#6]
Yes, I keep using Blitz Max for tool development as well. Why make things hard on yourself?


D4NM4N(Posted 2011) [#7]
Byte has been replaced by Bool.
be careful of that one, you may end up 7 bits short of a picnic!

Last edited 2011


GfK(Posted 2011) [#8]
Aye but I only ever used bytes when I really wanted a boolean anyway!