Photon——Lite Lobby Concepts Lite Lobby概念

 

Lite Lobby Concepts Lite Lobby概念

     Lite Lobby is an application that (literally) extends the Lite Application to offer a listing of currently used rooms. To achieve this, it implements two different types of rooms: the LiteLobbyRoom and a LiteLobbyGame.By convention, join will put you into a lobby when the given room name ends on “_lobby” and into a game room in all other cases. The operation join got an optional parameter to name a lobby where the game is listed. This puts the responsibility on the client side again and you can create lobbies on the fly.
     Lite Lobby 是一个应用程序,它扩展了Lite应用程序提供了一个房间的清单。为了达到这个目标, 它实现了两种不同类型的房间:LiteLobbyRoom和一个 LiteLobbyGame。按照惯例,当给定的房间的名称在“_lobby”的结尾时,加入操作会使你进入一个大厅,并进入这个游戏房间。加入操作获得一个可选的参数去命名一个游戏列表的大厅。这由客户端负责,你可以创建大厅。

Lobby 大厅

     The lobby rooms (LiteLobbyRoom.cs) are special as they are not used to play a match with opponents. They just provide a list of available rooms (games) instead, so player can choose and join those.Despite being a room, too, a lobby won’t send events on join and leave of actors. As a result, players inside a lobby don’t notice each other which prevents a flood of join/leave events. There are no operations aside from leave. As a player leaves rooms when joining another, leave is not even required.On join, the complete games list is sent once to get a client up to date. After that, each player gets the same update event, which is sent every few seconds. It lists each game by name its current number of players. The clients keep and update their initial list. Games that are empty or full, both simply report 0 players as they should no longer be in the room list.To send the room list in intervals, the lobby schedules a message for itself, once the list is sent. This enqueues the event sending in the regular message passing mechanism, avoiding threading issues.
     大厅的房间(LiteLobbyRoom.cs)是特别的,因为他们不是用于玩家游戏的。他们只是提供了一个可用房间的列表,因此玩家可以选择和加入。尽管是一个房间,一个大厅不会发送事件在玩家加入和离开的时候。因此,玩家在一个大厅不会通知其他的玩家,这可以防止大量的加入/离开事件被发送。除了离开没有别的操作。作为一个玩家离开房间加入另一个时,离开请求甚至是不需要的。在加入时,完整的游戏列表发送一次去获得一个客户端。在那之后,每个玩家获得同样的更新事件,它每隔几秒钟就被发送一次。它列出每个游戏的名字和目前的玩家数量。客户端保持和更新他们的列表。游戏是空的或是是满的,都只是报告0个玩家,他们不再是在房间列表里。一定时间间隔内发送房间列表,大厅安排一个消息在每次列表发送的时候。这种事件队列发送在常规消息传递机制中,可避免线程问题。

Rooms for Games 游戏房间

     In Lite Lobby, regular games can now be connected to a lobby. The lobby of a room is set when gets created. If the lobby does not exist, it will be created as well.Once a room is connected to a lobby it is responsible to update the lobby with its info. The lobby itself does not mind what’s forwarded as info to the clients. By default, each room only sends its actor count and will be “full” when 4 players are in a room.
     在LiteLobby中,常规的游戏现在可以被连接到一个大厅。一个房间的大厅是设置在被创建的时候。如果大厅不存在,它会被创建。一旦一个房间是连接到一个大厅,它将负责更新其信息在这个大厅里。大厅本身并不明白信息到客户端转发的是什么。默认情况下,每个房间只有发送它自己的玩家计数,并且当4个玩家在一个房间里时为full。
 

LiteLobby Config LiteLobby配置

     To avoid incompatibilities, Lite Lobby uses its application config file to define the event types, update interval and the lobby suffix.Some values can’t be edited this way yet: count of users to make a room “full”, event-values and more.Lite Lobby can be running parallel to Lite but usually a game would use just one of those. The SDKs Photon Config assigns the name Lite Lobby (used by the clients on connect).
     为了避免不兼容,用Lite Lobby配置文件来定义事件类型,更新时间间隔和大厅后缀。一些值不能被这样的方式编辑:用户计数使得一个房间 “full”,事件值还有更多。Lite大厅可以平行运行,Lite通常会使用其中的一个游戏。这个SDKs Photon配置指定Lite大厅的名字 (客户端使用的连接)。

转载于:https://www.cnblogs.com/liusuqi/archive/2013/05/15/3079714.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
资源包主要包含以下内容: ASP项目源码:每个资源包中都包含完整的ASP项目源码,这些源码采用了经典的ASP技术开发,结构清晰、注释详细,帮助用户轻松理解整个项目的逻辑和实现方式。通过这些源码,用户可以学习到ASP的基本语法、服务器端脚本编写方法、数据库操作、用户权限管理等关键技术。 数据库设计文件:为了方便用户更好地理解系统的后台逻辑,每个项目中都附带了完整的数据库设计文件。这些文件通常包括数据库结构图、数据表设计文档,以及示例数据SQL脚本。用户可以通过这些文件快速搭建项目所需的数据库环境,并了解各个数据表之间的关系和作用。 详细的开发文档:每个资源包都附有详细的开发文档,文档内容包括项目背景介绍、功能模块说明、系统流程图、用户界面设计以及关键代码解析等。这些文档为用户提供了深入的学习材料,使得即便是从零开始的开发者也能逐步掌握项目开发的全过程。 项目演示与使用指南:为帮助用户更好地理解和使用这些ASP项目,每个资源包中都包含项目的演示文件和使用指南。演示文件通常以视频或图文形式展示项目的主要功能和操作流程,使用指南则详细说明了如何配置开发环境、部署项目以及常见问题的解决方法。 毕业设计参考:对于正在准备毕业设计的学生来说,这些资源包是绝佳的参考材料。每个项目不仅功能完善、结构清晰,还符合常见的毕业设计要求和标准。通过这些项目,学生可以学习到如何从零开始构建一个完整的Web系统,并积累丰富的项目经验。
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值