Game Development Community

Help W/ Character Sprites - How are they displayed&oriented?

by KP · in Torque Game Engine · 03/06/2006 (4:22 am) · 4 replies

Hi!

In my 3d game I'm working on, I'd like for the characters - both player-controlled and NPC - to all be sprites, rather than 3d models. Think like in the old Duke Nukem or Doom games - where they could still turn and face other directions, they weren't always facing you.
I just don't get how they did that though - and how I'll need to do it?
For example - is it just as simple as arranging the different sprites on different polygonal planes which themselves turn, bringing new 'sides' into view? That doesn't seem right to me, though, because then you'd have to, at some point, see more than one side at once. So just /how/ did they get it so that you only saw one 'view' of the sprite's animation at a time? My game will be played online as well, so I need to know how to make sure the players see the proper orientation of other players' characters.
Do I need to compare some kind of orientation value of each character against every other looking at it?, is that how it's done?
Thanks!

#1
03/06/2006 (7:31 am)
Okay, first of all, you're comparing a 3D polygonal engine to a 2D->3D ray-traced engine. That right there will cause some difficulty in translation. Torque and other modern 3D engines do not operate in the same way (there are definitely technical simularities with scenegraph rendering and such, but the initial design mentalities were quite different).

I would strongly recommend looking at the billboarding code and checking how it updates. Then, working from there, add a custom scene object that extends the functionality to include sprite objects.

Of course others may have already played with the billboarding code to provide sprite-based graphics into the 3D scenegraph, but I don't know.
#2
03/07/2006 (1:13 am)
Thanks for reply David! I'm kind of confused by your advice, but I guess I just need to work through more of the tutorials to learn what "custom scene objects" and "scenegraphs" are, and where I'd find something like "billboarding code", "how it updates" -- and what would be involved in "adding" anything!
But I wonder - don't a lot of real-time strategy games work kind of like what I'm after? In the old Shogun and Medieval War games?, and I'm sure somebody has made something similar with Torque?
#3
03/07/2006 (1:16 am)
There was a billboard-object resource at one point, but I can't find it anymore.
I used it for muzzle flashes, so it has to be in there somewhere.
#4
03/07/2006 (7:50 am)
My advice is often confusing. Take what you can and discard the rest. For a discussion of the fundamental difference between ray-traced projectiong engines (Wolf 3D/Doom/Duke) and BSP 3D engines (Quake/2/3, Unreal), take a look at Michael Abrash's Graphics Programming Black Book and Ramblings in Real-Time. That will at least give a basic overview of two types of engines.