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
2
Question by Killerregenwurm · Jan 22, 2013 at 07:15 AM · androidnetworkmulti

can I use one Game as Server and Client at the same time?

hello guys,

I'm working right now on an little project for my study. This is a game where you should use your android phone/tablet as an addition to your pc.

The main game is running on a pc which is connected as Client or Server with other clients to play on network. <- this is done with Unity's network class

There should be the possibility to connect to each player an android device as extended minimap. this device is only listening to the game action, it should only display the actual positions of all objects I want to but not sending information to the pc.

Is it possible to do this with Network class again? Otherwise I will write an c# socket/tcp script for communication.

greetings Killerregenwurm

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

Answer by senad · Jan 22, 2013 at 08:59 AM

So if you do have a master server, this should be very easy. The androids can just connect to the server and receive all the data needed for the minimap.

However, if your architecture is peer-to-peer, it will be a little more complex, since you do not have a central game state, so the androids will have to collect the game state from all the clients.

In both cases you should be able to do it with the Unity network functionality.

Very cool idea with the minimap on mobiles btw. :) :)

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 senad · Jan 22, 2013 at 11:00 AM 0
Share

Yes, it would technically be better to stream to your local android device from your game client. But if it is a small uni project, I would probably still stream from the server to the android, because it is much simpler to implement.

I do not think you can have a network view receive from one host and send to another at the same time. So you would need to work around that. And the work around depends on what kind of game you have. :)

PS: Do not open a new answer, if you want to comment on an answer. :)

avatar image
0

Answer by Killerregenwurm · Jan 22, 2013 at 10:37 AM

there is a master server for the communication of the game clients. But the devices should connected peer-to-peer (in the local w-lan) to their game client, because they should limited for the player so you cant see enemies.

If they will be connected to the master server I had to specify which device belongs to one player and other stuff. I think that would be a lot more to do, but I will try it^^

thanks for this fast answer

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

10 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

Related Questions

Sending a gameobject over network with RPC? 2 Answers

Network - Client still in Network.Connections after disconnect 2 Answers

A node in a childnode? 1 Answer

Android and PHP high scores 0 Answers

Question about Network and NetworkViewID 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