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 JustinMc · Jun 05, 2014 at 11:40 PM · networkingmultiplayerphotonplayername

(C#) Help with Multiplayer Features - Photon Unity Networking

I'm creating a sandbox building game in Unity. I have a basic understanding of Photon (PhotonViews, Joining/Creating a room, etc), but I need some help with a few things to make this game look and feel more professional.

I was hoping someone could clear up two things for me.

1: I'm very certain that this is possible, but I don't know how to do it...I need help setting up a master list of player names, sort of an account system, that allows players to enter a username when they open the game for the first time, and always associate that username with that IP, so that when they open the game again, it automatically sets their name to the first chosen name, and doesn't allow anyone else to be able to set that as their name.

I assume I could set up a list of names somewhere through the central server and have a little loop that runs through that when you try to create a name, and doesn't let u create one that has been taken. However, I have no knowledge of how to do this.

2: I know you can save files through code to the computer, but I don't know how. This is something I can easily Google and isn't the point of this question. My question is this: would it be possible to, when a player joins, Open a Photon Room named "their unique player name" that saves to their computer through a click of a button/every 10 minutes or something? When there are no players in a Photon Room, I know they close automatically. So when the person reopens the game, I want it to load an empty Photon Room and, in that room, spawn in the Scene that was saved last time they played, giving the illusion that the room is always open?

I don't know if that is possible, but it doesn't seem too far fetched - save their edits to a world while playing, then when they reopen the game, the saved scene is loaded in a new Photon Room.

-Thank you ahead of time, I really appreciate anyone who answers one or both of these, or even people who take the time to read it all.

Comment
Add comment · Show 1
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 tobiass · Jun 12, 2014 at 09:17 AM 0
Share

Answers is probably not the best place to discuss things like this. There is not just one answer. Even less so, because you asked more than one question...

1: You need Custom Authentication with some "community" which lets your users register. At register, check the name for uniqueness. At connect, just make sure the client authenticates as some of the users you know. You can't use the IP address to identify a user, as that usually changes. Just test it yourself over several days on some page like whatismyip.com or so.

2: Look up User Prefs in Unity to store info locally. You can save the room-content locally or in some online service. When you enter a room, you can use that data to create the illusion of an ever-existing room. Saving custom levels is not built-in to Photon, so it's going to be extra work. However, there are already games that do this: Cube$$anonymous$$en, Fight the Dragon, etc.

0 Replies

· Add your reply
  • Sort: 

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

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

Related Questions

Multiple Cars not working 1 Answer

Unity networking tutorial? 6 Answers

Collision over photon network is not working 1 Answer

How to implement server side logic with PHOTON? 0 Answers

Access host's object 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