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 Headworker · Feb 09, 2014 at 01:38 PM · networkingserverturn-basedauthoritative

Turn-based small scale multiplayer: server-only-logic possible?

Hello everybody. Iam currently developing the offline version of a small turn-based game and want to "scan ahead" for the following:

The number of players will be 2, maybe 4-8 later on, turn mode is we-go (choose action, executed for everybody at the same time)

Is the following process possible, advisable performancewise, and do you know any middleware which would make the task easier?

  1. Client chooses his actions (Move from x to y, Shoot at z), which are not executed yet.

  2. Client sends his desired actions (as a struct for instance) to the server.

  3. The Server receives actions from all active players and calculates the outcome.

  4. The actual outcome data is transmitted back to the client (same data for everybody) and displayed as action (As if every client would watch a movie)

Comment
Add comment · Show 2
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 Hoeloe · Feb 09, 2014 at 02:32 PM 0
Share

This is feasible (I've made such a system before), the question is really how fast your server and link will be. Do you care if a couple of instructions are lost if it will grant you better performance (the TCP vs. UDP argument)?

avatar image Headworker · Feb 09, 2014 at 02:52 PM 0
Share

Yes I do care :)

From what ive researched so far I am planning to use TCP, because speed doenst matter (within limits), although I would have to make sure, that both (or all) players saw the action of the last round before commiting their next turn ($$anonymous$$eep turns roughly in sync)

2 Replies

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

Answer by Thejon · May 06, 2016 at 03:01 PM

I recently completed a small 5-part tutorial to make a turn-based Tic Tac Toe game with Unity's networking service. It uses a sort of round trip from Commands to Client RPC calls which would allow you to get what you want. Here's a link: https://theliquidfire.wordpress.com/2016/05/05/turn-based-multiplayer-part-1/

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
avatar image
2

Answer by ankush_Kushwaha · Feb 09, 2014 at 03:04 PM

Try this. It can help you. It uses unity's own networking system.

Comment
Add comment · Show 2 · 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 Headworker · Feb 09, 2014 at 03:19 PM 0
Share

Hey, thanks for the link, ive quickly checked it out. While this is really useful network information, it doenst really fit the question how to make the clients basically send orders to the server and getting information for rendering back.

avatar image ankush_Kushwaha · Feb 18, 2014 at 07:45 AM 0
Share

You ca use Photon server to make your multiplayer to send and retrieve response. I have used it and it worked for me

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

21 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

Related Questions

Unity networking tutorial? 6 Answers

Authoritative server strategy 0 Answers

Authoritative vs Non-authoritative server (turn-based) 0 Answers

Can a person be both a client and a server? (and more) 0 Answers

Creating servers properly? 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