Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 13 Next capture
2021 2022 2023
1 capture
13 Jun 22 - 13 Jun 22
sparklines
Close Help
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
  • Asset Store
  • Get Unity

UNITY ACCOUNT

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account
  • Blog
  • Forums
  • Answers
  • Evangelists
  • User Groups
  • Beta Program
  • Advisory Panel

Navigation

  • Home
  • Products
  • Solutions
  • Made with Unity
  • Learning
  • Support & Services
  • Community
    • Blog
    • Forums
    • Answers
    • Evangelists
    • User Groups
    • Beta Program
    • Advisory Panel

Unity account

You need a Unity Account to shop in the Online and Asset Stores, participate in the Unity Community and manage your license portfolio. Login Create account

Language

  • Chinese
  • Spanish
  • Japanese
  • Korean
  • Portuguese
  • Ask a question
  • Spaces
    • Default
    • Help Room
    • META
    • Moderators
    • Topics
    • Questions
    • Users
    • Badges
  • Home /
avatar image
0
Question by monochr0m3 · Nov 23, 2013 at 07:44 AM · scenerpgbattle-system

Classic turn-based RPG battle scene question

I want to create a turn-based battle system where the player is transported to a different scene when they touch an enemy.

  1. Should I implement this with multiple scene files (moving to different scene while battling and return to exploration scene) or should I just use one scene and move my player to an isolated portion of the map where the battle takes place and transport them back when the battle is over?

  2. If I use multiple scenes, is there a way to communicate between scene files?

Comment
Add comment
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
4
Best Answer

Answer by GameVortex · Nov 23, 2013 at 09:53 AM

There is unfortunately not any one right answers to a question like this. It all depends on what works best for your project. There are many ways of doing this:

1: My favorite is to make the battle as a separate scene and loading it when doing battle. This has a couple of good advantages: You can easily change which scene to battle in depending on where you are in your main scene: Beach battle if you are walking on a beach, forest battle if you are walking in a forest. Also, multiple main scenes can share the same battle scene.

There are two ways of loading a battle scene in this scenario: Additive or Normal. In my project I used Additive, this has the advantage of not having to unload the main scene (which could be kind of large) and then having to load it again after the battle. I just move my assets to the battle scene after it has loaded. The disadvantage with this is that you have to have some extra control over the assets that gets loaded with the scene like Directional Lights, Lightprobes and Cameras because they could interfere with what you have in your scene already. Also Occlusion baking will not be taken into account when you load scenes additively and NavMesh will have to be generated at runtime which I think is now possible with the new 4.3 version.

With the Normal loading method you don't have to have that much control over lights and such but the disadvantage is the unloading and loading of the main scene and the need to store information about what had changed in it like monsters spawned, NPC locations and player location.

2: Second method would be to have the battle area in a remote location of the main scene as you said and just move your players to the scene when needed. This works fine for main scenes that won't have multiple battle locations and when each main scene are not going to share the scene and instead have their own unique battle location. This makes it easier for not having to load battle locations individually.

3: If your battle scene is small you could just have the entire scene in a prefab and instantiate it into the scene you are. This is just an alternate method of method #1 without the specific scene loading. The prefab here can of course not have Occlusion, Lightmaps or Lightprobes baked. So not really recommended.

I recommend method #1, but it all depends on you if Addtivie or Normal works best for your project. Also, just ask if you need me to clarify anything. =)

Comment
Add comment · Share
10 |3000 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Follow this Question

Answers Answers and Comments

17 People are following this question.

avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image avatar image

Related Questions

Enemy Database for RPG Battle System? 1 Answer

Start between scenes. 1 Answer

Turn Order 2 Answers

How can I pause one object's Update() until another class has performed its task? 2 Answers

Refresh gameObject to original prefab, but it isn't visible 1 Answer


Enterprise
Social Q&A

Social
Subscribe on YouTube social-youtube Follow on LinkedIn social-linkedin Follow on Twitter social-twitter Follow on Facebook social-facebook Follow on Instagram social-instagram

Footer

  • Purchase
    • Products
    • Subscription
    • Asset Store
    • Unity Gear
    • Resellers
  • Education
    • Students
    • Educators
    • Certification
    • Learn
    • Center of Excellence
  • Download
    • Unity
    • Beta Program
  • Unity Labs
    • Labs
    • Publications
  • Resources
    • Learn platform
    • Community
    • Documentation
    • Unity QA
    • FAQ
    • Services Status
    • Connect
  • About Unity
    • About Us
    • Blog
    • Events
    • Careers
    • Contact
    • Press
    • Partners
    • Affiliates
    • Security
Copyright © 2020 Unity Technologies
  • Legal
  • Privacy Policy
  • Cookies
  • Do Not Sell My Personal Information
  • Cookies Settings
"Unity", Unity logos, and other Unity trademarks are trademarks or registered trademarks of Unity Technologies or its affiliates in the U.S. and elsewhere (more info here). Other names or brands are trademarks of their respective owners.
  • Anonymous
  • Sign in
  • Create
  • Ask a question
  • Spaces
  • Default
  • Help Room
  • META
  • Moderators
  • Explore
  • Topics
  • Questions
  • Users
  • Badges