Jump to content

  • Log In with Google      Sign In   
  • Create Account

Banner advertising on our site currently available from just $5!


1. Learn about the promo. 2. Sign up for GDNet+. 3. Set up your advert!


Simulating 3D in a 2D world


Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.

  • You cannot reply to this topic
3 replies to this topic

#1 Lance42   Members   -  Reputation: 339

Like
0Likes
Like

Posted 09 September 2012 - 10:41 AM

Greetings!

I've been working on a game for a bit, and was tempted to go 3D, but at this point am planning on sticking with 2D. There are a few things I'd like some advice on, however. Any advice on these would be appreciated:

1. Can I have certain elements of the game in 3D, such as the player avatar?

2. I'd like at some point to implement somewhat realistic water effects. Do reflective water effects even work in a 2D environment? (What is there to reflect? Sprites?)

3. My world tiles are currently squares. I'm wondering if I turn them in to 3/4 view cubes and draw them bottom to top if that will give a good 3D feel while maintaining a 2D world.

Any advice would be appreciated. Thank you!

Lance...

Sponsor:

#2 Safixk   Members   -  Reputation: 106

Like
0Likes
Like

Posted 09 September 2012 - 11:17 AM

Hello There!
I'm a beginner as well, and here's some terms that I've heard about, they might just help you. But you might need to do some research on them.
What you are looking for is Isometric textures, which allow you to have certain things appear in 3D while you are working with 2D really.
Also you might want to look into parallax scrolling, which allows your Character Sprite to move in all directions as if there was a 3D plane instead of a just right-left kind of thing. As for water reflection I'm not really sure what you can do apart from realistic textures, and for water reflection, you might need to do some research on your own. I've you've played Pokemon, you'll be sure to know what I'm talking about. It's a 2D game but it looks 3D because it uses isometric textures and parallax scrolling. So to sum it up:

1- No, not really you can't implement 3D models and keep the 2D aspect of the game, BUT you can make 2D objects appear 3D
2- I think there is no "live" way to do it, so maybe you can have a sort of a transparent sprite over the water sprite and the transparent sprite is a "reflection" of the objects near the water. Down side of that is, let's say the character goes by the water, he won't be able to see himself reflected.
3- Don't change the dimension of the squares, leave them as is, but design your sprites in a way in which they appear 3D

Now here's something to help you out understanding what I mean (even though it's not using code as much as a game engine) - http://sandbox.yoyogames.com/make/tutorials and here is what you should be looking for "Tutorial: 3-Dimensional Games", also make sure to download the .zip and read the PDF as it contains some information you might want.

Hope it helps!
- Pedro "Safixk"

#3 menyo   Members   -  Reputation: 513

Like
0Likes
Like

Posted 09 September 2012 - 11:36 AM

Little time so a short answer
1: Sure you can, there are plenty of games that mix 2D and 3D.
2: For your water effects you could use a cube map. It's a cube around the reflection material and it reflects the texture of the cubemap. You could have a sky texture mapped on it for a top down view.
3: You textures will look very distorted if you turn them. It might be better to turn your game into 3D and use flat planes (also called billboards/billboarding) as your tiles. This way you solve everything.

*: Then again, if you don't have much experience just stick to a simple 2D only game. In the end a finished product counts more then a polished unfinished product.

Current Project: TechnoFlux read all about it on my

DEV BLOG


#4 Tom KQT   Members   -  Reputation: 1633

Like
0Likes
Like

Posted 09 September 2012 - 11:40 AM

1- No, not really you can't implement 3D models and keep the 2D aspect of the game, BUT you can make 2D objects appear 3D

I don't understand why he couldn't have 3D models in a 2D game, if he wanted to. Is your concern just the fact that he couldn't call the game 2D anymore, or do you actually think that it wouldn't be possible to implement at all?
You can render 3D models in an izometric 2D game if you want, there's no problem with that. You have to use orthographic camera.




Old topic!
Guest, the last post of this topic is over 60 days old and at this point you may not reply in this topic. If you wish to continue this conversation start a new topic.



PARTNERS