- Home /
2D Battle System In a 3D Game
Hello Everyone. I'm trying to make a game similar to older RPG games like Final Fantasy. In my game the player walks around a top down but fully 3D environment but when they encounter an enemy, I want the game to transition to a 2D sprite based battle scene. Ideally I'd like to keep the main 3D world loaded in so there is no delay when entering or exiting the battle. The way I was thinking of handling this would be to use UI canvas elements and have a background layer that blocks the main scene but this might present some problems later on. Is there anyway I can pipe in a fully 2D scene over the already running 3D scene that might work better than having everything as UI? Thank you!
I think doing it all in a UI canvas is the way to go.. however you can do the same thing all with sprite and either billboard them to face the camera or make them a child of the camera.. what issues do you have with using the canvas?
I'd create a hierarchy for 2D and 3D elements and have separate cameras too in each, then disable and enable these whole hierarchies as required.
Create a splash screen for transitions and your good to go.
Answer by spilat12 · Jun 26, 2021 at 06:15 PM
A 3D scene and a 2D scene have a single difference: camera perpective. What you are calling a "2D scene" is technically a 3D scene with ortographic camera. THAT IS ALL. There is no other differences. Unity is a 3D engine and even when you create a 2D game with it, it still has z-coordinate, no matter what you do. So just work as you did before, there's a handy 2D perpective button in the top of the scene view, use sprites. For the love of god, don't use canvas for it :-) You are just signing up for life of hell. Simply enable/disable your 3D objects and 2D object as you need them.
Thank you for your answer! I'll avoid canvas then if you think that it will be more difficult in the long run.
Answer by warthos3399 · Jun 26, 2021 at 12:39 AM
I dont think thats possible, thats why Unity has seperate templates for 2d, 3d, and SRP's, because they are so different. Not saying it isnt possible, ive just never seen it done in Unity. 3D is much better, and less set up hassle. Another thing is performance, keeping a 3d scene running while you load/run a 2D, might cause alot of performance probs. Thats why games like Final Fantasy and the likes, use 3D.
I would just switch the camera's view differently when a battle starts (like more down to ground level, and a more 3D perspective), and return to top down view after battle ends.
Answer by Kyleighh · Jun 24, 2021 at 08:24 AM
I prefer 3D to 2D and still like 2D but 2D has a tendency to make my blood boil tbh
I think 3D is much more like a real fight and it's less oppressive with getting caught in the corner and combos in general. 3D seems to rely more heavily on mind-games, knowing when to attack, and having fast reflexes in general. Which also allows you to be more creative I think. I feel like 2D has more to do with memorization. Moves in 2D games are just too fast for your eyes to see to an extent and it relies more on button inputs. I never liked the idea of TODs, or just these combos that take 40% of your health away just cause they landed the first blow.
I appreciate the insight but this is more in regards to technically how to load a 2d scene over a 3d scene without unloading the 3d scene. Also I was going to have the battle be turn based probably but thanks for the reply!
Your answer
Follow this Question
Related Questions
2D Shadows? 3 Answers
Isometric game: 2D background mixing with 3D models 2 Answers
Looking for a simple way to Add an Image or text to a 3d Model 1 Answer
UDP app signature? 1 Answer
mobile developement 1 Answer