Unity Game Logical Server Practice

Source: Internet
Author: User
0x01: Preface

Since the server needs to do a client-side combat simulation, our servers are written in Python, and it's a matter of course that our combat server also uses Python to rewrite a set of combat servers and what problems it encounters:
1, floating point arithmetic precision problem
2. Operational efficiency issues
3, Unity Core Library Source code issues

0x02: Fantastic Thoughts

Our team think, since the client has out-of-the-box code, why not implement the network communication part, the combat part of the code to split out, directly with unity Export Run file is not OK, and unity support cross-platform. All right, once again, we're naïve. Problems encountered:
1. The operating system version of the online server, unity does not support
2, the online server only very weak VGA (Standard VGA graphics Adapter) integrated graphics, unity does not support

0X03: Back to the source

1. How Unity achieves cross-platform
2. Unity those core libraries need to implement their own

0X04: Problem Solving

1. Introduction of Mono
2. Unity Part Unity Library
3. Stripping the Battle part code
4. Add Network communication

0X05: Rethinking

1, the game throughout the design process, if you want to do the video function, you need to render this part of the code has an abstraction layer, so that in the late to do the second calculation, or server operations, as long as the implementation of the logic to render this part
2, Unity Animation event callback, you need to implement a set of configuration files, because in the fast check, cannot call Unity Animation Keyframe callback function
3, the game time needs its own control, including update, if each object control update itself, there is no effective means to control the logical execution sequence
4, the game time, need to control their own, in different battles, the frame rate is not the same, the corresponding time is not the same
5, for unity in the process, because can not control the execution of the logical order, you need to implement a set of
6, the game used a * seek the road plug-in, this pathfinding plug-in implementation of multi-threaded and some random number, seek the road this piece oneself also need to realize

Unity Game Logical Server Practice

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.