Torque Retro 2D! *Progress*
by Melv May · in Torque Game Engine · 06/28/2004 (11:00 pm) · 30 replies
... continued from previous plan.
... continued from previous post.
As I did last time, here's a dup of my .plan (not everyone notices plans) to keep everyone upto date...
This evening I finished all the features of the mounting system. Jeez, what a bucket-load of code simply to attach one object to another. But wait, is that all there is? Of course not! The mounting system can mount any object to any other object but it can do this with lots of flexibility.
Mounting an object is really simple and is done using obj.mount(); the parameters for the mount command are as follows:-
- The object to mount to
- The force at which to bind to the mount
- The XY offset from the target object pivot-point (selected mount-point)
- Whether to automatically match the targets rotation
- Whether to move immediately to the mount point
What these parameters all you to do is not only specify the mount-point in terms of the objects local-space pivot-point+offset but control the force used to track this point. If you use the magic value of (0) then the object will be rigidly mounted to the point and never move from it. If you use values >0 then object will track the mount point (no matter how it moves) with the force you specify. The other parameters are pretty obvious and can be used for different effects.
In combination with the built-in physics, you can generate all sorts of effects likes springs, ropes, trails etc.
(To give you an idea of how simply it is to use, the demo code took only 19 lines of script code!)
My next job is to finish the projectile code and finalise the 2D particle engine.
Anyway, enough talk, here's some media....
Complex Mounts with little overhead (Shows layered/animated object for background)...
Low-Res Movie
Hierarchical Mounting...
Low-Res Movie
Mount Node Metrics (Shows relaxed mounting force so objects 'chase' mount-point...
Low-Res Movie
// Complex Trail (with Animated Background)...
Organic Spirally Things...
// Follow the leader...

- Melv.
... continued from previous post.
As I did last time, here's a dup of my .plan (not everyone notices plans) to keep everyone upto date...
This evening I finished all the features of the mounting system. Jeez, what a bucket-load of code simply to attach one object to another. But wait, is that all there is? Of course not! The mounting system can mount any object to any other object but it can do this with lots of flexibility.
Mounting an object is really simple and is done using obj.mount(); the parameters for the mount command are as follows:-
- The object to mount to
- The force at which to bind to the mount
- The XY offset from the target object pivot-point (selected mount-point)
- Whether to automatically match the targets rotation
- Whether to move immediately to the mount point
What these parameters all you to do is not only specify the mount-point in terms of the objects local-space pivot-point+offset but control the force used to track this point. If you use the magic value of (0) then the object will be rigidly mounted to the point and never move from it. If you use values >0 then object will track the mount point (no matter how it moves) with the force you specify. The other parameters are pretty obvious and can be used for different effects.
In combination with the built-in physics, you can generate all sorts of effects likes springs, ropes, trails etc.
(To give you an idea of how simply it is to use, the demo code took only 19 lines of script code!)
My next job is to finish the projectile code and finalise the 2D particle engine.
Anyway, enough talk, here's some media....
Complex Mounts with little overhead (Shows layered/animated object for background)...
Low-Res Movie
Hierarchical Mounting...
Low-Res Movie
Mount Node Metrics (Shows relaxed mounting force so objects 'chase' mount-point...
Low-Res Movie
// Complex Trail (with Animated Background)...
Organic Spirally Things...
// Follow the leader...
- Melv.
About the author
#3
06/29/2004 (12:48 am)
Melv, you are going to be selling this, aren't you?
#5
06/29/2004 (4:17 am)
Hey Melv, this looks *very* interesting! It's the first I've seen of it, but there are lots of little 2D shooters that I've built with my own 2D engine, [url="http://www.cdxlib.com"]CDX[/url] that this would be perfect for. Looking to see when this gets completed as I'll be itching to build a new 3D/2D version of Galaga ;)
#6
Hmmm Galaga. :)
It'd be a real buzz for me to see cool games being generated from it, can't wait!
I'm at the point now where I'm stepping back and asking myself about some of the core objects required that span multiple genres, things like projectiles and tile-map support etc. I don't want to get distracted by having to generate editors for things like generating tile-maps etc. I want to put the support there first.
- Melv.
06/29/2004 (9:36 am)
Bil,Hmmm Galaga. :)
It'd be a real buzz for me to see cool games being generated from it, can't wait!
I'm at the point now where I'm stepping back and asking myself about some of the core objects required that span multiple genres, things like projectiles and tile-map support etc. I don't want to get distracted by having to generate editors for things like generating tile-maps etc. I want to put the support there first.
- Melv.
#7
That's basically what my CDX library was providing (it's only 2D and tied to DirectX). Basically a set of game objects that anyone could use (sprite, tile, etc.) so I would be interested in contributing to this effort with those kind of game type objects built on your 2D system (whether it's script based of code doesn't really matter). Let me know.
06/29/2004 (3:35 pm)
Melv,That's basically what my CDX library was providing (it's only 2D and tied to DirectX). Basically a set of game objects that anyone could use (sprite, tile, etc.) so I would be interested in contributing to this effort with those kind of game type objects built on your 2D system (whether it's script based of code doesn't really matter). Let me know.
#8
I should probably start a discussion on the objects themselves. To provide a complete list of the functionality here would take too long so I'll endeavour to produce some preliminary descriptions of how it all works and where I want to go. There are some key features such as tile-map support which would require some cross-platform support for editing of that dataset, something which I need to look into but I'm sure people like yourself already know about. If I got distracted with writing a tile-map editor then I wouldn't get the framework finished.
I need to summarise where I am and what support is more critical than others but basically, I think I've already covered 90% of what would be required to write almost any 2D game. Scrolling, animation, collision, projectile, layered-rendering, mounting, basic physics. Because stuff like Sound/Text/Gui elements is already within the TGE, I don't need to support this kind of stuff; essentially these will simply be overlays using standard GUI controls as the 'window' to the 2D world is simply a GUI control itself. I want to ensure that I'm not duplicating functionality that's already within the TGE so that when people learn certain things such as sound, it's still applicable to the 3D-TGE.
I'm working on the projectile/2D particle-engine at the moment and should be finished at the weekend so I'll definately be asking questions then with regards to other basic support required.
I'll be in touch. All the best,
- Melv.
06/30/2004 (4:01 am)
Bil,I should probably start a discussion on the objects themselves. To provide a complete list of the functionality here would take too long so I'll endeavour to produce some preliminary descriptions of how it all works and where I want to go. There are some key features such as tile-map support which would require some cross-platform support for editing of that dataset, something which I need to look into but I'm sure people like yourself already know about. If I got distracted with writing a tile-map editor then I wouldn't get the framework finished.
I need to summarise where I am and what support is more critical than others but basically, I think I've already covered 90% of what would be required to write almost any 2D game. Scrolling, animation, collision, projectile, layered-rendering, mounting, basic physics. Because stuff like Sound/Text/Gui elements is already within the TGE, I don't need to support this kind of stuff; essentially these will simply be overlays using standard GUI controls as the 'window' to the 2D world is simply a GUI control itself. I want to ensure that I'm not duplicating functionality that's already within the TGE so that when people learn certain things such as sound, it's still applicable to the 3D-TGE.
I'm working on the projectile/2D particle-engine at the moment and should be finished at the weekend so I'll definately be asking questions then with regards to other basic support required.
I'll be in touch. All the best,
- Melv.
#9
Do you think this is something that would be complicated to pick up and work with? I'm no programmer, but I know my way around Torquescript well enough to get myself into trouble. :)
06/30/2004 (5:29 am)
Melv, you are too kind.Do you think this is something that would be complicated to pick up and work with? I'm no programmer, but I know my way around Torquescript well enough to get myself into trouble. :)
#10
06/30/2004 (5:33 am)
You sir, are quite insane. I only hope that I can serve this justice by making a kickass game with it :D
#11
If it's complicated to drive from the scripts then I've failed! I really want this to be simple, the complexity, as it should be, is encapsulated within the C++ side of things. With that said, C++ development is pretty simple as most of the functionality is within the C++ base object so you get plenty of bang-for-your-buck simply by basing your new stuff on the core e.g. spritemap support, collision-detection, physics etc.
I need to evaluate how/when I release this stuff and in-fact if I really do it for free. I like giving away stuff, I can't help it. If it wasn't free then you could expect much more than an unsupported framework with lots of bugs. Hey, don't hold me to anything, let's just finish it and see where we go from there.
This is going to be a 2D blast!
- Melv.
06/30/2004 (6:05 am)
Guys,If it's complicated to drive from the scripts then I've failed! I really want this to be simple, the complexity, as it should be, is encapsulated within the C++ side of things. With that said, C++ development is pretty simple as most of the functionality is within the C++ base object so you get plenty of bang-for-your-buck simply by basing your new stuff on the core e.g. spritemap support, collision-detection, physics etc.
I need to evaluate how/when I release this stuff and in-fact if I really do it for free. I like giving away stuff, I can't help it. If it wasn't free then you could expect much more than an unsupported framework with lots of bugs. Hey, don't hold me to anything, let's just finish it and see where we go from there.
This is going to be a 2D blast!
- Melv.
#12
I'm behind you 100% if you wish to sell it. You fully deserve it already, and as you so aptly point out, it will end up a better product.
It is great to wish to be altruistic, but the simple fact is that it will end up a better product in the long run. There are all too many resources here that weren't developed as fully as they might have had there been that extra incentive.
Good luck. I can tell you're excited, which is pretty funny considering it's taking a step back from 3D! But then, it also brings up good ol' memories when Mario and Donkey Kong were in vivid 2D and not 3, eh? ;)
06/30/2004 (6:52 am)
Melv,I'm behind you 100% if you wish to sell it. You fully deserve it already, and as you so aptly point out, it will end up a better product.
It is great to wish to be altruistic, but the simple fact is that it will end up a better product in the long run. There are all too many resources here that weren't developed as fully as they might have had there been that extra incentive.
Good luck. I can tell you're excited, which is pretty funny considering it's taking a step back from 3D! But then, it also brings up good ol' memories when Mario and Donkey Kong were in vivid 2D and not 3, eh? ;)
#13
Complex Mounts with little overhead (Shows layered/animated object for background)...
Low-Res Movie
@Eric: Thanks. :)
- Melv.
06/30/2004 (10:37 am)
Just noticed that one of the links above wasn't working so I fixed it; here's a shortcut if you're interested...Complex Mounts with little overhead (Shows layered/animated object for background)...
Low-Res Movie
@Eric: Thanks. :)
- Melv.
#14
It only seems fair that you get a little financial reimbursement back for the hard work you've put into our community.
At least that's the way I see it!
06/30/2004 (11:05 am)
I know that I would buy it if you made it available. But then I've also been pushing for the particle effects stuff you've been working on to be put up for sale.It only seems fair that you get a little financial reimbursement back for the hard work you've put into our community.
At least that's the way I see it!
#15
- Melv.
06/30/2004 (11:07 am)
I'd like to think that next year I can actually finish the 3D particle-engine but if I do, it will definately be part of finishing Strategem. Strategem is far from dead and too important to lose, it's just a little stationary for the moment. All good things come to those who wait. :)- Melv.
#16
06/30/2004 (12:14 pm)
Great work Melv, this would make a great add-on to Torque. You could sell it as "the Torque Retro 2d Enchancement" or soemthing like that.
#17
06/30/2004 (12:30 pm)
Hey Melv your movie download is broken, whenever I try downloading it I only get 10Kbyte of it before your web host cuts it off.
#18
I thought it was interesting a while back when you were discussing the particle effects in Strategem and the likelihood of selling them as an add-on pack. There seemed to be quite a split between people as to whether resources should be free or for sale. I'm on the for-sale side because I don't mind paying for high quality work. If I'm willing to pay for a texture pack or model pack that I can modify to make my life easier, why not pay for a code pack that will do the same thing?
But I noticed that a lot of people who were dead-set against buying packages in that topic seemed to purchase the lighting pack.
I'm looking forward to playing Strategem in the future. After all, I get pissed enough playing Majong and Civ II for losing because I did something stupid...why not get even more annoyed at myself!
06/30/2004 (12:32 pm)
Of course, if it collides with what GG is working on in the 2D arena, selling it may not be too profitable if suddenly 2D support becomes native for free. Even from a support basis. Of course, you know what they're working on (and it's no secret what you're working on), so it probably wouldn't be much of an issue.I thought it was interesting a while back when you were discussing the particle effects in Strategem and the likelihood of selling them as an add-on pack. There seemed to be quite a split between people as to whether resources should be free or for sale. I'm on the for-sale side because I don't mind paying for high quality work. If I'm willing to pay for a texture pack or model pack that I can modify to make my life easier, why not pay for a code pack that will do the same thing?
But I noticed that a lot of people who were dead-set against buying packages in that topic seemed to purchase the lighting pack.
I'm looking forward to playing Strategem in the future. After all, I get pissed enough playing Majong and Civ II for losing because I did something stupid...why not get even more annoyed at myself!
#19
@Nathan: I've uploaded it again, thanks bud.
- Tonight I've been fixing-up some of the internal castRay functionality which wasn't working so well but is now super-fast. Tomorrow evening I'll be finalising the projectile stuff and moving onto expanding/finishing the particle-engine for the weekend. Got all Thur/Fri evening and all day/evening Sat to work on it and I'm really looking forward to it. Looks like I'll be producing two babies this year. 8)
- Melv.
06/30/2004 (12:49 pm)
@David: You can always count on me working *with* GG rather than against them. I'm here to learn stuff like everyone else but I agree that selling stuff like this shouldn't be an issue. Like everything in life, you should get what you pay for and if this was to be sold, I'm sure you'll get value for money. It's just so much fun to play with. :)@Nathan: I've uploaded it again, thanks bud.
- Tonight I've been fixing-up some of the internal castRay functionality which wasn't working so well but is now super-fast. Tomorrow evening I'll be finalising the projectile stuff and moving onto expanding/finishing the particle-engine for the weekend. Got all Thur/Fri evening and all day/evening Sat to work on it and I'm really looking forward to it. Looks like I'll be producing two babies this year. 8)
- Melv.
#20
Here's a question about the plans for tiling and layers. Will the tile maps also be able to be layered? If that's the case, then multiple tile maps could create complex worlds ala Ultima VII's. The functionality of U7 wouldn't be there (of course) without a lot of programming, but the basic layered tile maps and height offsets could be implemented in that fashion, right? Or am I really off-base. I'm probably trying to think too far ahead into an educational project for teaching young wannabe game developers the basics, and Torque fits into that because it's an extremely well-put-tother engine and is cross-platform (but the complexity of teaching 3D concepts, the 3D toolsets, etc is my stopping point). The idea of a 2D Torque is perfect for new initiates. Plus, when their feet are soaked, they can move on to the rest of the engine and get washed away in the flood like the rest of us.
07/01/2004 (2:06 pm)
In thinking about the tiling features, I think that it's important in the 2D scope of gaming because it could help those users who would normally purchase a Clik-n-Play product and end up unhappy with its limitations to create the Final Fantasy VI clone of their dreams. But I think the functionality of creating normal and isometric tiled surfaces is more important than an easy-to-use editor at this point. The editor only needs to be as functional as it takes to test the tiling code. Otherwise your time will be spent making tiling editors rather than the actual fun stuff. After all, for the time being it's possible to use external tile editing tools until someone steps up to make an actual internal editor (because as soon as you make an internal map editor, someone will want a tile painting and sprite editing program built in as well). While the use of external editors is one of the points of contention among some of the Torque community, it would greatly help keep the project compartmentalized so that you're working on making it feature rich rather than catering to whims of individual projects.Here's a question about the plans for tiling and layers. Will the tile maps also be able to be layered? If that's the case, then multiple tile maps could create complex worlds ala Ultima VII's. The functionality of U7 wouldn't be there (of course) without a lot of programming, but the basic layered tile maps and height offsets could be implemented in that fashion, right? Or am I really off-base. I'm probably trying to think too far ahead into an educational project for teaching young wannabe game developers the basics, and Torque fits into that because it's an extremely well-put-tother engine and is cross-platform (but the complexity of teaching 3D concepts, the 3D toolsets, etc is my stopping point). The idea of a 2D Torque is perfect for new initiates. Plus, when their feet are soaked, they can move on to the rest of the engine and get washed away in the flood like the rest of us.
Torque 3D Owner Eric Forhan