Loading and animating a 2D sprite in Torque
by Frederic66 · in Torque Game Engine · 04/10/2004 (3:19 pm) · 7 replies
Hei all!
I just bought the Torque engine and have played around with it a bit. I have managed to (finally) compile the FPS demo using VC++ compiler. I have played around with the GUI tutorials. I have modified the terrain a bit and what have you.
I am working on a 3D wargame where 2D soldier sprites would be animated on a 3D battlefield. I have the animation sequences for the 2D soldier as a set of .bmp files.
*How do I load the bmp files into Torque?
*Could I use billboards for this? If yes, how?
*How do I animate the 2D sprites?
Thanks in advance.
-Frederic
I just bought the Torque engine and have played around with it a bit. I have managed to (finally) compile the FPS demo using VC++ compiler. I have played around with the GUI tutorials. I have modified the terrain a bit and what have you.
I am working on a 3D wargame where 2D soldier sprites would be animated on a 3D battlefield. I have the animation sequences for the 2D soldier as a set of .bmp files.
*How do I load the bmp files into Torque?
*Could I use billboards for this? If yes, how?
*How do I animate the 2D sprites?
Thanks in advance.
-Frederic
#2
04/11/2004 (6:41 pm)
I would be very thankful if someone could give me some code snippets that demonstrate loading and animating a billboard into a level.
#3
04/11/2004 (10:20 pm)
You don't have to write any code. Just create a model and export to DTS.
#4
The question is : would it be possible to build a series of 2D drawings, like a soldier walking that contains multiple frames of bmp files, and animate the bmp files in sequence?
I have not been able to find any help on that.
If the support is not already available in Torque would it be possible to write a set of classes that care of "blitting" 2D sprites on a 3D terrain background? I potentially need about 1000 sprites on the screen. Afterall there should be some primitives available to place a 2D image on a given part of the 3D screen?
04/12/2004 (7:51 am)
My problem is that my artist uses relatively inexpensive 2D art packages to draw sprites. He could give the sprite sequences to me in bmp or some such 2D format. I do not have 3DSMax and don't plan to buy one in the near future. I went through the documentation for the DTS exporter section. It assumes that you have created your models using a 3D package, either 3dSMax or MilkShape.The question is : would it be possible to build a series of 2D drawings, like a soldier walking that contains multiple frames of bmp files, and animate the bmp files in sequence?
I have not been able to find any help on that.
If the support is not already available in Torque would it be possible to write a set of classes that care of "blitting" 2D sprites on a 3D terrain background? I potentially need about 1000 sprites on the screen. Afterall there should be some primitives available to place a 2D image on a given part of the 3D screen?
#5
I believe there is a dgl function to render a billboard.
04/12/2004 (9:52 am)
These things are all possible.I believe there is a dgl function to render a billboard.
#6
04/12/2004 (1:04 pm)
Thanks Ben, for your patience. Where are these "dgl" functions located? Could I just put a "Find in files" search with the keyword "dgl"?
#7
engine/dgl/bitmapBMP.cc
engine/dgl/gbitmap.cc
engine/dgl/dgl.cc
I think those are some of the ones you might want to take a closer look into.
04/12/2004 (2:49 pm)
Bmp sucks Frederic :Pengine/dgl/bitmapBMP.cc
engine/dgl/gbitmap.cc
engine/dgl/dgl.cc
I think those are some of the ones you might want to take a closer look into.
Associate Kyle Carter