A comprehensive level creator: Near unlimited size and very fast (V4.7 for 2.70)


2.70 version


I started this project yesterday as a result of a surge of inspiration that led me to have a pretty good idea of how I can create a new implementation of the increasingly creation tool idea. The reason it is so fast is because I decided to bypass the idea of tracking and iterating through empty and full grid cells altogether, in fact it doesn’t even use what would technically be known as a grid implementation, just that the creating object you use moves in a way where it thinks it’s on a grid. The creating object will move in a grid-like fashion and stop at edges defined by the Max X/Y/Z properties.

Now of course, you will notice it has all the basics for grid editing, but what makes this different is that the grid objects make full use of the limited support for global coordinates in the BGE, so each grid cell shown is not a face, it’s actually there from the objects being scaled to where the borders have been defined, this limited ability to use global coordinates also allowed the implementation of static blocks where the texture can go over multiple blocks before repeating rather than one repeat per-block.

This is only an initial implementation though and there’s a number of things that could possibly be done yet like random blocks and saving (which as much as I want it the latter might be tricky to implement),but I’m not sure if I’ll do a lot more work on it. There’s also some minor things that can be resolved but nothing major or game-breaking (except perhaps if you tried to rotate the player in the 2.63 release).

The concept also has a very basic gameplay mode with moving and jumping, it also contains a working implementation of sublists, or the fact that you’ll find some one of the main list items is a sublist which you can iterate through and pick an object with the ‘3’ key. There’s also a toggle to get 4 different scales for each object and a key for rotating the objects 45 degrees.

I’ll also note that the general overview and the controls should be inside the .blend file, though one thing I forgot to mention is that when using the thin floor tile, the N-key can cycle the floor object through various heights compared to the creating object.

In all, I hope some of all of the concepts and code in this serves as something useful for other BGE users who are thinking of or creating creating level designing games and the like, and that was another reason I created this, heck I almost found myself wanting to spend time building with it when I should be getting the initial demonstration done. Heck I was having a want to keep adding features and other new stuff to it but I knew if I kept doing that I would never get an initial version done to post.

Enjoy :slight_smile:

Looks cool- a self creating Blender platformer. Would it be possible to save the layouts once set? It would mean you could swap / save levels and would turn it into a mini Little Big Planet.

I’m more interested in the iteration through a list though, I’m boring like that.

A new version up.


  • -Floor object moved to a new sub-list, which also has two glass pieces, a glass wall and a glass corner.

  • -Integration of the save/load system by Dberube4: His main script did not support saving the scale of the objects so objects that are scaled store a property that scales them on load. Three save slots are also supported, press 8 to save, 9 to load, and 0 to cycle through the slots.

  • -INTERNAL: Did some refactoring of the main script to cut down on code, in general, the creating system uses three different condition types to check if the creating object has an object that it can rotate, scale, delete, or nudge. Originally the use of these conditions were scattered around the code and were slightly different for each operation, this was replaced with a single three part loop that tries to get an object, and then assigns a single variable to that object, this variable was then used wherever possible instead of different variables for different operations. This allowed the replacement of the similar conditional statements with a simple check that made sure the variable did not equal ‘none’ which not only shortened the code, but made it more robust as well as removing most of the minor quirks that were in version 1.

EDIT: Found that there was two issues, one being that the cylinder item couldn’t be deleted and the other was that a rotated floor tile, nudged to a lower height and scaled to the smallest possible size made it impossible to delete. Both were fixed with one being a minor property addition and the other being a small change in the invisible creator object size so as to make the bounding box bigger.

There’s also been the addition of a grass tile in between those fixes.


  • -All items are now grouped in sublists, this also has a architectural significance as well because it allowed for further code simplification and automation in the add object loop

  • -You can now place and delete objects at a much higher rate by holding the Z and X key while tapping the arrows, the work done in the code since version 1 ensures that there’s no perfect overlap between objects.

  • -Physics object added, now you can learn a way to ensure that physics objects have their positions and orientations reset when you go back from play mode to build mode.

  • -Basic player logic has been revamped and moved to Python, the result is smoother movement, the camera in play mode has also been tweaked so it works a bit harder to stay behind the player, I almost decided against moving the logic to Python in this release but logic based purely on logic bricks can get messy rather quickly.

  • -A player complete item has been added, now you can create a finish for your level which takes you back to build mode when the player hits it, currently though, you can place it in the same position as the player start, but that will only result in you completing the level before it starts. This object will also move to the creator position if you place it and it already exists like the player start.

  • -The user can now cycle between a small set of backgrounds for use in their level (which there currently is two in addition to the black, this also uses a property that is saved so levels loaded get their correct backgrounds. Backgrounds can be cycled through with the 4 key

  • -The scale key now makes use of a modifier key (left shift), that allows you to scale an object while centered on the creating object coordinates, can be useful for things like capping cylinders

  • -Keymap tweaks, saving/loading is now F11 and F12

  • -New static items: a tiled cylinder, cap, and a stone block.

  • INTERNAL: Multiple key sensors have been replaced with the method of using a sensor set to all of the keys and using python to get what key is pressed, this in turn sets the value of a string property which in turn allowed for the sensor removal.

Really nice one. This may be handy for me in the future.

Thanks for your effort!

Okay, quick update this time, but that was because one of my internal code changes broke the modifier key use with the scale operation. This time I have refactored that part of the key code (again) with the method that allows you to get key events without a keyboard sensor, this which allows the use of the user pressing multiple keys at once. The method of assigning values to properties when a key is pressed remains more or less the same, except that it is now three different properties as well as variables that store whether there’s no input coming from the keys (which saves a lot of writing).


  • -The scale operation now makes use of a second modifier key (Left Ctrl) that allows you to scale the object in the Z-axis, this can be used for instance to make little physics boxes that go with the big ones, cube objects scaled to the lowest Z-scale can also be nudged.

  • -The rotate operation now makes use of the modifier keys for allow rotation around the X and Y axis as well as Z (which if you didn’t know by now is Left Ctrl and Left Shift)

I’ll let the picture take care of the general description of what’s new.

Yes, you can now store an unlimited amount of levels with custom names as long as they’re in the same directory as the .blend (only limit being how many items you’re willing to iterate through). This means that the original save slots no longer exist because you can now use the instructions seen in the image to save a custom level. Other changes include a number of new objects, icons, slightly improved logic in the gameplay mode, and improved normal maps on object faces containing node materials (which are necessary to allow some the objects to properly use the limited global coordinate functionality).

This version also contains a few fixes to things like Physics objects remembering their rotation after saving and a property mistake in the new keyboard code.

Several days back someone wrote this.

From my testing, I can say for sure now that level sharing may indeed be possible, as my testing indicated the game knew what files were in its directory and thus would open them. This was tested by, among the methods, taking files out to a temp. folder. Now this currently isn’t even close to the flair of Little Big Planet (as it would simply involve downloading .sav files and copying them to the game directory), but it is a start.

One more thing though, you will notice you start with an ‘Init’ file, if you want to save your creations, you have to create your own file or overwrite an existing one, everything in the ‘Init’ file will be deleted on reload or when you quit and restart the game because of the fact that it’s only created on launch and can’t be saved to, it’s only there to ensure the user will always have an empty grid to create on when he wants to start a create a new level file.

EDIT: Posted a new update, turned out the code for filling the file list could’ve used some polish, this fixes the ‘Init’ slot having two places in cases where the directory already had an existing file of that name as well as a small change to ensure it is always the first item in the list.

this cannot be downloaded from media fire. Just a piece of unsolicited advice. I have had major problems for years with getting programs downloaded from free mediafire accounts.

Do you know any other high quality options then, because I looked around various threads in the BGE and a sizable number of the games that aren’t on a personal website use Mediafire, something which a lot of people seem to not have trouble with.

I say high quality options because I don’t want to be directed towards some website that are covered to the brim in ads, have popups, or have a 60 second timer that must count down before the user can download the file.

Once again, I’ll let the picture describe some of it (note the different colors on some objects and the arbitrary grid size)

Among the other changes.

  • -The object placing code has been tweaked, this removes a bug introduced in recent versions where some objects like the cylinder get placed on every other tile while the user is moving and holding down Z

  • -There is now a simple object priority system for the manipulation keys and the delete key, this removes an annoyance where you might want to manipulate an object in the same place as a floor object, but pressing R, S, or X ends up affecting the floor object instead because the object above because the code considered it the selected object. The new object priority system uses different conditions to decide if the object in question should be the selected object despite the actual selectedOb variable choosing a different object.

  • -Ray place and Ray delete tool, this is mentioned in the pic. but this will also work with memory mode and place pre-manipulated objects. This allows the user to place objects directly below the creator if there is already an object there (if you find it doesn’t do anything when a floor object is beneath you, that will be an intentional thing until I find time to allow this while allowing the object to snap to the nearest Z value that is above the object and divisible by 2)

  • -(Not mentioned in the readme), a last minute addition was the ability to use Shift-M to reset the memory for memory mode without having to turn memory mode off and then on again. Also not mentioned in the fact that the grid has a minimum size of 5x5x5, by which you can expand the grid, but not shrink it any further.

  • -Improved detection of walls in gameplay mode which should eliminate the player going through static objects.

I will note that the stroke system for the coloring is not perfect as of now due to the fact that you may have to pres ‘C’ twice to start coloring, but it’s currently no indication of a broken mechanic so it’s not on the highest priority right now.

Took another late night and quite a few more hours poring through code and making sure everything works, and yet there’s still quite a bit more to do, especially when it comes to the gameplay mode.

Amazing stuff! Should be a great help to a lot of people wanting to make platform games.

Just a thought but have you thought about a 2D mode for the game (like Super Mario Brothers)? I don’t know if its outside the scope of your original idea but you could also have 2D blocks (textured on the visible side only), have a Mario style side view camera and/ or movement (its hard to describe, but Mario can instantly face either direction).

Also, what about more advanced scenery like moving blocks, lifts, blocks that fall away when you jump on them etc?

For the gameplay mechanics like moving blocks, I am aware that I have just barely scratched the surface when it comes to gameplay mode because I was mainly focused on the build mode. A 2D mode could possibly be implemented simply through a the use of a 2D mode for the camera and a new grid object instead of having to create an entirely new set of items that can’t be used in the 3D mode. Though as I said before, it would be one feature inside of a potentially very long list of items that could take weeks to get around to, and that assuming I don’t make any use of the Cycles rendering engine as part of the other reason I use Blender, which is art.

I’ll keep it in mind though, though its place on the list could move forward or back depending on what other things may suddenly take priority, which for example there’s been a time I’ve been wanting to focus more on gameplay mode, but then I start seeing the need for the coloring feature, memory mode, the ray-place/delete tool… you probably get the drift by now. :spin:

Also, another change I forgot to mention is that you can now longer do a mix of centered scaling with offset scaling which may move the block being scaled out of your reach, scaling is now a more modal operation where the mode is determined whether or not you hit the left shift modifier when the item scale is one, so pressing ‘E’ to scale after doing one center scale when the X,Y or Z scale for instance will do a center scale until the object X,Y or Z scale is one again. The more modal nature of scaling in 3.5 probably should’ve been done to begin with, because of how it then becomes a more controlled, but higher quality operation.

As usual, the picture showing most of what’s new (been a while since there’s been a gameplay screen)

To note on the squarish objects on top of some of the floor items, those are actually a new thing in this version known as effectors, found in a new ‘game effects’ list (just one object for now). You can use the red effectors to ‘tag’ an object as one that will start to drop about a second after the player comes in contact with it. Right now though you can only tag floor objects, the effectors might also become invisible during gameplay mode in future versions though they’re visible this time around. It’s in part still a somewhat rudimentary implementation in terms that it’s just dumb parenting to the object after tagging, but I will need to figure out how to make a better implementation like making a design that allows them to be visible when blocks are tagged while still detectable by the creating object.

Regardless of that, gameplay mode has been expanded and there’s now some simple mechanics in place, so enjoy. :slight_smile:

Very nice. I know you wrote a long text included with the blend and you have described some of the steps to get this going here. I did get it to run and did make some blocks and flat tiles. But I am still confused about what the “Play mode” is and how to get it up and running. Also how can a save the levels and included them in my own games.

Okay, the slow rate of replies kind-of kept me from checking this thread very much, but now I will get to yours.

In general, you would press the ‘Enter’ key to enter play mode, but you have to add a player start object before it will work, otherwise you will trigger the error text saying that there’s no such object.

Saving and loading the levels using the file provided will only work smoothly if you do it inside the demonstration project itself, so you can’t just save levels inside this file and load them inside a completely different game (in part because it searches the file for objects using the correct name which it may not find in a different game file). This is primarily meant to be a system that one would adapt for use in their own games by merging what is seen here into their projects.

Ace Dragon: PLEASE do not take my comments as a complaint. I think this is a great additon to blender. Right now I am very busy so I do not have time to study and my patience is short. But that is not your fault or the fault of your level creator.

If you’re still in need of a place to upload your files start using dropbox. It’s really convenient and free. You get more space as you invite more friends etc. If you don’t mind I could send you an invite that way I get more space as well. :wink:

This looks really cool, Awesome job yet again :smiley:

AceDragon any update to this for 2.64?

Hi, I’ve been knee-deep in Cycles-related stuff pretty much since 2.63 came out so I haven’t really been doing much in the BGE.

Between Cycles and my other (slow going), BGE projects, I haven’t really found time to really sit down and resume work on this project. In general with these things, I’m either in periods where I’m focusing on my interest in art or my interest in using the BGE, and right now I’m trying to complete another Cycles project.