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.

Dark GDK / Trying to make a 2d screen on a 3d game

Author
Message
Karna
14
Years of Service
User Offline
Joined: 22nd Jan 2010
Location: American Left Coast
Posted: 13th Jul 2010 13:30
So I am making a 3d game (role playing style / 3rd person shooter). Instead of person-to-person combat, I want to open 2d a "mini-game" (it opens, the program focuses on that, it concludes then the program is 3d again). Problem is, I understand how to make 2d games and 3d games, but not how to mix these two formats.

Any suggestion would be appreciated.
JTK
14
Years of Service
User Offline
Joined: 10th Feb 2010
Location:
Posted: 13th Jul 2010 16:03
Are you talkng 2d a'la tic-tac-toe or 2d a'la Mario? In any case, the gist of the difference is mostly camera placement (perspective). I recently had a similar question about two months ago and the insights the others gave me were very helpful.

I don't remember the exact topic but it was something about help understanding 3d. Anyway, have a look for it. They explain camera placement for 3d objects in a 2d environment.

if after you find it (or the many other similar posts) you still don't understand, feel free to ask again, I'm sure someone can help you out...


JTK
_Pauli_
AGK Developer
15
Years of Service
User Offline
Joined: 13th Aug 2009
Location: Germany
Posted: 13th Jul 2010 17:47
Or just draw sprites on top of the 3D scene...

Now the plot thickens, the fps decreases, and the awesomeness goes through the roof.
SunDawg
19
Years of Service
User Offline
Joined: 21st Dec 2004
Location: Massachusetts
Posted: 14th Jul 2010 18:11
You could create a plane and position it directly in front of the camera, then you would only need to draw to a bitmap, get an image from it, and texture the plane.
Karna
14
Years of Service
User Offline
Joined: 22nd Jan 2010
Location: American Left Coast
Posted: 15th Jul 2010 08:56
@_Pauli_ and @SunDawg, thanks those are good ideas.

Could they be combined? If I placed a plane between the camera and elements of the terrain, then could I paste sprites directly on a plane?

Some games, like Wizard101, seem to do this and you can even see the 3D world around the edges of the plane.

I have been working in 2D for a while now and my understanding is that sprites have to be drawn only on the XY axis... how can I place sprites on a plane perpendicualr to the XY axis?

The only way I can come up with is that I move the camera somewhere FAR FAR away and adjust the camera angle along the Z axis and do the 2D stuff there. When I am done with the 2D stuff, jump back to the previous location. But this seems clumsy.
Matty H
16
Years of Service
User Offline
Joined: 7th Oct 2008
Location: England
Posted: 15th Jul 2010 18:47
Quote: "Problem is, I understand how to make 2d games and 3d games, but not how to mix these two formats."


There is no problem:

Quote: "Or just draw sprites on top of the 3D scene..."


There is your answer.

Your players meet in combat, place a background sprite down to cover some of your 3D game, then just make sure all other sprites stay within th x,y boundaries of that background sprite.

2D and 3D mix in nearly every game, most GUI stuff is 2D on top of 3D stuff.

Login to post a reply

Server time is: 2024-11-19 20:36:45
Your offset time is: 2024-11-19 20:36:45