Multiplayer real-time combat game Server Series-90 tank online network details

Source: Internet
Author: User

Preface:

I have always wanted to write a series about this project. Currently, this game is under dismounting (poor operation, although I still like this game ).

It has been more than a year since development. I have not forgotten it yet, so I will sort it out and share it here.

How much can be written? Don't blame me for throwing away...


The first server architecture diagram:


Considering the consideration of the project at that time and the performance of the subsequent user groups, this architecture is a bit complicated and a little wasteful.

First, let's explain several terms.

1. data Difference Engine: uses a set of data protocols and object listeners to ensure that multiple data objects are consistent between multiple different locations (Client/Server or service/Server, for the engine for synchronization between multiple secondary nodes on the master node, see the previous oplog or opweb article.

2. Real-time combat: as it involves the Operation Experience of the game, the hard requirement on the server side is: 60fps backend rendering, push delay less than 50 ms, and player delay-50 ms smooth operation.

3. data channels: For games like bubble bubbles, each game will be played for 5-10 minutes. Therefore, each room will have a data channel to push data to players participating in the game.

4. Full Data Synchronization: No matter when you join the battle, you can always get a copy of the current scene status to initialize the object at the current time point.

5. Differential Data Synchronization: after joining the data channel, players use differential Data Synchronization Based on fully synchronized data to merge the objects in the current memory to keep the display of all clients consistent.


Next, we will focus on the game server, that is, the combat server. If you are interested, leave a message and explain it in detail as needed.

Game introduction, 90 tank wars, after 80 everyone is familiar with, this is a tank war online version, of course, a lot of modifications and enhancements. Online Search "90 tank online" should be able to find a promotional film.

There are several objects in the game:

1. tanks can be moved up or down, and have 3-4 skills,

2. Terrain lawns (not damaged, but hidden tanks), steel plates (not damaged), bricks (destructible)

3. Bullet tanks all emit bullets of various attributes. When the life cycle ends, the bullets will create a cracking object at the target location.

4. explosions are generally created by bullets, which will damage the enemy tanks in the current range/the terrain that can be damaged.

5. Most of the skills are to create a series of different bullets, such as instant migration, stealth, blood returning, and so on.


The general introduction of the game is here.


Technology Selection:

1. The front-end adopts flash, which makes it impossible for us to use UDP for network layer development, that is, the TCP protocol.

2. the backend adopts C # development, win2008 service, and iocp at the network layer.

3. In asynchronous communication architecture, the client sends commands, and the server only returns whether or not it is received ).

4. The client uses the scenario image in the data difference engine for rendering, similar to a specific data player.


Client Activity diagram:


Server Activity diagram:


Data sequence:


PS: I just drew a picture today. Some of the pictures are not very accurate, and some of them are messy ..

Multiplayer real-time combat game Server Series-90 tank online network details

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.