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 cwperkins83 · Jun 17, 2014 at 12:18 PM · networkingmultiplayerauthoritative servernetwork view

Authoritative Server / Player Communication

I've recently decided to learn more about Networking. As a project, I've decided to make a very small scale MMO type game. No trolling, please. I know that I won't be able to make an MMO yet, so I'm creating a model of one. Maybe 10 players max, but I want the world to save after players leave, etc. My question is, to get the server to handle computing all players/npc's health, etc, would it be best to have a 'buffer script' that the Networkview is focused on. The server contacts that script and then that script sends messages to other scripts on the player, etc.

i.e. If a mob is attacking player. The mob tells the server it attacks, server calculates damage, sends damage to players middleman script, which sends it to the player's VitalsScript?

I'm asking because it seems NetworkView can only have one focus.

Comment
Add comment · Show 4
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 PommPoirAbricot · Jun 17, 2014 at 12:22 PM 0
Share

See about those technologies and similar

  • Smartfoxserver (paid & free license)

  • PhotonServer (paid & free license)

  • RedDwarf (free and opensource)

  • Boltengine (don't know)

  • etc.

I think it more interesting to implement one of those technologies and similar in your unity game, because you can encount some limits with the native networking of unity

avatar image fholm · Jun 17, 2014 at 12:23 PM 0
Share

This is going to be a shameless plug, and if you're not out looking to buy something then disregard this:

$$anonymous$$y networking engine (www.boltengine.com) solves pretty much everything that is hard about networking for you automatically, it will let you sync transform/animation and user-definable state for your players and characters without writing a single line of code.

avatar image PommPoirAbricot · Jun 17, 2014 at 12:29 PM 0
Share

Can be interesting but not totally free as SFS2X and Photon ...

http://www.boltengine.com/#purchase

Purchase Options

You can purchase a license for Bolt either directly from us through PayPal, or you can purchase it through the Unity Asset Store. Licenses purchased directly from us are subject to our own End User License Agreement, while licenses purchased through Unity are subject to the Unity Asset Store EULA. The benefit of buying from us directly is that you will be getting updates to Bolt a lot faster since they don't have to go through the asset store approval process, which takes about one week on avarage.

avatar image softrare · Jun 17, 2014 at 01:02 PM 0
Share

As long as we are going all self-promotion here, if you are looking for an EASY solution, check out u$$anonymous$$$$anonymous$$O: https://www.assetstore.unity3d.com/en/#!/content/13867

1 Reply

· Add your reply
  • Sort: 
avatar image
1

Answer by RetepTrun · Jun 17, 2014 at 03:44 PM

A middleman or make the player so all the scripts on him that need to be contacted with a network view are on thier own child for the server to find. I was never able to get my middleman script to work, no matter what type I used or how I tried to call a function broadcast or otherwise.

So I just cut down the number of scripts that needed communication to 2 and they are on thier own transforms for the server to find thier networkviews.

An example of what you might have trouble with. It will never print("name updated") . Still a mystery to me.

 using UnityEngine;
 using System.Collections;
 using System.Collections.Generic;
 
 public class RpcBrancher : MonoBehaviour {
 
     public List<Transform> scripts;
 
 
     [RPC]
     public void UpdateName (string name) {
 
         foreach(Transform thing in scripts){
             thing.BroadcastMessage  ("UpdateName",  name ,SendMessageOptions.DontRequireReceiver);
             thing.SendMessageUpwards("UpdateName",  name ,SendMessageOptions.DontRequireReceiver);
             print ("name updated");
         }
 
     }
 }

Comment
Add comment · Show 1 · 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 cwperkins83 · Jun 17, 2014 at 03:49 PM 0
Share

$$anonymous$$akes sense to me. Didn't really think of having child empties with the scripts attached. Thanks a lot.

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

25 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

Related Questions

Unity networking tutorial? 6 Answers

Should I worry about making an authorative server for an online multiplayer WebGL game? 0 Answers

Authoritative server basics Unity 5.2 0 Answers

Networking Help Needed 0 Answers

UNet Network Transform not Sync 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