Courtesy of ©2022 SANDLOT ©2022 D3PUBLISHER
Courtesy of ©2022 SANDLOT ©2022 D3PUBLISHER

In less than a month: How Earth Defense Force 6 added crossplay by adopting Epic Online Services

April 2, 2024
In August 2022, the newest numbered title in the long-beloved game series in Japan, Earth Defense Force 6 (EDF6), was released. The Earth Defense Force series is a 3D action shooting game that has been expanding for 20 years since it was first introduced for the PS2 in 2003 as part of the "SIMPLE2000" series. Initially, the game only supported split-screen cooperative play (or competitive play), but from EDF4 onwards, online co-op play was implemented, becoming incredibly popular due to its challenging gameplay.
Combat with ants alongside allies in ruins
Courtesy of ©2022 SANDLOT ©2022 D3PUBLISHER

Why Epic Online Services?

The EDF series has been developed using a proprietary framework, with network communication also utilizing custom implementations. Initially, EDF6 was targeted to release on PS4; however, with the release of the successor console, the PS5, during the development, there arose a demand for "compatibility with both PS4 and PS5" and "cross-matching." It was determined that the current system could not accommodate processing commonality and matchmaking between different hardware, necessitating the search for a new solution.

Epic Online Services (EOS) was the one selected for this purpose.

EDF6 supports online co-op play, where multiple players tackle the same stages found in single-player mode. Due to the nature of the game, it adopts a manual matchmaking system, requiring players to create or join lobbies through a lobby screen.

The EOS features used in this title include "Connect," "Lobby," and "P2P". Integrating EOS into the game was completed in a remarkably short period, taking about ten days for in-game lobby functions using EOS Lobby service and about 20 days for game parts using EOS P2P service, totaling approximately just one month.

Yasuhiro Horiuchi, Software Engineer from Sandlot, said the ease of implementation in such a short term was due to the simple structure of EOS, which calls for APIs through interfaces and receiving results via callbacks. EOS can be used in various environments, not limited to Unreal Engine, making it easily integrable even in developments based on proprietary frameworks. It provides multiplayer functionalities like lobbies and P2P across multiple platform environments, allowing for minimal changes by incorporating only the necessary functions.
Combat between Wing Divers and ants in ruins
Courtesy of ©2022 SANDLOT ©2022 D3PUBLISHER
After its release, EDF6 sold 390,000 copies as of December 2023, with peak concurrent players almost 100,000 – however, the lobby function operated without any issues. Horiuchi praised the server solution, which is capable of handling connections for Fortnite.
 

For Flexible Matchmaking

EDF6 features a straightforward matchmaking system where players creating a match can set a name and conditions for their lobby, and those joining can search for lobbies based on these criteria. EOS's Lobby allows for the assignment of arbitrary attribute values to created lobbies, enabling flexible search criteria.

Attributes can be string, integer, float, or boolean values and used as search criteria. The game leverages the ability of EOS to sort search results by the values of any given attribute, prioritizing the display of newly created lobbies. It also manages the display of a limited number of lobbies at one time, showing more upon re-search by saving the creation time of the oldest lobby listed and using it as a filter for subsequent searches. This approach demonstrates that, while EOS's lobby functionality is straightforward, it enables flexible searches through the clever use of attribute values.

The functionality to hide lobbies created with different client versions or those that have reached maximum capacity is also achieved by adding attributes such as game version and room status. Beyond displaying information like the number of members in the lobby to users, attributes are utilized to store data for internal processing as variables.
Matchmaking with EOS Lobby service
Courtesy of ©2022 SANDLOT ©2022 D3PUBLISHER

Achieve Smooth Communication

In-game communication is achieved using the P2P interface. Sandlot simply replaced the UDP communication part of their previous series' networking with EOS's P2P API, making the transition process straightforward.

EDF6, being a fast-paced action game, prioritizes communication speed and uses unordered/unreliable communication settings. However, EOS allows for the configuration of order and reliability, such as Reliable UDP and Ordered-Reliable UDP, adaptable to different use cases.

During play, communication bandwidth is managed to not exceed a certain threshold by prioritizing different types of communication. When the used bandwidth approaches this limit, less critical communications are skipped. This priority-based control keeps regular game state synchronization communications below 320kbps, even at peak times, with additional trigger-based communications for events like attacks or significant state changes, keeping overall communication under 1Mbps.

The game distributes communication load among players by assigning the responsibility for enemy AI communications to the player being targeted by the enemy. This ensures smooth action for relevant enemies while saving bandwidth for other players. However, there are trade-offs, such as increased bandwidth concentration on a single player targeted by many enemies and potential decreases in reproduction accuracy of enemies’ behavior for distant players.
Combat with androids in the ruins of a housing complex
Courtesy of ©2022 SANDLOT ©2022 D3PUBLISHER

Getting up and running with EOS

While the introduction of EOS brought significant advantages, it also had its challenges, such as a need for online information for correct sample operation and handling exceptions.

However, the ease of smoothly integrating into proprietary frameworks and the negligible operational differences across platforms were significant benefits. The capability to handle more than 100,000 CCUs without server operation costs was particularly appreciated, alleviating financial and operational concerns for both publishers and developers.
Combat between ants and tanks in a housing complex
Courtesy of ©2022 SANDLOT ©2022 D3PUBLISHER

The Future

Currently, EDF6 is available on PS4 and PS5, with further expansions anticipated, including DLC sales and potential releases on the Epic Games Store and Steam.

“We initially had reservations about Epic Online Services from a performance standpoint”, said Horiuchi. “However, upon using it, we found that its API, which boasts a wealth of features, was user-friendly and easily implemented. It has become an exceptionally good tool for problem-solving in the development of Earth Defense Force 6. The servers are also resilient to load, and we feel that we are able to provide a stable service to users of the online features.“

    Get Unreal Engine today!

    Get the world’s most open and advanced creation tool.
    With every feature and full source code access included, Unreal Engine comes fully loaded out of the box.