buildergerma.blogg.se

Photon bolt mobile
Photon bolt mobile












The new player needs to know who stacks with whom and who‘s on top.įurthermore, players are surrounded by particle effects every time they level up. As alluded to in the introduction, two goblins can stack on top of each other, creating a single unit in the process. Lastly, there is information about the other players that needs to be sent. This means we have to send data on whether a door is open and on whether a room has been visited before. Opening and closing doors is also done per event. Doors leading to rooms the players have not yet visited display a foggy white frame. a puzzle using cardinal directions.Īdditionally, information about rooms and doors has to be sent. Our interactive objects all have an ID, a flag whether they are interactive at the moment and a byte denoting their current state in case of the object has more than two states, e.g. To make sure crates are destroyed, mushrooms eaten and chests are open, every interactive object‘s state needs to be serialized. The most important part of those are interactive objects. Our levels have multiple parts that change as players interact and progress. The next event sent contains information about the level‘s current condition. Both tokens only require a single type of event which helps keeping the amount of different events manageable. Depending on the game mode, the next token a client receives contains data about a special mission players can try to accomplish for permanent buffs. So the first token aĬlient receives after the level has loaded is the token with the level seed. Levels in Looterkings are procedurally assembled from pre-created Rooms, Intersections and Deadends.

#PHOTON BOLT MOBILE HOW TO#

So what data does a client need when it connects into a running game? The first thing a client needs to know is how to build the level. Tokens can also be added to entity states, player commands and, most importantly, to events. Whether it is a connection attempt and you want to send a passphrase to the host, whether it is spawning a unit and passing some parameters, not unlike using a constructor (the attach token is so useful, I wonder why Unity has not implemented a similar system for their Instantiate method).

photon bolt mobile

You can add tokens to almost everything in bolt. How you layout your data using those methods is up to you. UdpPacket provides methods for serializing and deserializing standard data types. They consist of a Read and a Write method, both accepting a UdpPacket. Tokens (named IProtocolToken in Bolt) are Bolt‘s way of serializing arbitrary data.

photon bolt mobile

So how to tell a clueless client everything that has happened in the level so far? In other networking solutions, we might have sent an RPC per interactive object, or – even worse -just made the objects into networked entities. The same is true for crates, barrels, doors and shops. Every mushroom a goblin can pick up is synchronized using events.

photon bolt mobile

So we ended up with a system relying heavily on globalĮvents in order to prevent cluttering our scenes with BoltEntities. Interaction system, we did not think about reconnecting. We had finally implemented the ‚stacking‘ feature which enables 2 players to combine their goblins for more damage and other benefits, complete with animation synchronisation of 2 separate player-controlled units. Up to then, we had stabilised Looterkings‘ multiplayer mode to the point where it did not crash frequently any more and where interaction between players did not cause major data desync between host and clients. „How about we let players reconnect into a game?“, said the Game Designer and my job began. It’s an action-multiplayer game for up to 4 players each of whom take control over a little monster-slaying goblin.įrederik explains the difficulties the developers ran into when trying to let players reconnect to an already open game session and how Photon Bolt’s token system helped to resolve this issue. Their first game, the roguelike dungeon-crawler Looterkings, has been released as Early Access on Steam in August 2016 and is currently in development. Looterkings is an indie studio founded by the Youtubers Manuel Schmitt (aka SgtRumpel), Erik Range (aka Gronkh) and Valentin Rahmel (aka Sarazar) in 2015. This guest post was written by Frederik Reher, developer at Looterkings.












Photon bolt mobile