見出し画像

【Pretia Tech Interview vol.1】 "Multiplayer" makes AR game

Hi! My name is Hiro, Developer success at Pretia Technologies.

This is our first tech blog. Today we have a chance to have our engineers Yanuar and Jun here to talk about some details regarding Pretia SDK, specifically focus on the multiplayer functionality.


Yanuar Aristya Edy Putra
Lead Unity Engineer at Pretia AR Cloud Platform with exhaustive backgrounds in building networked real-time interactive applications and various tools for enhancing development/content creation process, especially for AR experiences.


Jun Han
Senior Engineer at Pretia, with many years of experience architecting and creating large and complex systems, aiming for bringing our innovative AR experience to users at a huge scale.


Hiro: Hello Yanuar. First of all, could you explain a bit more what multiplayer is?

Yanuar: This is commonly known as a feature that enabling players to experience something together. For example, if you play Fortnite, you can actually play with people from different locations. Multiplayer functions are essential to make these things happen. In Pretia AR Cloud, we enable the developers to build such experiences easily. It’s all bundled together so no need to fine other services.

Hiro: Thanks for explaining. So could you talk some more regarding how the sync works from server prospective?

Jun: Sure. So we actually have three services in the backend - the lobby server, the matchmaker, and the game server. The lobby server literally works as a lobby. It provides rooms for different games. Matchmaker helps each player to find a room to enter, to join with other players that playing the same game. Lastly the game server, we can also call it a relay server. It broadcast messages from different clients to each others. In this way status of each client is synced with each other,

Hiro: Thank you for the details!

Hiro: So I noticed that the multiplayer feature is still in beta. Why is that?

Yanuar: So actually we are lacking of a few features, so we think it’s more in a beta status. Currently we only do simple matchmaking. On the dev console developer can configure how many users can join in the same application. The number is limited, and we don’t have further flexibilities. You can’t, for example, join the game with just your friends. This is something we plan to address in near future.

Hiro: So what’s our plan in near future? Could you tell us what is on the roadmap?

Yanuar: A lot of things actually. We planned to improve the scalability at server side. We planned to have some changes to the APIs so it could be easier to handle, also with better performance.

Jun: Yes scalability is definitely a important part. Also we planned to expand the cluster to more regions, so it could provide better latency from different countries.

Hiro: So I believe you had faced a lot of problems during the implementation of multiplayer. Could you share us some of the experiences? Such as where the challenges lies in and how did you eventually solved them.

Yanuar: Yes, so latency is the crucial part here. If you want to have a good experience you need to keep it as low as possible. While the real world is full of extreme cases, just think about a player A is in Paris and another player B is in Japan - this is crossing half of the earth. We need to make sure when A takes an action, that action is also simulated in front of B.

Assume A attacks B, and a network delay happened - A believes that he defeated B, but B didn’t feel it because there was a delay. Even if the delay is just a short while, this brings controversial upon judging who wins the game.
We need to ensure the experience is smooth, and there are a few techniques such as interpolation buffering. Buffering will of course bring latency, so finding the balance becomes critical. It’s a hard work but it brings us better experiences.
And we haven’t talk about the server side yet.

Jun: For me, the challenge in backend is we need to invent many things for fulfilling different requirements. This is talking about designing the protocols to fit in different type of games. This is also about managing our resources in the backend, balancing between capacity and cost.

Yanuar: A clear example will be comparing MMO RPG with a simple shooting game. The networking requirements are completely different, so as the solution.

Hiro: That was great insights. Sounds like really challenging. Back to matchmaking, could you tell us more details regarding matchmaking? I believe the reader of this article will be interested in this topic.

Jun: Going forward, generally speaking we plan to have three types of matchmaking. The first one is very simple, you know there’s a specific room and you join it. The seconds is relocalize based matchmaking, it will bring you to the game server with lowest latency. The third one is to immediately find a player for you to start a game.

Yanuar: Also we are considering to have dedicated authoritative server. This will allow the developers to deploy custom logic to game servers.

Hiro: Sounds like we are really focusing on making the developers life easier.

Yanuar: Yes, we want to deliver excellent developer experience. Multiplayer is the piece we are working hard on.

Jun: Same here. All I want is that the developers can get rid of the hassles and really focus on what they are crazed with.

Hiro: Yeah, thank you so much for the comment!

---

Careers at Pretia


いいなと思ったら応援しよう!