Plan for Melv May
by Melv May · 09/01/2005 (12:04 pm) · 26 comments
Well it's been a month since my last plan so I thought it was about time I spent a little time explaining at least some of the development work that's been completed. There's just no way that I can spend the time going through each and every feature that's been added and you should note that none of this stuff is in order of development or anything like that but I've tried to show some of the stuff that can at least have a nice picture/movie associated with it so I don't put you to sleep! You can assume that there's just a bucket-load of stuff to add to this that although extremely important, doesn't work well in plans; stuff like picking-efficiency, memory-allocations, profiling and zzzZZZZZZZZ. ;)
I've also tried to discuss this in a fashion that makes sense to people who haven't yet got hold of a copy of T2D; you know who you are and may god have mercy on your souls! ;)
Before I begin and assuming you haven't already, you should go take a look at Justin Dujadins recent plan as it describes some of the cool stuff that's in TGE v1.4. The great news is that T2D will be merging with v1.4 so you can expect to see this cool stuff in T2D.
Okay, let's jump right in....
Efficiency and Performance
When I was developing T2D I tried my best to keep an eye on performance characteristics and most of the time I did well but there were some areas that didn't get the love they deserved so I've gone and rectified that by developing a whole bunch of improvements scoped throughout the codebase from object-creation, object-configuration to object-integration including collisions, picking, spatial-stuff like postion, sizing and rotating. The rule is, if it don't change from the last frame, do nothing to it. The end result is a massive improvement in nearly all areas. The one area that I've seen discussed on the forums is vertex-batching. The above work doesn't include this but don't dispair, this will be resolved in another piece of work that'll be going in sometime fairly soon. In the meantime, the main performance hits have been from everything other than rendering so this work has gained huge boosts in performance.
Enough talk, where's the profile stats? Well, the problem here is that the T2D internals have changed so much from the last v1.0.2 release that the profile-markers don't compare easily. The best way of demonstrating performance increases is by running a simple but stressful script-app on v1.0.2 and then the T2D HEAD so here we go...
Test System is Pentium 4 HT 3.4Ghz, nVidia GeForce 6800 Ultra, 2Gb DDR2 Ram, 640x480x32, WinXP Pro
Movie frame-rates are affected by video-capture systems albeit minimized as much as possible.
Old v1.0.2 Running 10,000 stationary objects

As it says, this is v1.0.2 with 10,000 stationary objects and as you can see, the frame-rate is pretty terrible. If-fact, I've had to change a few settings so that I got a meaningful test because I was getting about 1.8-fps. With this number of objects, small changes matter big-style. Well, lets look at the exact same script running under T2D-HEAD...
T2D-HEAD Running 10,000 stationary objects

As you can see a respectable 34-fps. The thing is here that I've left in both the world-limit check and the collision checking (ready for the next example) so it's actually got more potential work going on than I said. This is a huge improvement in average but involves some massive % improvements in specific areas. This is all cool but 10,000 stationary objects wouldn't make a good game so let's move 'em around with collisions reacting; back to v1.0.2...
Old v1.0.2 Running 10,000 moving objects with collisions

Well, I've had to fudge this just so I could get a meaningful test. What I mean by this is that I actual turned-off collisions and just used the world-limits because with collisions I was getting <1-fps. At least in this test I was getting a 4.5-fps which although not good, isn't as bad as it's only half of what it was before. Scaling the v1.0.2 test down a little with less objects produces a result which indicates you're getting approximately a 84% decrease by using collisions.
Well, lets look at the exact same script running under T2D-HEAD...
T2D-HEAD Running 10,000 moving objects with collisions

Yes, look at that figure again! Hardly different than it was before! Let me explain that figure though; the objects are not colliding with each other but only the side of the screen (see the borders?) so that's a big reason but the collisions with the border are being dealt with much more efficiently now. In-fact, there's a problem with the debug-info banner here that I need to address shortly (hey, that's why I'm still working on stuff!). Just to show that this is real, here's a movie of it running albeit with slightly slower FPS due to the movie-capture...
10,000 moving objects with collisions
It's also interesting to note that the debug-info banner is reporting lots of bin-relocations. This is because I've not configured the bin-system (an option when creating the scenegraph) optimally for this demo. Increasing the bin-size gains approximately 8-10fps in this demo. It's good that T2D lets you configure stuff to this degree.
One thing the keen-eyed of you may have noticed was that there didn't seem to be any collision tunnelling like you may have experienced before. Well, that's right, no collision tunnelling now with the new collision-stepping routines and other stuff(tm). Just to show this off a little more, here's a hundred objects with very high velocities (10,000+ world-units/sec) bouncing within the same border interior...
T2D-HEAD Running 100 high-velocity objects with collisions

... and a little movie so you can actually see it actually moving...
Tunnelling Movie
There's much more in terms of performance I could mention but I think this pretty much shows the stepped improvements made where it matters and we're not finished there. The graphics side of things will and is being improved and doubtless we'll improve even more in certain areas as we move forward.
Next-up, I thought I'd mention a seemingly simple but nevertheless powerful feature that I've added; object mouse-events. In-case you've not used T2D before (shame on you, sign-up now!) then you'd wouldn't know that the way you get mouse-events in T2D is to use a callback from any of your T2D scene-windows. In there, you'd typically used one of the many pick functions that allow you to ask T2D what objects are at a certain point or area with the option to filter the pick by other parameters. This is something that happens alot in T2D apps and so it was really asking for some kind of engine automation.
The end-result is that you can now tell your scene-window to optionally give you mouse events for the window and/or (and this is the cool bit) give you mouse-events for the objects contained within it and still filter the results (by group/layer mask for T2D'ers). Now this is very cool but you can also tell individual objects if they are to respond to these mouse-events fired at them. This gives you very fine control over the routing of mouse-events. Okay, bring on the example...
T2D Object Mouse-Events

... and a little movie where I've told the objects to explode if they receive a mouse-move event. I've told the blue-objects to ignore the events. Again, absolute minimal script needed to do this...
T2D Object Mouse-Events Movie
I'm sure this feature will get used-to-death(tm) for T2D Gui-interfaces (perhaps as a TGE Gui) and definatley for some very interesting scene-interactions and custom game-editors etc.
Okay, if mouse-events aren't your thing then maybe you're interested in more dynamic GUIs for your games/apps? As T2D'ers will know, the GUI system lives in a pixel-space on the Canvas whereas T2D objects live in a special world-space and never shall the twain meet! In-fact T2D renders scenes in a specially designed GUI control itself but the objects live within it. and there's no interaction (apart from the mouse) with other rendered elements. Well, that's about to change forever.
Imagine being able to tell ANY of your T2D objects that you want to attach ANY GUI control to it irrespective of the GUI control having lots of nice children like buttons or even a T2D scene GUI control! Well you don't have to imagine because you can now do it.
With a single function you can now attach/detach any GUI control (and all its children) to a T2D Object with options for sizing the GUI Control to the size of the T2D Object or not so it's left as it was defined but track the T2D objects position. T2D will take control of this GUI hierarchy and move it in T2D world-space and clip it to the T2D scenes' window. This means that you can effectively have standard TGE GUI Elements within the scene and yes .... they work as normal; at least they do if you can catch them as demonstrated here...
T2D GUI Attachment Movie #1
Notice that I start by showing that they are real controls by clicking/selecting/typing. I linked the command from the top-left button so that it attached the GUI to the object moving in the background. Notice how the GUI sizes with the T2D object and that the children resize accordingly although I've only threw this GUI control together so you get some odd alignment with the children controls as you would if you resized it normally.
To show you just how flexible the system i,s I took the space-scroller demo and created a handful of T2D scene-windows all pointing to the running space-scroller scenegraph. I then created a new scene/window and attached the T2D windows to some bouncing objects within it. Again, script is practically nothing and here's the result...
T2D GUI Attachment Movie #2
Note that I'm actually playing the space-scroller demo in the background albeit badly! Great stuff!
Well, I though I'd end on a performance note and I picked a specific area that is always popular, tile-maps. There have been improvements in the way tile-maps work but the real benefit has come from the new physics/integration. I'm not going to do the tech-speak here as this is supposed to be fun but what I will show is an absolutely massive amount of objects interacting with tilemaps (typically a performance hog) with a T2D stock collision-response, in this case, "bounce"...
T2D Big-Style Tile Interaction

This is 1,000 objects fully interacting with the tiles and most impressive it is too. Here's the movie of the same...
T2D Tile-Interaction Movie #1
I thought it'd be fun to do the same thing but add some gravity to the objects to keep things moving...
T2D Big-Style Tile Interaction (with gravity)

... and the movie of the same...
T2D Tile-Interaction Movie #2
What does all this all mean? It means that T2D is faster and more efficient than before but you've now got more power to pull-in stuff inherited from TGE like the GUI system. There are just so many new features that deserve their own spot in a plan but time is limited and there's always another plan. :) Besides, if I show you everything, you'll have nothing to suprise you when it's released!
Well, I'm going to have to end this plan sometime, besides, if I use anymore web-space on GG's server they'll probably kill me so if you've read this far then thanks for your time and I hope you start to get a feeling that lots of stuff is going on behind the scenes, especially lots of amazing things that can't be discussed for the obvious reasons.
If you already invested in T2D then thank you; consider this a huge jump in your investment! If you haven't yet done the deed then why not head over to Dev Products and see what you're missing!
I'm really looking forward to sharing this release with everyone!
Happy T2D'ing!
- Melv.
I've also tried to discuss this in a fashion that makes sense to people who haven't yet got hold of a copy of T2D; you know who you are and may god have mercy on your souls! ;)
Before I begin and assuming you haven't already, you should go take a look at Justin Dujadins recent plan as it describes some of the cool stuff that's in TGE v1.4. The great news is that T2D will be merging with v1.4 so you can expect to see this cool stuff in T2D.
Okay, let's jump right in....
Efficiency and Performance
When I was developing T2D I tried my best to keep an eye on performance characteristics and most of the time I did well but there were some areas that didn't get the love they deserved so I've gone and rectified that by developing a whole bunch of improvements scoped throughout the codebase from object-creation, object-configuration to object-integration including collisions, picking, spatial-stuff like postion, sizing and rotating. The rule is, if it don't change from the last frame, do nothing to it. The end result is a massive improvement in nearly all areas. The one area that I've seen discussed on the forums is vertex-batching. The above work doesn't include this but don't dispair, this will be resolved in another piece of work that'll be going in sometime fairly soon. In the meantime, the main performance hits have been from everything other than rendering so this work has gained huge boosts in performance.
Enough talk, where's the profile stats? Well, the problem here is that the T2D internals have changed so much from the last v1.0.2 release that the profile-markers don't compare easily. The best way of demonstrating performance increases is by running a simple but stressful script-app on v1.0.2 and then the T2D HEAD so here we go...
Test System is Pentium 4 HT 3.4Ghz, nVidia GeForce 6800 Ultra, 2Gb DDR2 Ram, 640x480x32, WinXP Pro
Movie frame-rates are affected by video-capture systems albeit minimized as much as possible.
Old v1.0.2 Running 10,000 stationary objects

As it says, this is v1.0.2 with 10,000 stationary objects and as you can see, the frame-rate is pretty terrible. If-fact, I've had to change a few settings so that I got a meaningful test because I was getting about 1.8-fps. With this number of objects, small changes matter big-style. Well, lets look at the exact same script running under T2D-HEAD...
T2D-HEAD Running 10,000 stationary objects

As you can see a respectable 34-fps. The thing is here that I've left in both the world-limit check and the collision checking (ready for the next example) so it's actually got more potential work going on than I said. This is a huge improvement in average but involves some massive % improvements in specific areas. This is all cool but 10,000 stationary objects wouldn't make a good game so let's move 'em around with collisions reacting; back to v1.0.2...
Old v1.0.2 Running 10,000 moving objects with collisions

Well, I've had to fudge this just so I could get a meaningful test. What I mean by this is that I actual turned-off collisions and just used the world-limits because with collisions I was getting <1-fps. At least in this test I was getting a 4.5-fps which although not good, isn't as bad as it's only half of what it was before. Scaling the v1.0.2 test down a little with less objects produces a result which indicates you're getting approximately a 84% decrease by using collisions.
Well, lets look at the exact same script running under T2D-HEAD...
T2D-HEAD Running 10,000 moving objects with collisions

Yes, look at that figure again! Hardly different than it was before! Let me explain that figure though; the objects are not colliding with each other but only the side of the screen (see the borders?) so that's a big reason but the collisions with the border are being dealt with much more efficiently now. In-fact, there's a problem with the debug-info banner here that I need to address shortly (hey, that's why I'm still working on stuff!). Just to show that this is real, here's a movie of it running albeit with slightly slower FPS due to the movie-capture...
10,000 moving objects with collisions
It's also interesting to note that the debug-info banner is reporting lots of bin-relocations. This is because I've not configured the bin-system (an option when creating the scenegraph) optimally for this demo. Increasing the bin-size gains approximately 8-10fps in this demo. It's good that T2D lets you configure stuff to this degree.
One thing the keen-eyed of you may have noticed was that there didn't seem to be any collision tunnelling like you may have experienced before. Well, that's right, no collision tunnelling now with the new collision-stepping routines and other stuff(tm). Just to show this off a little more, here's a hundred objects with very high velocities (10,000+ world-units/sec) bouncing within the same border interior...
T2D-HEAD Running 100 high-velocity objects with collisions

... and a little movie so you can actually see it actually moving...
Tunnelling Movie
There's much more in terms of performance I could mention but I think this pretty much shows the stepped improvements made where it matters and we're not finished there. The graphics side of things will and is being improved and doubtless we'll improve even more in certain areas as we move forward.
Next-up, I thought I'd mention a seemingly simple but nevertheless powerful feature that I've added; object mouse-events. In-case you've not used T2D before (shame on you, sign-up now!) then you'd wouldn't know that the way you get mouse-events in T2D is to use a callback from any of your T2D scene-windows. In there, you'd typically used one of the many pick functions that allow you to ask T2D what objects are at a certain point or area with the option to filter the pick by other parameters. This is something that happens alot in T2D apps and so it was really asking for some kind of engine automation.
The end-result is that you can now tell your scene-window to optionally give you mouse events for the window and/or (and this is the cool bit) give you mouse-events for the objects contained within it and still filter the results (by group/layer mask for T2D'ers). Now this is very cool but you can also tell individual objects if they are to respond to these mouse-events fired at them. This gives you very fine control over the routing of mouse-events. Okay, bring on the example...
T2D Object Mouse-Events

... and a little movie where I've told the objects to explode if they receive a mouse-move event. I've told the blue-objects to ignore the events. Again, absolute minimal script needed to do this...
T2D Object Mouse-Events Movie
I'm sure this feature will get used-to-death(tm) for T2D Gui-interfaces (perhaps as a TGE Gui) and definatley for some very interesting scene-interactions and custom game-editors etc.
Okay, if mouse-events aren't your thing then maybe you're interested in more dynamic GUIs for your games/apps? As T2D'ers will know, the GUI system lives in a pixel-space on the Canvas whereas T2D objects live in a special world-space and never shall the twain meet! In-fact T2D renders scenes in a specially designed GUI control itself but the objects live within it. and there's no interaction (apart from the mouse) with other rendered elements. Well, that's about to change forever.
Imagine being able to tell ANY of your T2D objects that you want to attach ANY GUI control to it irrespective of the GUI control having lots of nice children like buttons or even a T2D scene GUI control! Well you don't have to imagine because you can now do it.
With a single function you can now attach/detach any GUI control (and all its children) to a T2D Object with options for sizing the GUI Control to the size of the T2D Object or not so it's left as it was defined but track the T2D objects position. T2D will take control of this GUI hierarchy and move it in T2D world-space and clip it to the T2D scenes' window. This means that you can effectively have standard TGE GUI Elements within the scene and yes .... they work as normal; at least they do if you can catch them as demonstrated here...
T2D GUI Attachment Movie #1
Notice that I start by showing that they are real controls by clicking/selecting/typing. I linked the command from the top-left button so that it attached the GUI to the object moving in the background. Notice how the GUI sizes with the T2D object and that the children resize accordingly although I've only threw this GUI control together so you get some odd alignment with the children controls as you would if you resized it normally.
To show you just how flexible the system i,s I took the space-scroller demo and created a handful of T2D scene-windows all pointing to the running space-scroller scenegraph. I then created a new scene/window and attached the T2D windows to some bouncing objects within it. Again, script is practically nothing and here's the result...
T2D GUI Attachment Movie #2
Note that I'm actually playing the space-scroller demo in the background albeit badly! Great stuff!
Well, I though I'd end on a performance note and I picked a specific area that is always popular, tile-maps. There have been improvements in the way tile-maps work but the real benefit has come from the new physics/integration. I'm not going to do the tech-speak here as this is supposed to be fun but what I will show is an absolutely massive amount of objects interacting with tilemaps (typically a performance hog) with a T2D stock collision-response, in this case, "bounce"...
T2D Big-Style Tile Interaction

This is 1,000 objects fully interacting with the tiles and most impressive it is too. Here's the movie of the same...
T2D Tile-Interaction Movie #1
I thought it'd be fun to do the same thing but add some gravity to the objects to keep things moving...
T2D Big-Style Tile Interaction (with gravity)

... and the movie of the same...
T2D Tile-Interaction Movie #2
What does all this all mean? It means that T2D is faster and more efficient than before but you've now got more power to pull-in stuff inherited from TGE like the GUI system. There are just so many new features that deserve their own spot in a plan but time is limited and there's always another plan. :) Besides, if I show you everything, you'll have nothing to suprise you when it's released!
Well, I'm going to have to end this plan sometime, besides, if I use anymore web-space on GG's server they'll probably kill me so if you've read this far then thanks for your time and I hope you start to get a feeling that lots of stuff is going on behind the scenes, especially lots of amazing things that can't be discussed for the obvious reasons.
If you already invested in T2D then thank you; consider this a huge jump in your investment! If you haven't yet done the deed then why not head over to Dev Products and see what you're missing!
I'm really looking forward to sharing this release with everyone!
Happy T2D'ing!
- Melv.
About the author
#2
thank you Melv, perf was the biggest scarry concern i had with t2d.. it's the ONLY thing in t2d that kept me up at night (well, assuming anything kept me up at night) (your not posting in the thread i wrote about this worred me a bit too)
So I am very very happy that you have worked to fix this!
AAA all the way.
09/01/2005 (12:24 pm)
i rejoice! thank you Melv, perf was the biggest scarry concern i had with t2d.. it's the ONLY thing in t2d that kept me up at night (well, assuming anything kept me up at night) (your not posting in the thread i wrote about this worred me a bit too)
So I am very very happy that you have worked to fix this!
AAA all the way.
#3
09/01/2005 (12:27 pm)
Woot. WOOT. WOOT! Can't wait! The future looks bright.
#4
09/01/2005 (12:33 pm)
Absolutely awesome. I can hardly describe how giddy this made me. I mean, I am just bloody blown away. Keep up the great work, Melv!
#5
-Peter
09/01/2005 (12:39 pm)
Long live Melv! This efficiency stuff is just what my game needed. My computer's not quite as power full as yours. :)-Peter
#6
09/01/2005 (2:12 pm)
mind boggling. great work.
#7
Keep up the good work!
09/01/2005 (2:42 pm)
Holy guacamole! If you keep working so hard I won't have anything left to do!Keep up the good work!
#8
some one donate some cool art to Melv for his demo's :P
09/01/2005 (2:49 pm)
the mouse object is excellent I can see a t2d whack the mole game :Psome one donate some cool art to Melv for his demo's :P
#9
09/01/2005 (3:49 pm)
Wow! Can't wait to get my hands on this.
#11
09/01/2005 (4:53 pm)
I am very excited that there are now mouse events for objects! Great stuff!
#12
I've been suspecting since T2D's release, but with this....I'll just have to take advantage of all that...which obviously can't be done in a human lifetime...
Awesome possibilities though, espectially the Gui thing...love it
09/01/2005 (5:13 pm)
Ok, that's just teasing, Melv. No fair! Answer this simple question...are you Satan?I've been suspecting since T2D's release, but with this....I'll just have to take advantage of all that...which obviously can't be done in a human lifetime...
Awesome possibilities though, espectially the Gui thing...love it
#13
09/01/2005 (7:53 pm)
Heh, so we can bind GUI controls to T2D objects now(when, whenever you let it loose on the masses). Sounds like fun :)
#14
09/01/2005 (9:29 pm)
Great job Melv!
#15
09/01/2005 (9:32 pm)
Awesome, thats very very awesome!
#16
Performance is/was definitely the big concern for a lot of people. Simply fabulous.
09/01/2005 (9:37 pm)
Oh my goodness! Good heavens! Good gracious! It's just GOOD!Performance is/was definitely the big concern for a lot of people. Simply fabulous.
#17
09/01/2005 (10:05 pm)
W O W Melv- I am getting tons of new ideas just watching your vids. The GUI attachments is way cool .
#18
09/02/2005 (5:11 am)
Amazing. Simply amazing!
#19
09/02/2005 (5:31 am)
Im not on the T2D train because of a total lack of money thing ... being cured slowly but surely ... otherwise I would be knee deep in the engine and loving every minute of it I am sure. Thanks for the boost of confidence on my future purchase (not that I needed one mind you, but every teaser I get in the meantime is gold in my eye).
#20
09/02/2005 (11:32 pm)
My question is, and pretty much always has been - when is networking going to be implemented? No, not the turn based networking, full twitch action stuff. 
Torque Owner Mark Schmidt