This document provides an overview of Colyseus, an open-source library for building real-time multiplayer games. It discusses key concepts like game rooms, state management and serialization, matchmaking, and handling reconnections. The presentation emphasizes that Colyseus aims to make multiplayer game development easier and more accessible across platforms. It demonstrates usage through code examples for defining game state schemas and processing client messages on the server.
SockJS is a browser JavaScript library that provides a WebSocket-like object. It gives a coherent, cross-browser, Javascript API which creates a low latency, full duplex, cross-domain communication channel between the browser and the web server.
Under the hood SockJS tries to use native WebSockets first.
SockJS is intended to work for all modern browsers and in environments which don't support the WebSocket protocol. In this slide a real time chat application using SockJS (sockjs-1.1.1.min.js as SockJS-client, SockJS-node as SockJS-server) step by step development is also shown.
About the authors: Jerome Tollet is Distinguished Engineer working in the Cisco Chief Technical and Architecture Office (CTAO) with a specific focus on Datacenter / Container Networking, Policy and Security. Jerome is an active member of FD.io. He is leading networking-vpp project as well as other VPP related projects.
Ed Warnicke is a Distinguished Consulting Engineer in the Chief Technology and Architecture Office (CTAO) office at Cisco Systems. He has been working for over a decade in many areas of networking and Open Source. He has been a member of the OpenDaylight TSC since its inception and currently serves as a committer elected member of the OpenDaylight TSC. He is a founding TSC member at ONAP.
Apresentação sobre a placa Raspberry Pi e sua arquitetura, SoC, GPU, Barramentos internos e externos, e demais componentes, da disciplina de Arquitetura e Organização de Computadores I, do curso de Engenharia de Computação, da Universidade Federal do Vale do São Francisco, Juazeiro/BA.
Desenvolvido pelos alunos: Edwildson Coelho Rodrigues e Samuel de Souza Santana.
Building a turn-based game prototype using ECS - Unite Copenhagen 2019Unity Technologies
Get a high-level overview of the Entity Component System (ECS) and turn-based game loops, and see a proof of concept built using ECS. These slides will cover some of the pitfalls and also show concepts of ECS in a slightly exotic context.
Speaker:
Florian Uhde - Three Eyed Games
Watch the session on YouTube: https://youtu.be/mL4qrt-15TE
SMARTSTUDY 에서 몬스터 슈퍼 리그를 개발하면서 빠른 개발 진행을 위해 선택했던 Python 게임 서버, '잘 되면 다시 만들지 뭐'라는 생각에서 시작했지만 다시 만들 일은 영원히 오지 않았습니다... Python으로 게임 서버를 만들었을 때 사용한 것은 무엇인지 또 실제 오픈 했을 때 서버는 안녕했는지 알아봅니다.
Basic concept of nginx , Apache Vs Nginx , Nginx as Loadbalancer , Nginx as Reverse proxy , Configuration of nginx as load balancer and reverse proxy .
Take a dive deep into the new prefab features with developers Steen Lund. What's the inside versus outside of a prefab? How does it relate to Prefab mode, overrides, unpacking, and prefab variants? How has the new prefab back-end changed? This session will give you a better understanding of the Prefab system, the pros and cons of various implementation decisions, and some Aha moments working with Prefab nesting.
SockJS is a browser JavaScript library that provides a WebSocket-like object. It gives a coherent, cross-browser, Javascript API which creates a low latency, full duplex, cross-domain communication channel between the browser and the web server.
Under the hood SockJS tries to use native WebSockets first.
SockJS is intended to work for all modern browsers and in environments which don't support the WebSocket protocol. In this slide a real time chat application using SockJS (sockjs-1.1.1.min.js as SockJS-client, SockJS-node as SockJS-server) step by step development is also shown.
About the authors: Jerome Tollet is Distinguished Engineer working in the Cisco Chief Technical and Architecture Office (CTAO) with a specific focus on Datacenter / Container Networking, Policy and Security. Jerome is an active member of FD.io. He is leading networking-vpp project as well as other VPP related projects.
Ed Warnicke is a Distinguished Consulting Engineer in the Chief Technology and Architecture Office (CTAO) office at Cisco Systems. He has been working for over a decade in many areas of networking and Open Source. He has been a member of the OpenDaylight TSC since its inception and currently serves as a committer elected member of the OpenDaylight TSC. He is a founding TSC member at ONAP.
Apresentação sobre a placa Raspberry Pi e sua arquitetura, SoC, GPU, Barramentos internos e externos, e demais componentes, da disciplina de Arquitetura e Organização de Computadores I, do curso de Engenharia de Computação, da Universidade Federal do Vale do São Francisco, Juazeiro/BA.
Desenvolvido pelos alunos: Edwildson Coelho Rodrigues e Samuel de Souza Santana.
Building a turn-based game prototype using ECS - Unite Copenhagen 2019Unity Technologies
Get a high-level overview of the Entity Component System (ECS) and turn-based game loops, and see a proof of concept built using ECS. These slides will cover some of the pitfalls and also show concepts of ECS in a slightly exotic context.
Speaker:
Florian Uhde - Three Eyed Games
Watch the session on YouTube: https://youtu.be/mL4qrt-15TE
SMARTSTUDY 에서 몬스터 슈퍼 리그를 개발하면서 빠른 개발 진행을 위해 선택했던 Python 게임 서버, '잘 되면 다시 만들지 뭐'라는 생각에서 시작했지만 다시 만들 일은 영원히 오지 않았습니다... Python으로 게임 서버를 만들었을 때 사용한 것은 무엇인지 또 실제 오픈 했을 때 서버는 안녕했는지 알아봅니다.
Basic concept of nginx , Apache Vs Nginx , Nginx as Loadbalancer , Nginx as Reverse proxy , Configuration of nginx as load balancer and reverse proxy .
Take a dive deep into the new prefab features with developers Steen Lund. What's the inside versus outside of a prefab? How does it relate to Prefab mode, overrides, unpacking, and prefab variants? How has the new prefab back-end changed? This session will give you a better understanding of the Prefab system, the pros and cons of various implementation decisions, and some Aha moments working with Prefab nesting.
Software Defined networking - An overview
OpenStack Neutron Overview
OpenVswitch - Overview
Neutron-VXLAN-GRE-OVS : behind the scenes
neutron Packet flow to external network
neutron Packet flow from VM to VM
Custom SRP and graphics workflows - Unite Copenhagen 2019Unity Technologies
Battle Planet - Judgement Day is a unique game in the sense that it's played entirely on a single sphere (the planet). Levels are fully procedural and fully destructible. This structure created a few big challenges in terms of rendering, which were solved by writing a custom Scriptable Render Pipeline for the game. This session provides an overview of the game's rendering features and how they were implemented using SRP. It includes a few examples of how performance issues influenced the design of the pipeline as well as a discussion about shader programming and design patterns.
Speaker:
Henning Steinbock - Threaks
Session available here: https://youtu.be/91zUwJwkXNQ
In addition to authorization policies that control what a user can do, OpenShift Container Platform gives its administrators the ability to manage a set of security context constraints (SCCs) for limiting pods and securing their cluster.
Default security context may be too restrictive for containers pulled down from DockerHub, thorugh this talk we'll explore the various steps to execute for enabling required permissions on selected OpenShift's pods.
Accelerating HPC Applications on NVIDIA GPUs with OpenACCinside-BigData.com
In this deck from the Stanford HPC Conference, Doug Miles from NVIDIA presents: Accelerating HPC Applications on NVIDIA GPUs with OpenACC."
"OpenACC is a directive-based parallel programming model for GPU accelerated and heterogeneous parallel HPC systems. It offers higher programmer productivity compared to use of explicit models like CUDA and OpenCL.
Application source code instrumented with OpenACC directives remains portable to any system with a standard Fortran/C/C++ compiler, and can be efficiently parallelized for various types of HPC systems – multicore CPUs, heterogeneous CPU+GPU, and manycore processors.
This talk will include an introduction to the OpenACC programming model, provide examples of its use in a number of production applications, explain how OpenACC and CUDA Unified Memory working together can dramatically simplify GPU programming, and close with a few thoughts on OpenACC future directions."
Watch the video: https://youtu.be/CaE3n89QM8o
Learn more: https://www.openacc.org/
and
http://hpcadvisorycouncil.com
Sign up for our insideHPC Newsletter: http://insidehpc.com/newsletter
It is the presentation file used by Jim Huang (jserv) at OSDC.tw 2009. New compiler technologies are invisible but highly integrated around our world, and we can enrich the experience via facilitating LLVM.
GDC 2016: Modular Level Design of Fallout 4 Joel Burgess
Originally presented by Joel Burgess and Nathan Purkeypile at GDC 2016, this presentation expands on the 2013 "Modular Level Design of Skyrim" presentation.
2016년 4월 27일, NDC2016 발표자료입니다.
전통적인 콘텐츠 생산은 기획자, 개발자가 하나하나 컨트롤해야 하는 노동집약적 산업입니다. 저 또한 처음에 입사했을 때 출시를 위해 며칠 만에 이백여 개가 넘는 맵을 찍어야 했던 아픔이 있습니다. 그 뒤에도 플레이어들을 위한 콘텐츠 생산은 계속되었지만, 플레이어들의 콘텐츠 소비 속도는 생산 속도를 뛰어넘은 지 오래되었습니다. 대안은 로그라이크 같은 장르에서 널리 쓰이는 Procedural Contents Generation이라고 생각합니다. 외국 인디 씬에서는 이미 많이 사용되고 있는 이 방법에 최근 점점 더 많이 사용되고 있는 신경망을 활용해서 색다른 콘텐츠 생산 기법을 소개하려 합니다.
Real-time Fluid Simulation in Shadow of the Tomb RaiderEidos-Montréal
This talk presents real-time fluid simulation used in Shadow of the Tomb Raider. We utilize a physically-based Navier-Stokes solver to simulate character interaction with different substances floating on the water surface, such as oil or algae. The proposed technique is well scalable to arbitrary-sized water volumes, while running within 0.5 ms on current-gen consoles. We use compute shaders to run all computationally intensive calculations on a graphics card, and leverage the so called asynchronous compute for better GPU utilization. The proposed technique will be showcased in the real game levels, along with the examples in test environment. In-depth implementation details are given, along with the optimization guidelines
Topic:
Consider redesigning a game server that was unable to handle 500 simultaneous users to a something that can handle 100,000 users. This talk discusses the architecture and technology choices that ensured scalability. Technologies used are Python, gevent, Cassandra, redis, haproxy and WebSockets. The talk will touch upon how this architecture also applies to a typical web applications.
Speaker:
Sunil Mohan Adapa is a Free Software developer and a ThoughtWorker.
He is a contributor to the FreedomBox project and a volunteer at Swecha. He also teaches as guest faculty at IIIT-Hyderabad. After graduating from IIIT-H in 2003, he has worked at various corporates, his own startup and was an independent consultant for many years before joining ThoughtWorks. His current role is to lead ThoughtWorks' efforts in its contributions to the FreedomBox project.
Scalability & Big Data challenges in real time multiplayer gamesYan Cui
With the recent emergence of top grossing real time games in the East (Honour of Kings) and West (Clash Royale, Golf Clash, etc) - the doors have opened for new genres of social games on mobile. However, building a real time multiplayer game for mobile comes with many interesting technical and design challenges. Join us in this session to see how the team at Space Ape Games is approaching these challenges head on with the help of Akka and AWS.
Software Defined networking - An overview
OpenStack Neutron Overview
OpenVswitch - Overview
Neutron-VXLAN-GRE-OVS : behind the scenes
neutron Packet flow to external network
neutron Packet flow from VM to VM
Custom SRP and graphics workflows - Unite Copenhagen 2019Unity Technologies
Battle Planet - Judgement Day is a unique game in the sense that it's played entirely on a single sphere (the planet). Levels are fully procedural and fully destructible. This structure created a few big challenges in terms of rendering, which were solved by writing a custom Scriptable Render Pipeline for the game. This session provides an overview of the game's rendering features and how they were implemented using SRP. It includes a few examples of how performance issues influenced the design of the pipeline as well as a discussion about shader programming and design patterns.
Speaker:
Henning Steinbock - Threaks
Session available here: https://youtu.be/91zUwJwkXNQ
In addition to authorization policies that control what a user can do, OpenShift Container Platform gives its administrators the ability to manage a set of security context constraints (SCCs) for limiting pods and securing their cluster.
Default security context may be too restrictive for containers pulled down from DockerHub, thorugh this talk we'll explore the various steps to execute for enabling required permissions on selected OpenShift's pods.
Accelerating HPC Applications on NVIDIA GPUs with OpenACCinside-BigData.com
In this deck from the Stanford HPC Conference, Doug Miles from NVIDIA presents: Accelerating HPC Applications on NVIDIA GPUs with OpenACC."
"OpenACC is a directive-based parallel programming model for GPU accelerated and heterogeneous parallel HPC systems. It offers higher programmer productivity compared to use of explicit models like CUDA and OpenCL.
Application source code instrumented with OpenACC directives remains portable to any system with a standard Fortran/C/C++ compiler, and can be efficiently parallelized for various types of HPC systems – multicore CPUs, heterogeneous CPU+GPU, and manycore processors.
This talk will include an introduction to the OpenACC programming model, provide examples of its use in a number of production applications, explain how OpenACC and CUDA Unified Memory working together can dramatically simplify GPU programming, and close with a few thoughts on OpenACC future directions."
Watch the video: https://youtu.be/CaE3n89QM8o
Learn more: https://www.openacc.org/
and
http://hpcadvisorycouncil.com
Sign up for our insideHPC Newsletter: http://insidehpc.com/newsletter
It is the presentation file used by Jim Huang (jserv) at OSDC.tw 2009. New compiler technologies are invisible but highly integrated around our world, and we can enrich the experience via facilitating LLVM.
GDC 2016: Modular Level Design of Fallout 4 Joel Burgess
Originally presented by Joel Burgess and Nathan Purkeypile at GDC 2016, this presentation expands on the 2013 "Modular Level Design of Skyrim" presentation.
2016년 4월 27일, NDC2016 발표자료입니다.
전통적인 콘텐츠 생산은 기획자, 개발자가 하나하나 컨트롤해야 하는 노동집약적 산업입니다. 저 또한 처음에 입사했을 때 출시를 위해 며칠 만에 이백여 개가 넘는 맵을 찍어야 했던 아픔이 있습니다. 그 뒤에도 플레이어들을 위한 콘텐츠 생산은 계속되었지만, 플레이어들의 콘텐츠 소비 속도는 생산 속도를 뛰어넘은 지 오래되었습니다. 대안은 로그라이크 같은 장르에서 널리 쓰이는 Procedural Contents Generation이라고 생각합니다. 외국 인디 씬에서는 이미 많이 사용되고 있는 이 방법에 최근 점점 더 많이 사용되고 있는 신경망을 활용해서 색다른 콘텐츠 생산 기법을 소개하려 합니다.
Real-time Fluid Simulation in Shadow of the Tomb RaiderEidos-Montréal
This talk presents real-time fluid simulation used in Shadow of the Tomb Raider. We utilize a physically-based Navier-Stokes solver to simulate character interaction with different substances floating on the water surface, such as oil or algae. The proposed technique is well scalable to arbitrary-sized water volumes, while running within 0.5 ms on current-gen consoles. We use compute shaders to run all computationally intensive calculations on a graphics card, and leverage the so called asynchronous compute for better GPU utilization. The proposed technique will be showcased in the real game levels, along with the examples in test environment. In-depth implementation details are given, along with the optimization guidelines
Topic:
Consider redesigning a game server that was unable to handle 500 simultaneous users to a something that can handle 100,000 users. This talk discusses the architecture and technology choices that ensured scalability. Technologies used are Python, gevent, Cassandra, redis, haproxy and WebSockets. The talk will touch upon how this architecture also applies to a typical web applications.
Speaker:
Sunil Mohan Adapa is a Free Software developer and a ThoughtWorker.
He is a contributor to the FreedomBox project and a volunteer at Swecha. He also teaches as guest faculty at IIIT-Hyderabad. After graduating from IIIT-H in 2003, he has worked at various corporates, his own startup and was an independent consultant for many years before joining ThoughtWorks. His current role is to lead ThoughtWorks' efforts in its contributions to the FreedomBox project.
Scalability & Big Data challenges in real time multiplayer gamesYan Cui
With the recent emergence of top grossing real time games in the East (Honour of Kings) and West (Clash Royale, Golf Clash, etc) - the doors have opened for new genres of social games on mobile. However, building a real time multiplayer game for mobile comes with many interesting technical and design challenges. Join us in this session to see how the team at Space Ape Games is approaching these challenges head on with the help of Akka and AWS.
The next generation JavaScript doesn't need to dependent on browser, that's just like other programming language. Node.js is it, no need browser, based on fastest V8 JavaScript Engine and provides many APIs for system integration. It can be used to server-side and system, even more purpose.
With the recent emergence of top grossing real time games in the East (Honour of Kings) and West (Clash Royale, Golf Clash, etc) - the doors have opened for new genres of social games on mobile. However, building a real time multiplayer game for mobile comes with many interesting technical and design challenges. Join us in this session to see how the team at Space Ape Games is approaching these challenges head on with the help of Akka and AWS.
This talk will explore two libraries, a Cassandra native CQL client and a Clojure DSL for writing CQL3 queries.
This will demonstrate how Cassandra and Clojure are a great fit, show the strength of the functional approach to this domain and how in particular the data centric nature of Clojure makes a lot of sense in this context.
An introduction to what multiplayer games are, what makes them different from normal games, how to approach building them and specifically how to begin building them with the Unity game engine.
Talk given at the GameIS & Dragonplay mobile multiplayer hackathon, 30/7/2015
Final project report on grocery store management system..pdfKamal Acharya
In today’s fast-changing business environment, it’s extremely important to be able to respond to client needs in the most effective and timely manner. If your customers wish to see your business online and have instant access to your products or services.
Online Grocery Store is an e-commerce website, which retails various grocery products. This project allows viewing various products available enables registered users to purchase desired products instantly using Paytm, UPI payment processor (Instant Pay) and also can place order by using Cash on Delivery (Pay Later) option. This project provides an easy access to Administrators and Managers to view orders placed using Pay Later and Instant Pay options.
In order to develop an e-commerce website, a number of Technologies must be studied and understood. These include multi-tiered architecture, server and client-side scripting techniques, implementation technologies, programming language (such as PHP, HTML, CSS, JavaScript) and MySQL relational databases. This is a project with the objective to develop a basic website where a consumer is provided with a shopping cart website and also to know about the technologies used to develop such a website.
This document will discuss each of the underlying technologies to create and implement an e- commerce website.
Immunizing Image Classifiers Against Localized Adversary Attacksgerogepatton
This paper addresses the vulnerability of deep learning models, particularly convolutional neural networks
(CNN)s, to adversarial attacks and presents a proactive training technique designed to counter them. We
introduce a novel volumization algorithm, which transforms 2D images into 3D volumetric representations.
When combined with 3D convolution and deep curriculum learning optimization (CLO), itsignificantly improves
the immunity of models against localized universal attacks by up to 40%. We evaluate our proposed approach
using contemporary CNN architectures and the modified Canadian Institute for Advanced Research (CIFAR-10
and CIFAR-100) and ImageNet Large Scale Visual Recognition Challenge (ILSVRC12) datasets, showcasing
accuracy improvements over previous techniques. The results indicate that the combination of the volumetric
input and curriculum learning holds significant promise for mitigating adversarial attacks without necessitating
adversary training.
Forklift Classes Overview by Intella PartsIntella Parts
Discover the different forklift classes and their specific applications. Learn how to choose the right forklift for your needs to ensure safety, efficiency, and compliance in your operations.
For more technical information, visit our website https://intellaparts.com
COLLEGE BUS MANAGEMENT SYSTEM PROJECT REPORT.pdfKamal Acharya
The College Bus Management system is completely developed by Visual Basic .NET Version. The application is connect with most secured database language MS SQL Server. The application is develop by using best combination of front-end and back-end languages. The application is totally design like flat user interface. This flat user interface is more attractive user interface in 2017. The application is gives more important to the system functionality. The application is to manage the student’s details, driver’s details, bus details, bus route details, bus fees details and more. The application has only one unit for admin. The admin can manage the entire application. The admin can login into the application by using username and password of the admin. The application is develop for big and small colleges. It is more user friendly for non-computer person. Even they can easily learn how to manage the application within hours. The application is more secure by the admin. The system will give an effective output for the VB.Net and SQL Server given as input to the system. The compiled java program given as input to the system, after scanning the program will generate different reports. The application generates the report for users. The admin can view and download the report of the data. The application deliver the excel format reports. Because, excel formatted reports is very easy to understand the income and expense of the college bus. This application is mainly develop for windows operating system users. In 2017, 73% of people enterprises are using windows operating system. So the application will easily install for all the windows operating system users. The application-developed size is very low. The application consumes very low space in disk. Therefore, the user can allocate very minimum local disk space for this application.
NO1 Uk best vashikaran specialist in delhi vashikaran baba near me online vas...Amil Baba Dawood bangali
Contact with Dawood Bhai Just call on +92322-6382012 and we'll help you. We'll solve all your problems within 12 to 24 hours and with 101% guarantee and with astrology systematic. If you want to take any personal or professional advice then also you can call us on +92322-6382012 , ONLINE LOVE PROBLEM & Other all types of Daily Life Problem's.Then CALL or WHATSAPP us on +92322-6382012 and Get all these problems solutions here by Amil Baba DAWOOD BANGALI
#vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore#blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #blackmagicforlove #blackmagicformarriage #aamilbaba #kalajadu #kalailam #taweez #wazifaexpert #jadumantar #vashikaranspecialist #astrologer #palmistry #amliyaat #taweez #manpasandshadi #horoscope #spiritual #lovelife #lovespell #marriagespell#aamilbabainpakistan #amilbabainkarachi #powerfullblackmagicspell #kalajadumantarspecialist #realamilbaba #AmilbabainPakistan #astrologerincanada #astrologerindubai #lovespellsmaster #kalajaduspecialist #lovespellsthatwork #aamilbabainlahore #Amilbabainuk #amilbabainspain #amilbabaindubai #Amilbabainnorway #amilbabainkrachi #amilbabainlahore #amilbabaingujranwalan #amilbabainislamabad
Vaccine management system project report documentation..pdfKamal Acharya
The Division of Vaccine and Immunization is facing increasing difficulty monitoring vaccines and other commodities distribution once they have been distributed from the national stores. With the introduction of new vaccines, more challenges have been anticipated with this additions posing serious threat to the already over strained vaccine supply chain system in Kenya.
Saudi Arabia stands as a titan in the global energy landscape, renowned for its abundant oil and gas resources. It's the largest exporter of petroleum and holds some of the world's most significant reserves. Let's delve into the top 10 oil and gas projects shaping Saudi Arabia's energy future in 2024.
Cosmetic shop management system project report.pdfKamal Acharya
Buying new cosmetic products is difficult. It can even be scary for those who have sensitive skin and are prone to skin trouble. The information needed to alleviate this problem is on the back of each product, but it's thought to interpret those ingredient lists unless you have a background in chemistry.
Instead of buying and hoping for the best, we can use data science to help us predict which products may be good fits for us. It includes various function programs to do the above mentioned tasks.
Data file handling has been effectively used in the program.
The automated cosmetic shop management system should deal with the automation of general workflow and administration process of the shop. The main processes of the system focus on customer's request where the system is able to search the most appropriate products and deliver it to the customers. It should help the employees to quickly identify the list of cosmetic product that have reached the minimum quantity and also keep a track of expired date for each cosmetic product. It should help the employees to find the rack number in which the product is placed.It is also Faster and more efficient way.
2. Hi, I’m Endel 👋
👨💻 Software Engineer and Game Developer from Brazil
🎓 Game Development & Digital Entertainment
GitHub / Twitter: @endel
I DON’T LIKE SOCCER
3. Summary
● Introduction
● Basic concepts
○ How Online Multiplayer Games Work
○ Authoritative Game Servers
● Colyseus in-depth
○ Match-making
○ Game State & Serialization
○ Infrastructure
● Client-side Techniques
4. A naive beginning (2015)
● Socket.io
● Not authoritative
● Synchronization issues between clients
5. Server
Broadcasts messages back
to clients
Client 1.
State
Client 2.
State
Client 3.
State
100ms 100ms 150ms
A naive beginning (2015)
Not authoritative
6. A naive beginning (2015)
All I wanted
● Be able to handle multiple game sessions
● Manipulate data structures in the server
○ Have them automatically synchronized with the clients
8. Why Colyseus?
● Multiplayer games should be easier to make
● Should be more accessible
● Should work on as many platforms as possible
● Should be open-source!
10. How Online Multiplayer Games Work?
● Peer-to-peer
● Client as a host
● Hybrid (of two above)
● Client / Server
Server
Dumb client Dumb client Dumb client
11. Responsibilities of the Server
● Hold the Game State
● Hold the Game Logic
● Validate client inputs
● Send the Game State to the clients
Server
Dumb client Dumb client Dumb client
12. Responsibilities of the Client
● Visual representation
● Apply game state updates in a pleasant manner
● Send inputs (actions) to the Server
Server
Dumb client Dumb client Dumb client
23. Colyseus
Game Rooms
The room is being
destroyed.
(It’s a good place to persist
things on the database)
Rooms are disposed
automatically when the last
client disconnects
(unless autoDispose=false)
26. Colyseus
Game Rooms
● Rooms are created during matchmaking
● A client can be connected to multiple rooms
● Each room connection has its own WebSocket connection
31. Full Room’s State
... State patches
Connection established
Colyseus
Room State & Serialization
... State patches
32. ● The Room State is MUTABLE
● Patches are broadcasted at every 50ms
○ Customizable via this.setPatchRate(ms)
( But first, a bit of a background… )
Colyseus
Room State & Serialization
33. 👎 Serialization: back in v0.1 ~ v0.3 👎
● Deep JavaScript Object Comparison
● JSON Patch (RFC6902)
● Patch size is too large
[
{ "op": "remove", "path": "/players/N150OHMve" },
{ "op": "add", "path": "/players/NkfeqSGPx", "value": {"x": 10, "y": 10} },
{ "op": "replace", "path": "/players/NkfeqSGPx/x", "value": 5 }
]
Previous State ⇔ Current State
34. 👎 Serialization: back in v0.4 ~ v0.9 👎
● “Fossil Delta” Binary Diff Compression
● Hard to detect a change in the state
● Creates a new copy when decoding
var currentState = this.state;
var currentStateEncoded = msgpack.encode( currentState );
// skip if state has not changed.
if ( currentStateEncoded.equals( this._previousStateEncoded ) ) {
return false;
}
var patches = delta.create(this._previousStateEncoded, currentStateEncoded);
CPU Intensive
37. 🔲 Encode/Decode only fields that have changed
🔲 No bottleneck to detect state changes
🔲 Mutations should be cheap
🔲 Avoid decoding large objects that haven't been patched
🔲 Better developer experience on statically-typed languages (C#, C++)
Serialization: v0.10+
Checklist
38. ✅ Encode/Decode only fields that have changed
✅ No bottleneck to detect state changes
❓ Mutations should be cheap (need more benchmarks, so far seems ✅)
✅ Avoid decoding large objects that haven't been patched
✅ Better developer experience on statically-typed languages (C#, C++)
Serialization: v0.10+
Checklist
39. class Player extends Schema {
@type("number") x: number;
@type("number") y: number;
}
const player = new Player();
player.x = 10;
player.y = 20;
player.encode()
[ 0, 10, 1, 20 ]
Definition Usage
Serialization: v0.10+
Demo
40. class Player extends Schema {
@type("number") x: number;
@type("number") y: number;
}
const player = new Player();
player.x = 10;
player.y = 20;
player.encode()
[ 0, 10, 1, 20 ]
Definition Usage
Serialization: v0.10+
Demo
41. class Player extends Schema {
@type("number") x: number;
@type("number") y: number;
}
const player = new Player();
player.x = 10;
player.y = 20;
player.encode()
[ 0, 10, 1, 20 ]
Definition Usage
Serialization: v0.10+
Demo
43. Colyseus
Room State & Serialization
import { Schema, type, MapSchema } from "@colyseus/schema";
class Player extends Schema {
@type("number")
position: number = 0;
}
class GameState extends Schema {
@type({ map: Player })
players = new MapSchema<Player>();
}
Game State Example
44. class MyRoom extends Room {
onCreate(options) {
this.setState(new GameState());
}
onJoin(client, options) {
this.state.players[client.sessionId] = new Player();
}
onMessage(client, message) {
if (message.move) {
this.state.players[client.sessionId].position++;
}
Colyseus
Room State & Serialization
Room State Example
52. ● By default, the entire state is sent to everyone
○ This way no “private” data can be stored in the state
● @filter() let you define a filter callback per property, per client
Colyseus
State Filters! (Experimental)
53. Colyseus
State Filters! (Experimental)
class Entity extends Schema {
@filter(function(client, value, root) {
// this = instance of Entity
// client = the client which this value is being filtered for
// value = `secret` value
// root = the Root State
return false;
})
@type("number") secret: number;
}
54. Colyseus
State Filters! (Experimental)
class Entity extends Schema {
@filter(function(client, value, root) {
// this = instance of Entity
// client = the client which this value is being filtered for
// value = `secret` value
// root = the Root State
return false;
})
@type("number") secret: number;
}
55. Colyseus
State Filters! (Experimental)
class Entity extends Schema {
@filter(function(client, value, root) {
// this = instance of Entity
// client = the client which this value is being filtered for
// value = `secret` value
// root = the Root State
return false;
})
@type("number") secret: number;
}
56. Colyseus
State Filters! (Experimental)
class Card extends Schema {
@filter(function(this: Card, client, value, root?: RootState) {
return root.
players[client.sessionId].
cards.indexOf(this) !== -1;
})
@type("number") number: number;
}
Card Game Example:
Only Card owners can see their own Card data
57. Colyseus
State Filters! (Experimental)
class Player extends Schema {
sessionId: string;
@filter(function(this: Player, client: any, value: Card) {
return this.sessionId === client.sessionId;
})
@type([Card]) cards = new ArraySchema<Card>();
}
⚠️ Array and Map filters are not currently supported ⚠️
(Planned for version 1.0)
58. Colyseus
State Filters! (Experimental)
class State extends Schema {
@filter(function(this: State, client: any, value: Player) {
const player = this.players[client.sessionId]
const a = value.x - player.x;
const b = value.y - player.y;
return (Math.sqrt(a * a + b * b)) <= 10;
})
@type({ map: Player }) players = new MapSchema<Player>();
}
⚠️ Array and Map filters are not currently supported ⚠️
(Planned for version 1.0)
59. using Colyseus.Schema;
public class State : Schema {
[Type("string")]
public string fieldString = "";
[Type("number")]
public float fieldNumber = 0;
[Type("ref", typeof(Player))]
public Player player = new Player(
[Type("array", typeof(ArraySchema<
public ArraySchema<Player> arrayOf
ArraySchema<Player>();
[Type("map", typeof(MapSchema<Play
Client-side integration (C#)
● npx schema-codegen
State.ts
--csharp
--output client-state
generated: State.cs
Colyseus
Room State & Serialization
60. using namespace colyseus::schema;
class State : public Schema {
public:
string fieldString = "";
varint_t fieldNumber = 0;
Player *player = new Player();
ArraySchema<Player*> *arrayOfPlaye
ArraySchema<Player*>();
MapSchema<Player*> *mapOfPlayers =
State() {
this->_indexes = {{0, "fiel
this->_types = {{0, "strin
this->_childPrimitiveTypes
Client-side integration (C++)
● npx schema-codegen
State.ts
--cpp
--output client-state
generated: State.hpp
Colyseus
Room State & Serialization
61. import io.colyseus.serializer.schema.Schema;
class State extends Schema {
@:type("string")
public var fieldString: String = ""
@:type("number")
public var fieldNumber: Dynamic = 0
@:type("ref", Player)
public var player: Player = new Pla
@:type("array", Player)
public var arrayOfPlayers: ArraySch
Client-side integration (Haxe)
● npx schema-codegen
State.ts
--haxe
--output client-state
generated: State.hx
Colyseus
Room State & Serialization
63. Colyseus
Sending Messages
● Messages use MsgPack by default
room.onMessage((message) => {
console.log("received:", message)
})
room.send({ action: "hello" })
Client-side
onMessage(client, message) {
if (message.action === "hello") {
this.broadcast("world!");
this.send(client, "world!");
}
}
Server-side
Send message to everyone
64. Colyseus
Sending Messages
● Messages use MsgPack by default
room.onMessage((message) => {
console.log("received:", message)
})
room.send({ action: "hello" })
Client-side
onMessage(client, message) {
if (message.action === "hello") {
this.broadcast("world!");
this.send(client, "world!");
}
}
Server-side
Send message to a single
client
65. Colyseus
Handling reconnection
● What if one of my clients drops the connection?
○ Closed/Refreshed Browser
○ Switched from Wifi / 3G
○ Unstable Internet Connection
○ Etc.
76. Client-side Techniques
● Delay to process actions
● Simulation on other client
happens 1 second later
https://poki.com/en/g/raft-wars-multiplayer
77. Client-side Techniques
● Client-side prediction
● Process player’s input immediately
● Enqueue player’s actions
in the server
● Process the queue at every
server tick
https://github.com/halftheopposite/tosios
78. Infrastructure
● How many CCU can Colyseus handle?
○ It depends!
● You have CPU and Memory limits
○ Optimize Your Game Loop
● 1000 clients in a single room?
○ Probably no!
● 1000 clients distributed across many rooms?
○ Probably yes!
86. ● Realtime
● Phaser/JavaScript
● Built by @tinydobbings
● ~350 concurrent players
Built with Colyseus
GunFight.io
https://gunfight.io
87. ● Turn-based
● JavaScript version
● Defold Engine version (@selimanac)
Built with Colyseus
Tic-Tac-Toe
https://github.com/endel/colyseus-tic-tac-toe
88. ● “The Open-Source IO Shooter”
● Realtime shooter
● PixiJS / TypeScript
● Built by @halftheopposite
Built with Colyseus
TOSIOS
https://github.com/halftheopposite/tosios
89. ● Turn-based
● Defold Engine / LUA
● ~250 concurrent players
● (soon on mobile!)
Built with Colyseus
Raft Wars Multiplayer
https://poki.com/en/g/raft-wars-multiplayer
90. ● Instant Game (Messenger)
● Realtime
Built with Colyseus
Chaos Shot
https://www.facebook.com/ChaosShot.io/
91. Plans for v1.0
● Better State Filters (on Arrays and Maps)
● Allow more sophisticated matchmaking
● Transport-independent (TCP/UDP)
● ...while keeping all client-side integrations up-to-date!
This game was made using Colyseus by @x100, a community member
This is how a room definition looks like
All these methods can be async
I’ll talk a bit about state serialization before going into handling the game state
I hope it’s not going to be too much information, because it’s kind of a deep topic
Fossil Delta is really good for small binary diffs
CPU Intensive detecting changes
Explain client-side new allocations and garbage collection
Why would you re-implement these great tools
Incremental encoding
This is the checklist I had before going ahead and implementing the serializer
Because we’re using Proxies to be able to catch changes on the state, mutations have this cost
The .encode() method is just to illustrate how it works, you usually don’t need to call it manually, as the room does automatically at the patch interval
The .encode() method is just to illustrate how it works, you usually don’t need to call it manually, as the room does automatically at the patch interval
The .encode() method is just to illustrate how it works, you usually don’t need to call it manually, as the room does automatically at the patch interval
Has been released early last year
I’ve a good chunk of time last year fixing bugs on it, and improving things
I’ll talk a bit about state serialization before going into handling the game state
During onStateChange, you can’t really know exactly what has changed
During onStateChange, you can’t really know exactly what has changed
Mention that “player” references can be passed around, as it is going to be always the same
Here you actually get autocompletion for the field, and the callback will have the right type you’re listening for
Filters are experimental, because their performance is not that great currently