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 Inan-Evin · Aug 15, 2016 at 04:44 PM · networkingmobilenetworkwebwebservice

Networking Question about Activating/Deactivating Server, I need a logic path

Hello everyone.

I need someone to explain some specific points about networking for me to proceed on my project. First of all, I want to explain that it's been years I'm scripting C# in Unity, so I know the stuff. But I have never ever dealt with networking before and have no idea about it, and now my clients asked me to write a networking system for our upcoming project. Don't get me wrong, of course I am not asking for someone to tell me what to do step by step, but networking is a huge thing and I don't have enough time to learn it all, so I need to know what to learn, where to proceed in order to write the system I need to write. Here is the thing:

It's going to be a mobile Unity game, the game will be active only on specific dates, for a limited time. For example 17th of August, between 2-4 pm. This date will be controlled by me. As I researched, I think something called Webservice might help me to control the data?

When the game is enabled, players will play the game. The mechanics will be different each time, so each time when the game is activated, users will have a different scene to solve. (Do I need to update the game from Google Play/iOS or can I update the scene from a webservice or a server?)

As said before, the game won't be active forever, only for a limited time, and in that limited time, I need to know the highest scores of the users that had played the game.

That's all, I explained the game to you, not because I am asking "how to do this", but I am asking someone to tell me which web/networking subjects do I need to study and use in order to achieve the system that I am looking for.

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

1 Reply

· Add your reply
  • Sort: 
avatar image
0
Best Answer

Answer by DiegoSLTS · Aug 15, 2016 at 05:42 PM

It looks like what you need to learn is:

  • How to setup a server (to provide web services)

  • How to request and send info from and to the server (i.e. using the web services)

  • How to use AssetBundles (to change what the player will play)

What you might need if you want players to interact between them:

  • UNET or Photon or something like that (to allow player interaction)

The server part is not done in Unity and probably won't be C# either. You can use some modern frameworks like node.js, RubyOnRails, etc. You'll need to set your server to expect different HTTP requests (request to a URL you must define) for different things such as:

  • Querying the current time of the server

  • Querying the current AssetBundle (with the current game)

  • Sending a score and saving it into some database

Your Unity game would do HTTP requests (with the old WWW class or the new UnityWebRequest) to those webservices and do things with the responses it get. It'll validate there's a game available at that time on the server and download the AssetBundle for that game, then after playing it'll send the result back.

The server has to be hosted somewhere so it's accesible through internet. Either you pay for a hosting service of setup your own server. Once you have a working URL (a domain or an IP address) your game should request things to that URL. Meanwhile you can setup the server locally in your development PC or another in the same LAN with a fixed IP, and request to localhost or the server IP respectively.

Note that iOS doesn't support new code inside AssetBundles, so you're really limited if you want to provide different games with new logic. If this is a problem you'll have to update the game on the store and make sure people has the correct version before allowing them to play.

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 Inan-Evin · Aug 15, 2016 at 05:46 PM 0
Share

This was the answers that I am looking for, for anyone who is reading, I will gladly accept extra information & tips, but this answer is great for a start. Thank you!

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

86 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

Related Questions

networkdiscovery find IP of one of Devices but not connect to each other 1 Answer

How can I connect PC(Unity program) with Mobile Dvice(for Android)? 3 Answers

Networking 2 player game - use MasterServer? 0 Answers

Unity Web Request 2 Answers

Can't access "NetworkServer" 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