A brief analysis of the technical realization and main points of the server in Goose and Duck Killing

Introduced by a friend, I downloaded this game. Having played Among Us before, I didn't expect this game to be up to the level of an authentic Space Werewolf (it's free, after all). But after actually playing, I was attracted by its richer settings and gameplay. Next, I'll briefly analyze how some of the game's features are implemented.

Prelude: Game Introduction

1. Basic rules: civilians are geese, and killers are ducks. Ducks can use knives (weapons) to attack people directly during free activities on the map. Knife people have cooldown CDs, and geese will leave dead bodies after being knifed.

2. If the goose (good camp) finds a dead body, you can press R to call the police. After that, everyone will directly hold a meeting to discuss, and the organization will take turns to speak to discuss who is the duck (bad camp). After speaking, you can vote to let a player out.

3. There will be many mission points on the event map, and good people can complete mission progress by doing missions to win. Ducks can do sabotage tasks to cause chaos, or be good people tasks to confuse the public.

4. There is a public alarm point (the location of the small speaker on the map) on each map. Players can ring the bell here to organize a meeting, and the discussion will be held during the mic session. Click on herbert to cast the murderer.

5. Victory method: all bad guys/ducks are out, or all tasks are completed, the goose camp wins at the end of the game, all good guys/goose are out, and the ducks win at the end of the game.

6. In addition to geese and ducks, there can also be some neutral characters to balance the forces of both sides. The winning method of neutral characters is determined by the selected characters. (eg Dumbbird needs to be voted out to win) Work for yourself!

1. Login, Room

       Goose and Duck Kill has an interesting setting: when the player sets the language after logging in, the region will also be set at the same time. At this time, the rooms that match the query will also be in the same region. This means that the login structure of Goose and Yasha is the same server all over the world, routing to the login service as close as possible according to the network in different regions, and storing the data together.
       When searching for rooms by type, players who have played Goose and Duck Kill may notice an obvious feeling: in the same room, if players are not prepared, it is easier for them to be recommended and entered. Additionally, rooms created by lower-level players tend to be slower to enter than rooms created by higher-level players.
       The rooms searched by each player are sorted according to the number of people from most to least. All of the above are the implementation of collation.

2. Voice range

In Goose and Duck Killing, the player's speech can only be heard by the surrounding players. If it is eaten by a pelican or separated by a wall, there are different rules. This implementation principle is relatively simple. If the maximum range of the audio receiving distance is set to R, if the distance between the speaker and the listener is r, then:

  • When r < R, it means that the speaker is within the normal range and the listener can hear the sound;

  • When r ≥ R, it means that the speaker is beyond the maximum range and the listener cannot hear the sound.

    image.png

3. Action judgment and avoid cheating

      This type of game usually uses long connection technology, that is, every action of the user is sent to the server in real time, and the server broadcasts to each player other players' operations and system notifications. In this process, the game adopts an anti-cheat mechanism similar to LOL, that is, the server calculates the action and calculates the result before broadcasting to each player. Different fields of view and characters will receive different messages. For example, when the Internet celebrity character dies, the Internet celebrity player will receive the death message and display the corresponding animation, other goose players will receive the death prompt, but the duck and neutral players will not receive any news. This mechanism ensures that messages cannot be stolen and altered no matter how the hacker intervenes.

4. Current limiting

156611672837595_.pic_hd.jpg
    Recently, after 8:00 p.m., the network situation of the Goose and Yasha client will become a bit stuck. Although at first you may think that this is a problem with the accelerator, but after restarting the game, you will find that the system prompts "Rate exceeded". This is due to the excessive number of players, exceeding the upper limit of server pressure, unable to satisfy all requests, and eventually refusing service. Goose and Yasha has made a lot of preparations for this, and conducted a relatively complete stress test on the network and performance of the service. When the number of players and the request pressure exceed the threshold, a strategy of dynamically rejecting requests is adopted to ensure the game quality of the players who have already started.

5. DDOS attack

On the morning of January 10, 2023, Goose and Yasha officially released an announcement on the Steam forum, disclosing that its servers have been under intermittent DDoS attacks since December 14, 2022. DDoS attacks have become more powerful since January this year. It affected the voice and fluency of the server until it led to the paralysis of this server.
image.png

What is a DDoS attack?

A Denial of Service (DoS) attack is a malicious attempt to affect the availability of a targeted system, such as a website or application, to legitimate end users. Typically, an attacker generates a large number of packets or requests that eventually overwhelm the target system. DDos is a distributed denial of service.

The cost of DDOS attacks is very high, and generally small enterprises and applications without influence are difficult to be targeted. But for a game as suddenly popular as Goose and Duck Kill, there must be "friends" and "peers" looking for trouble. Because behind the high cost is the need for more costly protection.

The principle of DDOS protection is as follows: use front-end servers (ultra-large scale) to absorb and mitigate attacks, filter zombie requests through algorithms, and forward correct user requests to back-end servers. The core is to distinguish between normal and abnormal traffic, which requires a very high level of network security technology. For example, Alibaba Cloud's Anti-Defense Pro has in-depth cooperation with operators and can block IP and network requests in the first place.

After a long maintenance update, "Goose and Duck Kill" officially announced this morning (January 12) that the server has been restarted.

Guess you like

Origin blog.csdn.net/w_monster/article/details/128593269