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 Doko · Aug 01, 2014 at 03:53 PM · networkserverclient

How do i control An Object between Server and Client

Hello. First of all, I'm foreigner so my English skills bad... please understand my situation.

actually I'm here first time. i have a question, i think Commnunity- Forums - Network ~~ , that is a Q&A .

you know what i mean... if not, i'm sorry my bad english writing...


i wanna make a game which is like Heroes of Might and Magic, Chess. turn based game. but it has tactics.

but my problem is that i'm using unity built-in network.

and i searched some of views that say Server has to control object to security.

that is understandable. yes, yes, if not user hack client object and adjust some property.

so, in my game if you press space bar, object is created. not in server(i blocked) but in client but! object is created in server use RPC.

i mean, in Server Window, if you press space bar it's not working. but if you press space bar in client window. object is created

and there's one other Client window exist.

so, there are 1 Server( MasterServer and Server is stored in MasterServer) , 2 Client

i want to make a game between these 2 client. but,

in client1, I make an object, named A in client2, i make an object, named B

and now position is that.

Server,Client(both window) have 2 object and i can see that. but, actually Object is stored in Server, not client. so if i wanna move this object. i must use RPC. but i think RPC is expensive cost.

so i think,

if i make an object to move, let's do like this!

in Server, Object is teleport move X , Y -> W , Z at once like this transform.position = W,Z

but in client, Object is moving smoothly! if move X,Y -> W,Z ,

move like x+0.1 ,y+0.1 , go and on and on , and x+ X = W y+Y = Z

if(Vector3.Distance( (X,Y) , (W,Z) ) >= 0.5)) transform.position += ( (W,Z) - transform.position ).normalized speed Time.deltaTime; if(Vector3.Distance( (X,Y) , (W,Z) ) < 0.5) transform.position = (W,Z)

you know what i mean? i 'm sure you do.

but i think it's impossible... but i tried couple of days... (State Synchronization in Network View is off.. but i think it's useless trial)

but now, i changed my goal.

just make a game, don't care security...

so, i make Server and Client again.

2 client.

each client has List of Object. ( yes this is different between now and before) and Synchronization is Reliable.

during my goal is changed, i think that, now i'm using capsule. but later i will use 3d char model which has animation... and i read API Doc, Synchronization Reliable is automatically doing this information. so i do Reliable again...)

but, if i do that i think RPC call is very often.and Server and Client moving like lag? isn't this english, i mean frequency is high so your character isn't moving smoothly...

but interpolation or i just ignore some problem... because if not, i can't go a step...

anyway...

now i have 2 client which has each List of an object

i mean

Client1 has a List,(character List farmer, archer,swordman... etc...) Client2 has a List,(same)

but server doesn't have list...

when first my trial, i wanna fix that problem, and i tried something... one of that is

Server has list,(at first i said server has only list) and client has list. so if, client1 makes object. client1 list has this, and server has this, but. in windoew Scean 2 object exist. i want 1 object... and i don't now how to fix this... so i give up this...

anyway client has list.(and other is same)

client1 has list, client2 has list.

and its synchronized, so if i move, in client1 window, in server and in client2 window move! in client2 window i order move, server and client1 object is move!

yeah! finally i'm happy because it has some problem.. anyway it's working(actually if i wanna do like this, i can do this at first... so actually i 'm not happy...

anyway. i have problem now ...

if in Client1! object A is trying to hit obejct B!(this is created in Client2) HOW DO I DO? because client1 has only object a, client2 has only object b,

server has nothing...(because if i make a list and stored, object is exist double...)

this is all i wanna ask..

My grammer is bad.. writing is bad.. word is bad.. but i can't find in my country language.. korean... i asked so many times but people doesn't answer to me...

so i write this... if you answer me i really thanks to you

thank you for reading this! bye! have a good day!

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

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

2 People are following this question.

avatar image avatar image

Related Questions

Network Connections in Editor 1 Answer

Is there any difference calling Network.Disconnect or Network.CloseConnection from client? 1 Answer

May I control the game of a client through pressing some GuiButtons in the server application? 1 Answer

Player falls through plane/floor (Multiplayer) 1 Answer

How connect client to server when ip is private ? 2 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