Game Development Community

2D mixed with 3D - Graphics/Tools questions for T3D Users

by Benjamin Stanley · in Torque 3D Beginner · 02/20/2013 (4:45 pm) · 11 replies

Hey all!

Currently I am developing a game with Torque 3D. To cut down on 3D assets used and package size I am planning to make the game mostly 2D so things such as enemies, Potions, loot, etc. are mainly 2D.

However the environment is 3D - So buildings, doors, etc. are 3D. I also want it to be fairly expansive similar to the Elder Scrolls: Daggerfall. Which to this day still has the largest game world of 62,394 Square Miles. Allot of the content for the dungeons is procedural at least in daggerfall.

Now why am I doing this - I have found that games such as Skyrim and Oblivon are lacking in depth / size that their tabletop counterparts (Dungeons & Dragons, Savage Worlds, etc.) at heart I am a pen and paper RPG nut. I love these kind of games however Skyrim lacked depth. Daggerfall was perfect in my honest opinion. You do not need more beautiful worlds or characters you just need better game play and to expand on that.

Now the questions -

1. How can I go about adding 2D images for Weapons inside a 3D engine like torque? As well as keeping them animating like they should and swapping them out when they should not be in use, etc. I am thinking that the images need to be put on to a 2D plane and animated within the engine.
Reference - http://www.youtube.com/watch?v=KAlziRu-nsM

2. Would any special tools be needed for a game like this? At least with torque 3D.

3. World Generation - I am going to be generation my levels on a per level basis. Just to keep things fresh and keep allot off weight of my shoulders in terms of level design/Content creation. Navigation will be similar to Malevolence - http://www.malevolencegame.com/ - So a marching cubes or infinite terrain system will be needed.

4. Do you think that this is too ambitious for me to aim for? I know that I can aim lower if needs be.

About the author

My name is Benjamin Stanley. I am a Procedural World enthusiast, 3D artist, and Generally Awesome Guy. I have worked on various projects and Modifications in the past and I am currently looking at making a Free Game with Torque 3D or Torque 2D.


#1
02/20/2013 (6:06 pm)
HeXen.... interesting choice. This game was based on the original DOOM engine. I.E. 2D sprites that rotate toward the camera view (in T3D).... Might be that you could accomplish a similar approach using the same tech. This line of code might help:

singleton TSShapeConstructor(HANDS DAE) //hand image
{
baseShape = "./hands.DAE";
loadLights = "0";
};

function HandsDAE::onLoad(%this)
{
%this.setMeshType("grouptwo 400", "billboard");
%this.setObjectNode("grouptwo", "grouptwo400");
}

Keep in mind that I am NOT a scripter or coder by any means, but this is an approach I use to keep an image plane orientated to the camera. Hope this helps. Keep in mind, others may have a better approach.

Ron
#2
02/20/2013 (7:10 pm)
Hey Ron - Going to give this a try in the morning.

I will let you know how it works!
#3
02/20/2013 (7:21 pm)
Let me know how it works! I think something like this would greatly assist the mobile development community. Also, please keep in mind that this is "sorta" code...you will need to refine it.

Ron
#4
02/20/2013 (8:19 pm)
Sounds like you want these:

www.garagegames.com/community/resources/view/20403
www.garagegames.com/community/resources/view/20417

Haven't checked to see if the comments cover it being updated to T3D or anything, but it should offer a solid starting point either way.
#5
02/20/2013 (9:46 pm)
Is IFL still in the engine? I know it is deprecated.
#6
02/20/2013 (9:49 pm)
No, IFL was removed in one of the 1.1 Betas. I think 3, maybe 2.

Actually, I'm kind of surprised no one has submitted a pull request adding it back in.
#7
02/21/2013 (7:28 am)
Well, the replacement was kind of terrible - an image with all frames in a single row. I'm thinking we need to come up with a single image animation system similar to T2D's animations for animated textures. My reasoning is that having a single image should be more efficient with modern graphics hardware according to almost everything I've read and it works pretty well to boot.

And for this particular application we could extend the existing billboards to make a billboard object. Should be a pretty simple class derived from GameBase or ShapeBase, eh?
#8
02/21/2013 (11:21 am)
Hey all!

I haven't given this a try yet. What is IFL?

I would also clarify that I am not a programmer in anyway shape or form. I only know the basics - Compiling stuff and a few other things.

I am an artist for the most part with very basic knowledge of visual studio.
#9
02/25/2013 (12:42 pm)
Do a google search for Image File List.

I ripped this from the Autodesk website.

An IFL (Image File List) file is an ASCII file that constructs an animation by listing single-frame bitmap files to be used for each rendered frame. When you assign an IFL file as a bitmap, rendering steps through each specified frame, resulting in an animated map.

(In a similar way, if you assign an AVI file or MOV file as a bitmap, rendering steps through each frame of the animation.)

For example, if you assign a 10-frame animation of a blinking red "Danger" sign to a material's diffuse component, apply the material to a cube, and then render a 30-frame animation, the cube displays the blinking red Danger animation three times.


#10
07/05/2013 (11:31 am)
I'm bringing this thread back from the dead because I too ask myself that question, and from what I read IFL isn't in the engine anymore so...

How can one add 2d things ala doom in torque3d ?
#11
07/07/2013 (4:00 am)
When i needed to add billboard game object to my game i took renderObjectExample class. Then rewrote it so it would extend GameBase class and copied rendering functionality from ScatterSky::_renderMoon. To animate it I increment a time counter in processTick, and use this value when i create UV coordinates in render function.

Thats probably the hardest way to do it, but i haven't came up with anything better at the time. Theres also a draw back - every object ads a draw call.