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 MDarkwing · Apr 27, 2014 at 11:58 AM · networkingloadlevelscenes

Networking - 2 Scenes where one i selection and other actual game

Alrighty, I've immersed myself into networking this weekend and I succesfuly done all the tutorials about it and now I'm trying to create my own Template Game to test learned stuff and take it to the next level.

All of the tuts I've seen so far have 1 scene and dont bother with loading actual game which is the essence of game networking, stating that they don't want to complicate things. Well you should because that's the way networking is. Anyway I've created two scenes: First is the selection scene where you can select your character (cube ^^) and the other is actual playground where u can run around.

The thing I need explained is following: How to make server which has multiple games and then you connect to one of those. This implies that you cannot have game active on server so you can watch how the players move, meaning that no player can be server. Can this be done with Unity Networking?

Also on other tutorials which have 1 scene they have player on server side also which can move around his cube, but given the approach with loading scenes, I cannot load scene when server is

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

2 Replies

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

Answer by homer_3 · Apr 28, 2014 at 03:26 AM

This is a pretty big task (one I'm working on currently). There are also multiple solutions. One option (which is the one I'm doing) is to have a stand alone server program that accepts messages from your game and manages all the game rooms. I wrote my server in C++, but you can use whatever language you want. The Unity game connects to the server and tells it that it either wants to create a new game room or it can ask for all the current game rooms. In the 2nd case, the server sends the info back to the Unity game and you have to display it to the user so he can pick which room he wants to join.

In order to do this across multiple scenes, you need to create a global, static Socket object so it doesn't get destroyed when a new scene is loaded. Then always reference that socket when you want to send or receive data.

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
avatar image
0

Answer by MDarkwing · Apr 28, 2014 at 08:06 AM

Thank you thought it was something like that. I've read that Unity's Master Server is open source, do you think that can be remodeled for this?

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

21 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 avatar image avatar image avatar image avatar image

Related Questions

Multiplayer Level Loading 1 Answer

Architecture for a network game- problems with events 0 Answers

Room change error in multiplayer 0 Answers

Audio disappers after Application.LoadLevel 2 Answers

Online levels database 0 Answers


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