Crayon Physics’ Level Editor Tutorial

logr left a great comment on the original Crayon Physics thread. I was a little afraid it might go unnoticed there, so I decided to post it here. It’s a level editor tutorial.

I did some small editing and added the screenshots, but you really have logr to thank for it. logr also wanted to remind people that there is a level editor available in the first place and there are a dozen user made levels you can already play. logr already has a bunch of them and you can download them from his public box.

Well enough talk here’s the tutorial.

(Note from Petri: The level editor isn’t really all that feature complete, it’s more a developer tool. But that said using it isn’t really all that complicated. It may seem that there are a lot of steps to go through, but most of them are pretty self explanatory.)

Download level editor

First of all, download the level editor pack (it’s in the June archive, top of the page), then unzip the files.

Now you have a choice to make. You can unzip the files to a new directory or you can unzip and copy them to the same folder where Crayon Physics (“crayon.exe” and the dll -files) is located.

If you copy them to the Crayon Physics folder, then you can more easily test your levels.

But if you unzip them to a separate folder, it’s easier to manage and to observe how the editor works. I recommend you to unzip your files to a separate folder.

Creating a level

Then you should think about your level : just draw the main parts (the ball, the star(s) and the walls) on a paper sheet. Don’t pay attention to any background now, for the editor really doesn’t care!

A screenshot what you should see when you start the level editor

Now you can start the “Crayon editor.exe” file. You should see something like in the screenshot above. You’ll first have to name your level ( “data/levels/test.xml” is perfect, since you’ll be able to change everything when done with the editor). The editor will ask something about creating new level, just answer yes.

A screenshot what you should see when you're in the editing mode

When you are faced with the black screen (like the one in the shot above) push S to register your level (S saves the level).

(There is one bug I came across: when closing the editor and re-opening it, it seems the editor doesn’t remember the file (when you are to name your level). When it says to create a new one, just answer yes. You’ll get to the black screen with the white lines, provided you haven’t forgotten to push S before closing the editor.)

Here’s a description of the shortcut keys

Drawing with your left mouse button down will create a “free” object (it’s the same as the game)
Holding left shift down and drawing (while left-clicking, of course) will create a “static” object (which I call a wall)
Z adds the ball
X adds a star
S saves the level
L loads the level

Now that you know the shortcut keys, just draw your level (don’t mind the black/white colors until you’re done with the editor). Remember to push S when you’re done.

A screenshot the level I made

Testing your level in the game

You should now have at least two new files in the data\gfx folder : the bmp and the xml files. There will also be a xml file in the data\level folder.

If you’re working in the same folder where “crayon.exe” is located you can skip this next step.

Copy the files from your gfx -folder to the data/gfx folder of Crayon Physics. Also copy the xml file from data/level folder to Crayon Physics’ data/level folder.

In order to test your level in the game you have to edit the “data/level_list.xml”. You can do with your notepad. Just open the file and change the line that says:
<Level completed="1" filename="data/levels/level_01.xml" position="1" >
to this:
<Level completed="1" filename="data/levels/test.xml" position="1" >
of course in the place of test.xml put in the name of the file you gave for your level. And remember to save the file.

(You don’t have to put the level as your first level, but you can extend the number levels you have at your disposal. Just add the level before the the_end.xml. And remember to increase the position numbering.)

Then start crayon.exe

A screenshot my level in the game

You should see the level you created in the editor (with the black background and all).

To change the backgound

NOW, you can add your own background (the black one is kind of dark…) and your own walls (instead of the white lines). So here is what you’ve gotta do :

-First of all, create your background and save it as a bmp files (give it a different name than the first bmp file)
-then open the 2 files with Paint.
-push ctrl+I in the first file to exchange black and white, then ctrl+A.
-Paste it on your background using the “transparent paste” (I don’t know how to put it in English).
-On your background, you should now have black lines (boxes) covering it.
-Just fill the black boxes with anything you want to get your own platforms.

Now you’ve got it! Just save and rename your background so as to replace the black/white background.

All that is left to do is test it again with the new background and have fun playing it.

(I suggest you zip your files and send them to Petri Purho to show your creations)

(Note from Petri: I’d love to see your levels, but you should also thank logr for all the work he’s done for Crayon Physics)

23 Responses to “Crayon Physics’ Level Editor Tutorial”

  1. Kloonigames » Blog Archive » Just a quick note before the next game Says:

    […] Update September 13th, 2007: There is now a great tutorial on how to use the level editor writen by logr. You can read it here. […]

  2. Aidan B Says:

    Hrm…when I use it, the white lines don’t even show up as white lines…

    And you’re download for the level editor is broken…

  3. Steve Says:

    OK, I am trying to keep from being too stupid, but where did you get the paper background? Is there a blank to use? Also, how do you get the crayon effect on your blocks when editing new levels?

  4. cama Says:

    Thanks for editor , i preparing my own level pack hope will be ready soon .. here video link from one from levels

  5. cama Says:

    Pack ready if any interested here download link

    You can watch levels trailer here :

  6. probabler Says:

    do cama – miło spotkać tu kogoś z naszego kraju- DZIĘKI za level pack.”uzbierałem” około 50 leveli do tej pory.BTW have You EVER heard about “zaczarowany ołówek?” 😉

  7. rachel Says:

    I’m so cunfused on the second part… testing your level…
    oh jeez, i’m a dumb ass lol.
    can somebody explain that to me?

  8. probabler Says:

    (@ Petri Perhu) AND (all superb people here)
    level for CRAYON PSYCHICS – sorry for misstyping 😉
    LEVEL ONE : “just do NOT believe Your eyes”

  9. Simulatore di fisica 2D | BigThink - Idee dal web: gadgets, risorse webmaster, tutorial, programmazione Says:

    […] inoltre disponibile un editor di livelli col quale creare le proprie scene o caricare i livelli fatti da altri. Lo sviluppatore sta inoltre […]

  10. Timmy Says:

    the levels dosn’t show up, i did save it

  11. Aaron Says:

    Is there an easy way to alter the Load Menu so you can click and quick load created levels without having to change the old ones?

  12. Mucos Says:

    I love crayon

    Crayon Games Super

  13. unupyiffixemn Says:

    Take, it is here…

  14. noxusrules Says:

    GREAT GAME I can’t wait for the Dexule version, when is coming out?

  15. Crayon Physics « - Scrapbook Says:

    […] es dir das Minispiel gefällt gibt es eine gute Nachricht, nicht nur das es auch einen Level-Editor für die eigene Kreativität gibt, “Crayon Physics” ist nur ein Prototyp. Die […]

  16. rate mypusy Says:

    gr8 resrch bro

  17. click the next page Says:

    click the next page…

    Kloonigames » Blog Archive » Crayon Physics’ Level Editor Tutorial…

  18. Says:…

    Kloonigames » Blog Archive » Crayon Physics’ Level Editor Tutorial…

  19. online casino no deposit codes 2013 Says:

    online casino no deposit codes 2013…

    Kloonigames » Blog Archive » Crayon Physics’ Level Editor Tutorial…

  20. reverbnation widget hits Says:

    reverbnation widget hits…

    Kloonigames » Blog Archive » Crayon Physics’ Level Editor Tutorial…

  21. relevant web site Says:

    relevant web site…

    Kloonigames » Blog Archive » Crayon Physics’ Level Editor Tutorial…

  22. Recommended Browsing Says:

    Recommended Browsing…

    Kloonigames » Blog Archive » Crayon Physics’ Level Editor Tutorial…

  23. Kloonigames - Says:

    […] a truly great game in my opinion. Also download the Extra levels and the Level Editor (also see this posting for a tutorial on how to use the editor). Another game I like is Pluto Strikes […]