LeanCloud Play 对战游戏服务正式上线

LeanCloud Play 现在已经正式发布,感谢申请内测的所有用户的支持。所有老应用及新创建的应用都可以直接使用 Play 服务,您只需要在游戏引擎中填入对应的 App ID 和 App Key 即可接入Play。如果您在接入时遇到任何问题,请到问题讨论版块中发起新的主题,并附上如何重现场景的描述及关键代码,我们的开发工程师会给予回复。

Play 简介

Play 是专门针对多人在线对战游戏推出的后端服务。开发者不需要自己搭建后端系统,利用 Play 云服务就可以轻松实现游戏内玩家匹配、在线对战消息同步等功能。Play 完美适配 Unity 引擎,支持多个平台。

Play 使用起来非常简单:

连接服务器

Play.UserID = "Mario";
Play.Connect("1.0"); // 声明游戏版本

随机匹配房间

Play.JoinRandomRoom();

游戏内发送消息

// 定义名为 rpcResult 的 RPC 方法
[PlayRPC]
public void rpcResult(int winnerId)
{
  Debug.Log("winnerId: " + winnerId);
  ui.showWin();
}

// 向所有人发送游戏消息,收到消息的玩家的 rpcResult 方法会自动被触发
Play.RPC("rpcResult", PlayRPCTargets.All, winnerId);

更详细的介绍请参考《Play 服务总览》。

Play 的未来规划

  • Play 已实现在客户端运算游戏逻辑,服务端运算部分正在研发中,预计不久就可以开放公测。
  • Play 已经支持使用 Unity (C#) 来开发,未来会支持 Cocos、Erget (JavaScript) 及更多的游戏引擎。

如果您有兴趣了解 Play 的新功能或支持的新语言,请订阅我们的博客来接收最新的产品信息。

价格

Play 目前处于免费试用阶段,开发版及商用版应用均不收费。每一应用最多可使用 100 CCU 的额度,如果您需要更大的额度,请联系 support@leancloud.rocks。

This topic is now pinned globally. It will appear at the top of its category and all topic lists until it is unpinned by staff for everyone, or by individual users for themselves.

This topic is now a banner. It will appear at the top of every page until it is dismissed by the user.

This topic is now closed. New replies are no longer allowed.

This topic is now unpinned. It will no longer appear at the top of its category.

This topic is no longer a banner. It will no longer appear at the top of every page.