Well, I'm still trying to make the website look pretty, but letting you know how to make your own maps is possibly the second-most important purpose for the website (after the most important: Letting you download the game!). So there should definitely be a tutorial here.

Luckily, making a map for The Open Engine is pretty easy, and anyone with a bit of computer know-how can do it. It will be much, much easier (and prettier!) in the future to make things for The Open Engine, but for now, just go get Blender, a free 3D program. Create the map in it, and put in a cube which you give a constraint called "Action" (you can find out how to add constraints in a Blender tutorial. It's very easy). Change that constraint's name to "1". That's the player's starting point. Create an object called "_scene" (remember the "_"!) and parent everything except lights and camera to it.

Now, download this text file and copy its content into a text window in Blender (to open a text window in Blender, just google a tutorial. Again, it's a very easy thing to do). Run it as a 'script'. It produces a bunch of files that you just copy into a folder with your game's name, in the "Games" folder inside "Library" (the folder next to the file you start the game with).

Finally, go into the file called "games.sav" in the "default" folder inside "Library". Open it with Notepad and add your game's name to the list.

Congratulations, you're done!

No, seriously; that's how a map is created. It's not even worth making a big tutorial about, at least not until it becomes more complicated. There are a few things you need to look out for, though, and if Blender says there is a problem, or if your map looks weird when you start the game, you may need to check for these things:

1. The Open Engine only handles triangles, and Blender handles many other shapes. So when you're done with a model, simply press "A" until everything lights up (i.e. once or twice), and then press "Ctrl+T". Blender will automatically turn everything into triangles. If you forget to do this, you'll get weird triangles going everywhere inside the game, because The Open Engine is trying to draw complex figures as simple triangles, which it sadly can't.

2. Your Blender file, the folder for your game (inside "Games") and the name in the "games.sav" file must all be precisely the same, or The Open Engine cannot find it.

3. Make sure the line with your game's name in "games.sav" is the last line, with no empty line beneath it. It usually just causes an empty game option to show up in the menu, but better safe than sorry.

4. Remember to parent all game content to the "_scene" object in Blender. Anything not parented will simply not show up (which means you can have tons of extra stuff in the Blender file that does not go into the game. This can be helpful when experimenting!).

5. Every model that gets used in the game must have a "material", a "texture" and "UV coordinates" inside the Blender file before you run the script. These things are easy to add, but also easy to forget. The text file you run as a 'script' will report errors if anything does not have these things. In the error window (the "System Console"), you can see which model it was trying to export when things went wrong.

6. You can rotate objects in Blender and they will be rotated in the game, but there are two things to note: Firstly, anything rotated in Blender needs to be set to "Axis Rotation". Google it, it's simple but may be hard to spot. Second, when you do so, there seems to be a bug in Blender, and rotated things may spin and deform weirdly. Usually, you just need to set the Axis Rotation of Y to 0.0 for the object in Blender, because it jumps for some reason. This sounds insanely complicated, but it isn't; it's just really annoying. If you can, don't rotate objects. Instead, change the model, by rotating all the little points (vertices, or "vertexes") that it is made of. Yes, this is a really frustrating problem, and it has a high priority for changing the way things are created. I found out about it too late myself :-(

7. Blender has a weird way of handling deleted objects, which can cause problems for the script. If there is an error that is not immediately obvious to fix, try saving the Blender file and opening it again, maybe even two times. This is something that, sadly, is hard to fix, because it is just how Blender works.

Again, this is the earliest version of The Open Engine, and this way of creating content is just something that got put together to get things started. Future methods will be easier, prettier, and better explained. But for now, at least this will let those who can handle a bit of chaos create pretty much any map they want for the engine!

Advanced Stuff!!


Yeah, that map above? That's the easy stuff. You can do more things with The Open Engine already!

Note that before starting on anything more advanced, you should get at least one, at best a few maps made that work. The advanced stuff is not made in a different way; it builds directly on the basic stuff. So let's go!

The most important thing in making more advanced stuff is that Action constraint mentioned earlier. Notice how you changed its name to "1"? That tells the engine that this is a "type 1 object", which means it's the player. Anything without a constraint like that becomes type 0 objects, which just means scenery that you cannot interact with (except that you run into it). But there are other types:

Type 2: Items that you can pick up, but that do nothing else.

Type 3: Things that can be moved by clicking on them, like opening and closing a drawer. This is a bit difficult to make, so if it's not your thing, just go onto the next type. Otherwise: Create an object in the Blender file called "_tech", and don't parent it to "_scene". Now create the object you want, and parent it to "_tech" instead of "_scene". Create an armature with just one bone, and animate that bone. For the time being, the engine can only read animations that move the bone, not those that rotate it. Parent the armature to the object you made (note that this is the exact opposite of what you'd normally do in Blender!). Now create a copy of the object and put it where you want it in the scene, and parent that to "_scene". Give it the Action constraint, but rather than changing the name, set the target to be the object you parented to "_tech". The Open Engine will now read that last object as a version of the one with the armature attached, and if clicked in the game, it will perform that animation. Note that Blender has a funny way to store animations sometimes, and you may need to make the animation different than you think to make it work; experiment! Also, anything parented to the copy (use "Parent and keep transformation", or the object goes off God knows where!) in the scene (the one you parented to "_scene") will disappear and appear as you toggle the animation in the game. This is because it was designed for closing drawers and such, which hides the attached objects.

Type 4: The object is now a car! Create an object and place it where the driver sits, then parent that object to the car (again, use "Parent and keep transformation", or the object goes off God knows where!). The object will never be visible, it just tells the engine where to put the player if he/she uses the car. Note that the cars wheels and all other things must be part of the same model; they cannot turn yet!

Type 5: The object is a gun. Point and click to fire. That's pretty much it.

Type 6: The object is a workbench. Create a small object and parent it to it (again, use "Parent and keep transformation", or the object goes off God knows where!). Then create a number of small objects and parent them to the former small object in the same way. When the player puts things on this workbench, those small objects are where things will be placed. None of the small objects can be seen in the game; they just tell the engine where stuff goes. For recipes, see below. Even without recipes, though, this lets the player put things on other things in a way that can be experimented with. Maybe a christmas tree that decorations can be put on? Then wait to see pictures online of people hanging cars and chainsaws on it!

Type 7: It's a grappling gun. Not much more to say. Enjoy!

Type 8: It's a button. Create something and parent it to the object ("Parent and keep transformation"!). When someone presses the button in the game, the parented thing will appear or disappear. Currently, it will also end the game, with the "Billy" end screen. Work is still needed.... But it can still be fun, maybe?

Type 9: The object flashes, disappearing and reappearing constantly.

Type 10: The object does nothing itself, but if the player touches it, it does damage. Lava, cacti, fire, take your pick!

Type 101 (yes, 101): The object will shoot at the player of it can spot the player. These "hostile mobs" do not yet hunt the player, though...

Level of Detail (LoD)


Level of Detail, or LoD, is a way to make things only look detailed when the player is close enough to actually see them. It saves a lot of work for the computer, and therefore allows very big games with little pressure on the computer. The LoD in The Open Engine is still very primitive, but it's there.

Any type 0 object (even if you don't actually give it the Action constraint; the engine will do it for anything without a type) can be made to become something else when the player gets close. Simply parent whatever it becomes to the object, and the engine will know to switch in the parented things when the player comes close enough, and switch back if the player moves far enough away again. Any type 0 object can have many things parented that way; once the player gets close to that painted box that is supposed to be a coffee shop, maybe the box becomes both the shop, tables outside, and so on. And if parented right, this more detailed shop might become shelves and counters and lots of little items once the player gets even closer! Things parented like this can even be of other types; maybe when the player gets close enough, there is a gun on the counter in the store! (more things cannot be parented to the gun for LoD, however; it only works for type 0 things!)

The trick is the phrase "close enough". Every object seen in the game has a boundary, and that boundary is somewhere around where the outermost point of the object is. So the ugly little "box" coffee shop would probably have a boundary somewhere around its outside walls. But the boundary can be made artificially larger, so that the object changes LoD from even farther away! Simply set a point (a "vertex") in the model for the object where the boundary should be. The point/vertex has nothing else attached to it, so it will be invisible in the game.

The one current problem is that the player can still bump into those invisible points/vertices. So take care to hide them somewhere that doesn't matter, like underground or inside walls, when all the models are put into the game world together!

Recipes


Crafting is still extremely crude in The Open Engine, but it's in there. Basically, if the player gathers the required objects on a workbench and clicks on the workbench with an empty hand, the ingredients become the newly crafted item. So how to design recipes? It's really pretty easy, but maybe a bit hard to understand at first...

In your Blender file, create these three objects, if you haven't already: One called "_tech", one called "_recipes", and one called "_drops". DO NOT parent them to the object called "_scene"! You don't need models for these, just make them Empties (see Blender tutorials to know what that is. It's simple).

Create a single copy of every object you want to be an ingredient or result of crafting (ingredients must be movable by the player, such as for example type 2 objects). You only need one of each, no matter how many recipes they go in. However, if you want the same objects to be found in your game without being crafted first, you need seperate copies for that (because they all need to be parented to "_scene"). All the ones you just created now, parent them to "_tech". It doesn't matter where they are, because the game will not care about the location of anything not parented to "_scene", because only things parented to "_scene" show up in the game at the beginning, anyway.

Now, create an Empty in Blender, and call it something to know what recipe it is for (the name is only for your own sake, it means nothing to the engine). This is a recipe. Parent it to "_recipes". Now add one Action constraint to it for each ingredient (if more than one is needed of some ingredient, add a constraint for each one!). In the constraint, set target to be the ingredient you want. And that's how you make the recipe.

Now, make another Empty. This is to define what the recipe produces. Parent it to "_drops". Add an action constraint, and make the target the recipe you want to produce this. Then add an Action constraint for everything the recipe creates, and set the targets to be those items.

That's it. So to make a recipe that lets the player put two gears and a battery on a workbench to make five robots, you need the recipe Empty with the gears and battery as targets for constraints (three constraints in total), and a drop Empty that has as constraint targets the recipe and each of the five robots. Parent that to the "_tech", "_recipes" and "_drops" Empties as described, and you've got any recipe you want!