Wayback Machinekoobas.hobune.stream
May JUN Jul
Previous capture 12 Next capture
2021 2022 2023
1 capture
12 Jun 22 - 12 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 DCTShinobi · Mar 02, 2017 at 08:32 AM · uinetworkingmultiplayerperformancewaypoint

Multiplayer UI : What's the best implementation for a waypoint-like system?

Hello! I'm in the process of creating an asset, but I'm trying to find out the best way of solving my last issue... multiplayer compatible UI. I can get everything to work well in a single-player environment, but I don't have any experience in multiplayer development, so any help would be greatly appreciated.

Basically, this is what I want to achieve...

  1. A basic scoreboard UI with team scores and stationary panels (that will be dynamically filled with images, etc.). I'm fine with this scoreboard being identical to every player, though I'm also fine if each player gets its own that can be customized.

  2. Player-unique UI for multiple panels (to be dynamically filled) which will be moved according to a script. Think of a "waypoint" marker that always stays over a target and also stays the same size regardless of distance.

Again, I can get this working with a single player, but I'm not sure of what the best and most performance-friendly method for multiplayer is.

The basic scoreboard is pretty simple, it seems. I guess I can just have one "scoreboard" canvas that will be updated and displayed to everyone (if it's server-based).

But the player-unique "waypoint" system is more of a hassle. I had thought about making each "waypoint" a single "server-based" world-space canvas attached to the target object. But there are two issues I can think of, especially to keep its appearance unique to each player. First, would there be a way to keep the size of the "waypoint" consistent independent of distance? Secondly, to keep the "waypoint" panel rotated properly to each player.

What I'm currently attempting to do is to give each player object its own camera-based canvas. In each player object's Start(), it duplicates the "waypoint" panels from the basic scoreboard UI to its own canvas, also attaching a tracking script to each of those panels.

Is that the best way of doing this?

One issue that I'm concerned about is that each "waypoint" panel is being added to a List, and dynamically updating the images through a script. I'm worried that having too many will hurt performance. Right now, for each "waypoint" that exists, there will 2 server-based and 1 player-based (for each player) panels. One for a ground panel, one for a scoreboard, and one more for each player's tracking. And again, that's not taking into account however many the server/client duplication will add.

For example, if there are 5 "waypoints" in the game, and there are 10 players, there would be a total of 60 "waypoint" panels to update (not counting the server/client duplication).

But again, I don't know much about multiplayer performance issues, so I may be misjudging things.

Thank you for your assistance! :-D

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 MarshallN · Mar 02, 2017 at 10:19 PM 0
Share

Waypoint location should be locally calculated, there's no need for clients 2, 3, and 4 to know about the waypoint client 1 created to track their location, otherwise every player would have one waypoint per player per player connected. Each player prefab should have a CreateWaypoint child object that is set to be disabled if (!isLocalPlayer), and otherwise creates its waypoint on the canvas on Start() and updates its position based on the position of the other client's player each frame. That way, there's no networked performance cost beyond that necessary to sync the other client's position - everything's handled locally. If the waypoint needs to have information about the player it's attached to (health, score, etc.), it can get all that information locally from the GameObject it's attached to, the scoreboard, or anywhere else the information has already been synchronized between clients.

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

151 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 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 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 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 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 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 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

Unity networking tutorial? 6 Answers

How to Synchronize Buttons in a lobby? 0 Answers

Second Clients canvas won't register clicks? 0 Answers

Networking Help Needed 0 Answers

need some help with this things 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