Combining 2D and 3D
by Steve Lamperti · in Torque 3D Beginner · 10/16/2013 (2:38 pm) · 17 replies
I am considering starting a project that combines a 2D front end/game, with 3D missions. I was wondering if anyone has any experience with combining T2D and T3D, or if this is a bad idea for how to get started.
If anyone has any suggestions as to a good way to approach this kind of project, I would appreciate hearing them.
(I am familiar with T3D, but have not touched T2D.)
If anyone has any suggestions as to a good way to approach this kind of project, I would appreciate hearing them.
(I am familiar with T3D, but have not touched T2D.)
#2
You can combine T2D and T3D. It really isn't that hard :)
For example as shown in pictures. You can play 2D level (mission), then after level is over, jump on 3D (and vice-verse). And in that way to keep full compatibility with touch-interface for touch-screens on 2D and 3D missions (levels).
Picture 1:

EDIT: Added wrong picture
Picture 2:
10/16/2013 (4:35 pm)
I never fully understand why separate community and coders into those who work on Torque2D and rest who work on Torque3D.You can combine T2D and T3D. It really isn't that hard :)
For example as shown in pictures. You can play 2D level (mission), then after level is over, jump on 3D (and vice-verse). And in that way to keep full compatibility with touch-interface for touch-screens on 2D and 3D missions (levels).
Picture 1:

EDIT: Added wrong picture
Picture 2:
#3
@Dusan Saying this is easy is easy, but how does one go about it? Are T2D and T3D compatible enough to support jumping from one to the other? I've seen contrary posts on this website about that question.
10/16/2013 (6:49 pm)
@Nin-nin I haven't used it, but I've been reading about T2D and was getting excited about the 2D interface it seemed like I could build with it. My game idea will have multiple screens with 2D elements and you will not even go into the 3D missions until after a bit of time has passed. A good way to think of it is like the x-com game, where until you go on a mission, everything up to then is just a screen with interface items, which could all be easily represented by a 2D engine.@Dusan Saying this is easy is easy, but how does one go about it? Are T2D and T3D compatible enough to support jumping from one to the other? I've seen contrary posts on this website about that question.
#4
10/17/2013 (12:20 am)
It sounds like you just want to use the 2D Gui that torque 3D has at least from what I can understand your trying to do.
#5
i think,that depends on man skill.
in past,gg actually combined tgb and t3d together.
10/17/2013 (1:07 am)
"Are T2D and T3D compatible enough to support jumping from one to the other?"i think,that depends on man skill.
in past,gg actually combined tgb and t3d together.
#6
10/17/2013 (9:17 am)
I think I've decided to try out going with T2D and doing my '3D' missions in isometric 2D. Not sure if this is the best idea, and I still haven't written any code yet, so if anyone has any additional information about this question I would appreciate hearing it.
#7
10/17/2013 (12:22 pm)
In T3D your "2D" levels can be done as regular missions - just draw your stuff on quads and move them around the 3D scene. If the camera mode is set correctly you'd never know the difference....
#8
10/17/2013 (1:27 pm)
I am not talking about hacks and moving cameras. I am talking about full merge Torque3D with Torque2D, with creating combined 2D/3D engine layer (from T2D and T3D).
#9
1. Everything you put on the screen is a mirage. If it gets the job done and is designed well it is not a hack.
2. If you are working with 3D/2D hardware you always have to deal with the camera even if only indirectly. T2D uses OpenGL which does have transforms for camera position.
3. I think you will find that merging the 2 does not really blend well as the two engines make assumptions about the interface to the video cards. It will take deep understanding of both engines to accomplish. You will have to convert either T3D to use OpenGL or T2D to use DirectX.
I have done rendering to a texture to place on a surface in 3D. It takes some understanding of transforms (ultimately the low level camera, world, and their relationships), but it is not difficult. Honestly though. Mini games could be all 3D. So you could watch the game from the fps perspective while someone playing the game could be more focused in an above view. Could make for interesting mini game interaction with 3rd party players.
10/17/2013 (3:50 pm)
@Dusan,1. Everything you put on the screen is a mirage. If it gets the job done and is designed well it is not a hack.
2. If you are working with 3D/2D hardware you always have to deal with the camera even if only indirectly. T2D uses OpenGL which does have transforms for camera position.
3. I think you will find that merging the 2 does not really blend well as the two engines make assumptions about the interface to the video cards. It will take deep understanding of both engines to accomplish. You will have to convert either T3D to use OpenGL or T2D to use DirectX.
I have done rendering to a texture to place on a surface in 3D. It takes some understanding of transforms (ultimately the low level camera, world, and their relationships), but it is not difficult. Honestly though. Mini games could be all 3D. So you could watch the game from the fps perspective while someone playing the game could be more focused in an above view. Could make for interesting mini game interaction with 3rd party players.
#10
I still stand by my standing on this.
You say right, If the job is done correctly it is not a hack.
I already have merged both engines, with using DirectX on Windows and Windows (non RT) platforms and OpenGL (GLES) on Ubuntu/Ubuntu Tablet (I don't have Mac so I cannot do Mac programming)
10/17/2013 (4:03 pm)
@DemolishunI still stand by my standing on this.
You say right, If the job is done correctly it is not a hack.
I already have merged both engines, with using DirectX on Windows and Windows (non RT) platforms and OpenGL (GLES) on Ubuntu/Ubuntu Tablet (I don't have Mac so I cannot do Mac programming)
#11
10/17/2013 (8:05 pm)
I wasn't talking about a hack either - there is nothing wrong with using a 3D engine to make a 2D game. Just a different approach is all.
#12
@Dusan - So have you switched all of T3D's persistence handling for materials, levels, etc, to T2D's TAML and Module system?
10/18/2013 (5:45 am)
Quote:I already have merged both engines,Nifty. I'll agree with several people here that a merge of the two engines is not trivial, provided you aim to support all existing platforms both engines already support and do not sacrifice the best features of both. However, more than doable in the hands of a competent coder.
@Dusan - So have you switched all of T3D's persistence handling for materials, levels, etc, to T2D's TAML and Module system?
#13
10/18/2013 (6:19 am)
If a hybrid engine is working under Ubuntu, are there plans to eventually submit a pull request with Linux platform support to the T2D repo? As the second most requested platform behind Android, that could certainly help grow the user base.
#14
10/18/2013 (9:17 am)
I think the answer to my original question is pretty clear for me. Unless I want to spent a great deal of time just working on making the engines work together I should not bother with trying to merge T2D and T3D. That leaves me with the question of using T3D and trying to make my 2D stuff fit, or using T2D and trying to make something resembling the 3D look I would like perhaps using the isometric view. T2D feels hard to get started with right now with the editors MIA. Any suggestions as to how to start?
#15
tgb is mergable with t3d.but merging t2d into t3d or t3d into t2b will take time for different engine architecture.
10/18/2013 (9:53 am)
dusan which 2d engine you are talking about.t2d or tgb ?tgb is mergable with t3d.but merging t2d into t3d or t3d into t2b will take time for different engine architecture.
#16
10/21/2013 (1:02 pm)
Quote:@Dusan - So have you switched all of T3D's persistence handling for materials, levels, etc, to T2D's TAML and Module system?This.
Quote:If a hybrid engine is working under Ubuntu, are there plans to eventually submit a pull request with Linux platform support to the T2D repo? As the second most requested platform behind Android, that could certainly help grow the user base.It seems that all of the promised pull requests for various platforms support, graphics api changes, T3D+T2D, etc, etc have dried up... just saying.
#17
I have no experience with T2D so can't say which approach would be better, or easier.
10/21/2013 (1:08 pm)
@Steve Lamperti: there was a TGE Resource that introduced basic sprite handling in a 3d environment -- I'm on my phone so I don't have the link. I had had limited success (which was time dependent) in porting and using it for T3D. But this surely can be done. For ages people were making apparent 2d scenes in Unity that were actually 3d scenes -- similar approaches in design can be utilized in T3D.I have no experience with T2D so can't say which approach would be better, or easier.
NiN-NiN
You can have a 2D GUI and everything but what exactly is 2D game wise? And what is the 3D Mission?
You can use 3D objects and have the camera stuck on the player away from them so it's like a 2D side scroller using 3D assets and you could have a trigger that changes the camera to a more 3D looking angle.