- Home /
Running a 2D game in a 3D environment - can it be done?
Hej, new to unity here.
I want to ask if you can make a 2D game play in a 3D room?
Let's say a game with 3D fantasy room where you look out the window and see a 2D game. You have to play this game before you can move to the next dimension (level) and so on. The 2D game keeps playing even if you look around the 3D room meaning none of the games are static.
So it's a 3D environment with a special window to 2D games.
Can this be done and does any of you know a tutorial where a 2D game is in a 3D environment?
I've tried to search around to see if I could find anything but so far there's nothing. So any kind of input would be nice, thanks.
The old settig up there didn't work because you needed Unity3D pro for it. Since I'm just making a game for fun, there's no use for me to buy the full package. (At least not until I decide to make a living of games). So I decided to restructure the game setting.
New Idea: What if I just use the room for distractions while the main game is the guy in the window?
So I just a Kinect to turn around in the room (not move here and there but just look around from the same spot) and place the game (at this moment just one) with level and everything just right outside the window. Would that work?
(I could just make level two the same but just with a new game outside the window)
New Idea: What if I just use the room for distractions while the main game is the guy in the window?
So I just a $$anonymous$$inect to turn around in the room (not move here and there but just look around from the same spot) and place the game (at this moment just one) with level and everything just right outside the window. Would that work?
(I could just make level two the same but just with a new game outside the window)
it could work. but you will be looking with a perspective camera at a 2D level which might make the game look weird, unless you have a very small distance in the Z axis what will most likely lead to some other problems.
Answer by guido123 · Apr 02, 2014 at 10:12 AM
have a second orthographic camera render to texture and put that texture on the window. The 2d game should be somewhere in the scene to.
I see but as fafase said, it's a pro feature which sucks since that would mean paying for Unity for this small game. Still thanks for the input.
Answer by fafase · Apr 02, 2014 at 10:14 AM
I guess that could be done using RenderTexture which is a pro feature.
You have your front game (the 3D game) and you move around but you also have other games in parts of the scene you cannot see and they have their own cameras. You render the rendering (...) of each camera on the appropriate texture which is the screen on which you are looking to play those 2D games.
But the rendering on those textures will not be as good as if you were really playing.
So you could have the game running on the texture for visual effect but if the player chooses to play the game then you could have a camera diving effect onto the screen and you switch camera from 3D cam to corresponding game camera and you can also set all the scripts for control.
Seems like a nice feature which could be used: http://www.youtube.com/watch?v=-qd6YwXlC7U
But yes, it's a pro feature. Thanks. Any way to avoid getting unity pro and still get same effect?
Nope. You know they also have bills and developers to pay at the end of the month so they need to get their money one way or another... So if you want that feature in your game, you pay or you try with another engine. But UD$$anonymous$$ has its own way of getting your money. What you could do is fake the playing of the game on the screen. Ins$$anonymous$$d of seeing the real game, you see an animation of the game. This is possible with no pro.
Awwww, now I have to figure out something else. After all, I'm new to this Unity stuff (and just between beginner and intermediate for ga$$anonymous$$g) so paying for the engine without thinking of making money on the game, no go for me. Not going with the UD$$anonymous$$ (unreal right?) since I just saw their "license" stuff.