Previous Blog Next Blog
Prev/Next Blog
by date

Meet the T2D Level Builder

Meet the T2D Level Builder
Name:Adam Larson
Date Posted:Jan 31, 2006
Rating:5.0 out of 5
Public:YES
Comments:YES
RSS Feed:GarageGames Blog feedor Subscribe with .
Profile Page:View profile page for Adam Larson

Blog post
If there are any real annoyances with using T2D, the main one just might be manually typing in object properties and datablock information. It's quite the pain to have to guess and check object positioning and sizing until you get objects placed just right.

No longer.

With the next alpha release of T2D 1.1 - which is forthcoming - running the engine will present you with this:



This is, of course, T2D's new level builder. It is still very much in the early stages of development, but it is also very much usable. Here's a quick run through of the features.

Object Creation
The level builder allows for the creation of static sprites, animated sprites, chunked sprites, scrollers, tilemaps, and particle effects. 3D shapes and primitives are in the works. Creating these objects is as simple as clicking on a create button in the toolbox (which can be found by reading the tooltips), selecting the image map, particle effect, tilemap, etc. from the drop down list on the right side of the toolbox, and clicking somewhere in the scene.



Object Editting
Editting objects is handled much like you would expect. Using the selection tool (the toolbox button on the far left) you can select objects and move and scale them. Selected object's properties will show up in the inspector (lower right) where they can be editted by hand. Changes will take place immediately.

Collision Poly Editting
The collision poly editor made its first appearance quite some time ago in a plan of Justin DuJardins. It was put on the backburner for a while and is now fully integrated with the level editor. Double clicking on any object in the scene after selecting the collision poly tool will present you with this:



From here, you can just click and drag to create custom collision polygons. It will also make sure, as you are editting, that your collision poly remains convex. Right clicking a vertex will delete it and left clicking on a vertex will allow you to drag it around. To get out of the poly editor, just select a different tool from the toolbox.

Mount Points and Link Points
Double clicking an object with the mount tool selected will open up the mount tool. This allows you to create link/mount points, and mount objects. Here it is:



This works similarly to the collision poly tool. Click to create link points, right click to delete them, and drag them for positioning. Once a point is created, you can mount objects to it. Simply dragging an object onto the link point will perform the mounting for you.

You will also notice, each link point has a number on it. This is the link points ID. Basically, you would use it in function calls like t2dSceneObject.getLinkPoint(%id) which would return the world position of the link point.

Camera Controls
Controlling the camera is extremely simple. Right click and drag to move it around, and zoom with the scroll wheel.

Saving and Loading
Saving is as simple as selecting save from the menu. Fancy that. Save files are text based, and thus editable outside the level builder (similar format to TGE's mission files, if you are familiar with those). Loading into the editor can obviously be done with the load menu item. Loading into a game can be done by calling t2dSceneWindow.loadLevel(%levelFile) where t2dSceneWindow is your scene window and %level file is the file name of the level. This will automatically create you a scenegraph, associate it with the window, and load the level contents.

While the editor itself is still fairly rough and will likely be changing quite a bit in the coming weeks/months, the saving and loading system is pretty much done. So, you shouldn't have to worry about creating levels now and having them not work with the next release.

Testing Levels and Running Your Game
From the launch menu you can test levels that you are currently building. This would allow you to see how things like physics properties and world limits are set up - since this type of stuff is not updated while in the editor.

The run game menu option basically just closes the editor and calls setupT2DScene - which can be found in gameScripts/game.cs. Here you could set up things like your player object, enemies, and of course, load your levels.

Future Plans
Way to much to talk about right now. Anything and everything you could possibly want is being considered for inclusion, and will most likely be included eventually. But, suggestions are always worthwhile so, have at it.

Recent Blog Posts
List:04/03/07 - On Our Best Behaviors
01/31/06 - Meet the T2D Level Builder
12/08/05 - Plan for Adam Larson
08/26/05 - Plan for Adam Larson
07/28/05 - Plan for Adam Larson
07/18/05 - Plan for Adam Larson

Submit ResourceSubmit your own resources!

Josh Moore   (Jan 31, 2006 at 06:43 GMT)
Awesome!

Anton Bursch   (Jan 31, 2006 at 06:46 GMT)
This is amazing news!! I can't wait!! This is awesome!!

Jason Swearingen   (Jan 31, 2006 at 07:04 GMT)
very cool, utilities rock :)

Joe Rossi   (Jan 31, 2006 at 07:46 GMT)
Good stuff! Looking forward to this next release.

Vashner   (Jan 31, 2006 at 07:48 GMT)   Resource Rating: 5
Looks really good. Can't wait to try it.

J.C. Smith   (Jan 31, 2006 at 08:16 GMT)
Definately looking really good. Look forward to this one.

Tom Bentz   (Jan 31, 2006 at 08:26 GMT)
Oh snap!!!! GIMMIE!!!

Josh Williams   (Jan 31, 2006 at 09:19 GMT)
Thanks for writing up this .plan Adam. :)

I just wanted to chime in and give some credit and say thanks to the T2D crew. Melv has of course done tons of work packing so many awesome features into T2D that its become necessary to create an editor to easily take advantage of them all! And all of this editor work is based on the fine code Justin Dujardin wrote. And much of the progress we've been able to make on the Level Editor is due to the crew at Large Animal Games; they're doing all kinds of cool T2D games and generously contributed some of the tools and code they'd created to help themselves in developing with T2D. And besides starting the tool off, Justin has been instrumental in seeing it come to fruition over the past few weeks. Adam Larson of course also deserves tons of credit for all his hard work and enhancements to the Level Builder. And finally, Matt Langely has also helped T2D and the new Level Builder in innumerable ways. Of course, Paul Scott has been awesome in getting all this stuff running on OS X as well!

Thanks for all your hard work guys! And to the fantastic T2D community for helping us make sure we're creating the best technology and tools we possibly can. T2D is rocking harder and harder...

T2D owners... watch for the new Alpha4 build tomorrow!
Edited on Jan 31, 2006 21:05 GMT

Rob Sandbach   (Jan 31, 2006 at 11:17 GMT)
Tomorrow eh? :D:D:D

Great work guys! This will increase productivity 500%.

Steve Nolet   (Jan 31, 2006 at 13:36 GMT)   Resource Rating: 5
Cool ! I can't wait until tomorrow !!! :D

Anders Linder-Noren   (Jan 31, 2006 at 14:40 GMT)
...and T2D moves up on the purchase list...

Great job guys! This is just too amazing! Can't wait to lay my hands on this!

David Montgomery-Blake   (Jan 31, 2006 at 15:24 GMT)   Resource Rating: 5
I can't wait to play with this!

Justin DuJardin   (Jan 31, 2006 at 17:21 GMT)   Resource Rating: 5
Ooooh, awesome write up adam! Good to see you finally added some screenshots; Tim was just telling me that he didn't like your plan because it had none, but now it does!

Level Builder is going to rock the casbah in the coming weeks and months so everyone should keep a sharp eye out for future releases because they're just going to get better and better!

Now if I could only get a clone of Adam, we could have two times as many cool tools...hmmm... *schemes*

Arland (Barry) Woodham   (Jan 31, 2006 at 17:35 GMT)
Wow that rocks just enough to get me out of lurking mode. Can't wait to try it.

Mike Lilligreen   (Jan 31, 2006 at 17:42 GMT)
Thanks for the write up and all the hard work you guys are doing in the background. Can't wait to use this.

Terry   (Jan 31, 2006 at 18:23 GMT)
I second Arland. I've been lurking, watching, and downloading alphas, and this just keeps getting better. Had to finally post a thanks. We all really appreciate the time you all take (all names mentioned above by Josh) to not only do the work, but keep us well informed. With every new .plan and post you put out I get new ideas. I hope GG is treating the T2D team really, really well...
Edited on Jan 31, 2006 18:27 GMT

Matthew Langley   (Jan 31, 2006 at 19:38 GMT)   Resource Rating: 5
Justin and Adam have done an awesome job on the Level Editor, built combining Large Animal's great base as well as many of their own updates and enhancements. Its a blast to just play around in lol, nevertheless it makes creating T2D levels fun and productive... You can definately keep an eye out for tutorial work covering some of this great editor in releases coming up :)
Edited on Jan 31, 2006 19:40 GMT

Ray Noolness Gebhardt   (Jan 31, 2006 at 21:50 GMT)
Awesome level editor guys. I was just curious what the work flow would be for creating more complicated objects. Like say I have a custom object with a lot of code that controls how it moves and animates. For example it might use multiple sprites, but in a way that isn't using the standard mounting stuff. Would I be better off implementing the object in C++ and then exposing it to the level builder? Or is there a methodology that I could use, in order to do it easily from script?

I was also curious about whether you will be able to use sim groups in the future. I know that the method getGroup, to get the current sim group is hidden by the getGroup method that gets the current collision group an object is in. On the other hand it would be cool to have an editor that is a lot like the TGE editor.

Another think that would be cool, is a way to clone objects, or save objects as a template, so that i can use them in many different levels, or many times in the same level. This would make it a little easier to keep the objects in my game a little more consistant.

Jared Coliadis   (Jan 31, 2006 at 23:24 GMT)
This looks really nice! I'll be looking forward to messing with it, but I'm worried how compatible it'll be with the utilities I'm writing. I suppose I can work around it, and perhaps it'll make it more powerful. I guess I'll see.

Jason McIntosh   (Feb 01, 2006 at 01:31 GMT)
The poly editor alone is going to save hours, but that mounting tool looks great, too. Nice work!

Jeff Gran   (Feb 01, 2006 at 18:19 GMT)
Supasweet!

Anton Bursch   (Feb 26, 2006 at 19:22 GMT)
AWESOME!!
Edited on Feb 28, 2006 05:50 GMT

You must be a member and be logged in to either append comments or rate this resource.