Previous Blog Next Blog
Prev/Next Blog
by date

T2D Collision Polygon Editor!

T2D Collision Polygon Editor!
Name:Justin DuJardin
Date Posted:Jun 29, 2005
Rating:3.3 out of 5
Public:YES
Comments:YES
RSS Feed:GarageGames Blog feedor Subscribe with .
Profile Page:View profile page for Justin DuJardin

Blog post
T2D Editors Galore!

So it's now been a bit over a month since I've arrived for my internship at GarageGames and I've been slaving away
at T2D stuff for most of the time with not too much to show for it thus far. However, as the saying goes, every
dog has his day and so do I. Today is that day, I'm finally ready to unveil some of the cool things I've been
working on, and give you all a sneak peak at some stuff that is soon coming in the T2D 1.1 release!

Creating Custom Collision Polygons meets Point and Click!
That's right, the most horrid of tasks, creating collision polygons that aren't just simple primitives now has a
pretty face to accompany it's great design! I've managed to put together an editor that allows you to point and
click right on your imagemap where the points are for your polygons!





And what is a .PLAN without a video, because frankly, the images just don't do it justice! Another thing to keep
in mind is that once the polygon has been created, you can save it directly to a file! Not just any file of
course, but an executable script file that will store all the objects information, datablocks, imagemaps, collision
poly info and all the goodness you've been looking for!

Creating a custom collision poly in less than 30 seconds!
Video #1

Editing Objects on the fly!
As I mentioned before, all the object information is exported to a file, but what good is that if you can only
create a collision poly? Have no fear, the object creator is here! With a very few simple clicks you can create
an object and then edit it's properties in a manner that allows you to see what you're changing, in real time!
Amongst the things you can edit are all the datablock properties of an object, including but not limited to the
following.


Object Size
Object ImageMap
Object World Limits
Object World Limit Response Types
Object Blending Options
Object Name
Object Max Linear Velocity
...
And much more!


Here's a quick pic of the object editor window, which resembles the Gui inspector (mostly because it uses the same
control).

Object Properties Editor


And of course since seeing truly is believing, a small video for your viewing pleasure!

Editing Object Properties
Video #2

Well that's cool, but how do we get the object in there to begin with?! Magic? Not so much, as my magic-fu is
weak at the moment, but there is a nifty thing I've come up with that allows you to create objects as quickly as
you can say point-click-click! The object creator is designed to allow you to create objects very quickly while
copying certain attributes from different datablocks.

That is to say if you were creating a shooter game like the spacescroller demo, you could create a datablock like
the one below that would contain the necessary information for collisions for an enemy ship type, then create the
enemy ship objects with different image maps that grabbed all their layer/group collision info from this datablock!
In so doing this you could create 5 or more ship objects in about a minute that already had their collision masks
set! This is of course just one example of how this could be used, but I think it illustrates my point well
enough!


datablock t2dStaticSpriteDatablock( enemyShipDatablock )
{
layer = 3;
group = "2";
collisionActiveSend = true;
collisionActiveReceive = true;
collisionPhysicsSend = true;
collisionPhysicsReceive = true;
collisionGroupMask = 1;
collisionLayerMask = 1;
collisionResponse = "BOUNCE";
collisionCallback = false;
collisionSuppress = false;
};


Sorry no video for this guy, but you'd only get to see a few clicks and maybe typing a name, I think the pic should
do this one justice enough!



The pleasure is all mine

I hope you all enjoyed my show and tell for the day, and if you have any ideas that pop out as a result of seeing
this that you'd like to see implemented at some point, drop me a comment, I'd love to hear what you guys think!

-justin'

Recent Blog Posts
List:04/01/07 - Torque Game Builder 1.5 Beta
02/01/07 - Torque Game Builder Closed Beta Signups
09/28/06 - Torque Game Builder 1.1.2 Goes Live!
08/10/06 - Torque Game Builder 1.1.1 Lives!
06/20/06 - Torque Game Builder Hits 1.1.0!
06/08/06 - Torque Game Builder RC2 is Here!
05/10/06 - Torque Game Builder goes Feature Complete!
04/17/06 - Torque Game Builder Bounties (Part 2)

Submit ResourceSubmit your own resources!

Josh Williams   (Jun 29, 2005 at 21:24 GMT)
Justin, it has been great working with you dude... you blow me away. Couldn't have asked for this object editor to work out any better. The next T2D release is going to *rock*, thanks to all the hard work you, Melv, Matt L and others are putting in. Woohoo!

Ben Garney   (Jun 29, 2005 at 21:37 GMT)
Awesome tool work! All the hard work is paying off... :)

Joshua Dallman   (Jun 29, 2005 at 22:15 GMT)
my hero...

Jason McIntosh   (Jun 29, 2005 at 23:11 GMT)
Looking good!

For the future it would be really neat to be able to add custom object information to the editor. For example, in my game every object has a lot more information attached to it than just the T2D stuff. The ability to add data to the editor easily would make it extensible so it could be leveraged for more types of games. I've actually done this with my level editor, although it relies on "meta data" to describe the data for each object type. If you've ever used the Unreal editor with a mod, you know that it can supply GUI elements for custom data types you add. Similar functionality in the T2D object editor would be great.

Good luck! Can't wait to see this new stuff in action. :)

Justin DuJardin   (Jun 29, 2005 at 23:29 GMT)
@Josh, Ben, Joshua : Thanks for the kind words guys :)

@Jason : I'm afraid I'm a bit unclear about what you mean as far as custom information? If you mean dynamic fields on the datablocks, those are already listed in the Inspector under "Dynamic Fields". If you're not quite sure what I mean by dynamic field, a dynamic field is any that you assign in script to an object that isn't part of the normal persistent fields.

For example, say you were to create a t2dStaticSprite like so, the fields "powerup" and "powerlevel" would be dynamic fields and as such, listed in the inspector.


new t2dStaticSprite(EnemyShipObject) 
{
config = "EnemyShipObject_config";
scenegraph = "creatorGraph";
powerup = "none";
};

EnemyShipObject.powerlevel = 25;


If this is not what you mean, perhaps you could clarify a bit more :)

-justin`
Edited on Jun 29, 2005 23:30 GMT

Nigel Budden   (Jun 29, 2005 at 23:41 GMT)
Looking Great! Good work.

A quote that has stuck with me from a mad magazine though :)

"Every Dog has it's day..... But that day still involves sniffing other dogs butts"

heheh thanks for the effort you've been putting in, I look forward to the next update.

Matthew Langley   (Jun 30, 2005 at 00:23 GMT)   Resource Rating: 5
Very cool! Looks awesome man.

Vashner   (Jun 30, 2005 at 01:12 GMT)
Good stuff... I LUV T2D!

Hokuto   (Jun 30, 2005 at 01:25 GMT)
Great Stuff!

Charlie Malbaurn   (Jun 30, 2005 at 08:17 GMT)
Not to sound rude but I'm just confused. I was under the impression that all this was done along time ago. Considering that they where talking about putting out an a editor in the release that was going to be released a month or so ago.

Is this a rewrite, or was the past version just hype and never made?

Either way, this is looking cool.

Gary Preston   (Jun 30, 2005 at 10:32 GMT)
Nice to see the editors are coming along, especially the custom polygon one. It was a bit of a pain to work it out manually.

Melv May   (Jun 30, 2005 at 11:52 GMT)
Charlie,

We said there would be an object editor released in v1.1.0 but the update a while ago was v1.0.2 that included many bug-fixes/improvements.

- Melv.

Josh Williams   (Jun 30, 2005 at 19:03 GMT)
Yes, we never claimed this editor was done, just that we knew we wanted it for v1.1. We'd been doing the prep work for it for some time, and now Justin has been helping to create the actual editor and finish up the core changes necessary to make it work well.

Neo Binedell   (Jun 30, 2005 at 21:06 GMT)
Tick another thing off my mini-projects enhancements for T2D, nice work... now about that integrated script editor with projects, intellisense and debugger...

Do the above include creation of datablocks, imagemaps, etc? I'm sure tired o typin it all...

Very nice surprise thank you...

layder
neo
Edited on Jun 30, 2005 21:11 GMT

Jason McIntosh   (Jul 01, 2005 at 02:00 GMT)
@Justin: Dynamic fields is indeed what I meant. Thanks for the info. I didn't realize it already handled it in some form. Keep up the good work!

Darren Stuart   (Jul 01, 2005 at 08:47 GMT)   Resource Rating: 3
quick question. Will it be possible to have a different collision poly for each frame in an animation?

I am thinking that if it could be done then a fighting game would be easy to do.
Edited on Jul 01, 2005 09:02 GMT

Phil Loaiza   (Jul 07, 2005 at 17:57 GMT)
Looks great Justin any chance you can let us have it before the next release ?? :)

Alex Rice   (Jul 09, 2005 at 17:50 GMT)
Sweet! As I am learning T2D I am thinking OK how am I going to come up with all these vertext lists by hand? Question answered

Spider   (Dec 28, 2005 at 23:47 GMT)
so dope

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