Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

2D All the way! / 2d characters on 3d Worlds

Author
Message
Strife
21
Years of Service
User Offline
Joined: 11th Dec 2002
Location:
Posted: 4th Mar 2009 22:01
Hi, I tried searching for a easy way to do this, but it was difficult to find anything that involves both 2d and 3d integrated. I have been programming many games in 2d and I was wondering whether there was a way to add 2d sprites (or characters, to avoid confusion with that function) into a 3d world.

If you have ever played Final Fantasy Tactics (or even older FPS games like the first Doom or Wolfenstein), you may know what I am talking about. They use a combination of a 3d world with 2d sprites as the acting characters in the game.

My guess to solving this is to keep track how far away the sprites are from the camera and scale them accordingly. Anyways, any thoughts or suggestions would be greatly appreciated. Thanks.
BMacZero
18
Years of Service
User Offline
Joined: 30th Dec 2005
Location: E:/ NA / USA
Posted: 7th Mar 2009 17:17
I'm guessing that Doom didn't actually use sprites for the enemies and such. They probably used a plain textured with the enemy image and rotated to always point at the player.

flashing snall
18
Years of Service
User Offline
Joined: 8th Oct 2005
Location: Boston
Posted: 8th Mar 2009 03:20
yea, I think its called billboarding. Im doing that for my current work.


You have the right to remain silent.
man id unknown
17
Years of Service
User Offline
Joined: 31st Jan 2007
Location:
Posted: 30th Mar 2009 05:28
Actually, I thought Doom did use sprites. Remember, Doom was before 3d libraries (like OpenGL & DirectX) were standard.
JLMoondog
Moderator
15
Years of Service
User Offline
Joined: 18th Jan 2009
Location: Paradox
Posted: 31st Mar 2009 19:41 Edited at: 31st Mar 2009 19:45
Doom was 3d, and enemy's/items/objects were billboarded(a single plan that always faces the camera). This technique is still used in next-gen games for their speed purposes.

Strife:
What I think your looking for is a 2.5D approach to creating a game. This is actually quit simple to accomplish using a 3d backdrop and a single 'billboard' plain.

By looking at FF Tactics we can see that it uses a 3d grid based level. Navigating consist of moving across the grid with your character a certain amount of spaces per turn. To create the characters a single plain is bill-boarded and texture with the character with an alpha map.

Now to get the rotation effect you'll have to calculate the characters angle relevant to the camera's angle, and texture it accordingly.

A simple way to do this(fixed camera with angle 0):

Now lets add an angle to the camera(intervels of 45degrees for easy of use):

This is mostly guess work and a layout theory of creating this effect. I'll create a test object and get back to you with the resluts.

Now for the effect to look convincing you'll have to create a separate set of animated images for each angle for each movement your character takes. You could cheat and pull a Diablo, or do it by hand with some nice pixel characters.

AndrewT
17
Years of Service
User Offline
Joined: 11th Feb 2007
Location: MI, USA
Posted: 3rd Apr 2009 02:12
Quote: "Actually, I thought Doom did use sprites. Remember, Doom was before 3d libraries (like OpenGL & DirectX) were standard. "


I *think* that Doom used raycasting--I know that Wolfenstein 3D did--and although that's technically not 3D by our standards, it is most definitely not sprites.

Neodelito
18
Years of Service
User Offline
Joined: 29th Jul 2005
Location:
Posted: 29th Jun 2009 19:36
mm.. is easy..
Use DBC or DBPro
and this code..
enemy png is your enemy image. if you use png you can use transparent textures, and set object 1,0,1 (all black ink are transparent)



[url="http://www.3dpoder.com/jaimezegpi/"][/url]
Grog Grueslayer
Valued Member
18
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 29th Jun 2009 20:47
A lot of older games used that technique for monsters, plants and trees like Might and Magic 7. When you pan the view left or right you can see the objects are slightly out of sync with the camera angle so it's easy to tell that their just 3D plains.

Pincho Paxton
21
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 3rd Jul 2009 20:15
I have made a few games like this. I have used sprites, and Plains in the past. But when you are scaling objects it is best to use plains, because you just move them forwards, and backwards like any other 3D object.

NeX the Fairly Fast Ferret
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 5th Jul 2009 13:59
DON'T point the plain at the camera, it looks really stupid when you walk past it. Give the plain the same angle as the camera.

Ex.:


Dark Dragon
16
Years of Service
User Offline
Joined: 22nd Jun 2007
Location: In the ring, Kickin\' *donkeybutt*.
Posted: 7th Jul 2009 04:06
Have a look here......what i'm doing with the plains.......is that what ur talking about?

http://forum.thegamecreators.com/?m=forum_view&t=153786&b=10

Your signature has been erased by a mod because it was too big.CHANGE IT OR DIE!!!!!
NeX the Fairly Fast Ferret
19
Years of Service
User Offline
Joined: 10th Apr 2005
Location: The Fifth Plane of Oblivion
Posted: 7th Jul 2009 14:35
Have you got sync set off or something? It runs really slow and the interface flickers.

Login to post a reply

Server time is: 2024-04-20 15:26:38
Your offset time is: 2024-04-20 15:26:38