在移动游戏中使用远程配置
远程配置为开发者提供了在无尽的更新中适应和发展游戏的能力。远程配置或“远程配置”允许您将游戏的各种参数从代码库中外部化,从而能够即时修改它们。让我们快速概述如何使用我们的演示游戏有效地使用远程配置。
大厅:留下深刻的第一印象
许多游戏都从大厅开始 - 玩家的入口。这可能是您应该经常更新和调整的任何应用或游戏中的地方。从添加新内容到更改布局再到动态优惠,您可以在这里做很多事情来保持观众的参与。使用动态远程配置,您可以轻松做到这一点。
可配置元素
大厅卡片 | 确定玩家可以选择的游戏,显示的图片,玩游戏的费用。 |
背景图片 | 设置背景图片。 |
{
"Lobby": [
{
"Bundle": "GameA",
"Title": "Wild West Adventure",
"Action": "Platformer",
"Cost": 20,
"Image": "https://assets.HOST.com/img/mini-joy/lobby-cards/game_calm_01.jpg"
},
{
"Bundle": "GameB",
"Title": "Island Explorer",
"Action": "Platformer",
"Cost": 20,
"Image": "https://assets.HOST.com/img/mini-joy/lobby-cards/game_calm_02.jpg"
},
{
"Bundle": "GameC",
"Title": "Far Land",
"Action": "Platformer",
"Cost": 20,
"Image": "https://assets.HOST.com/img/mini-joy/lobby-cards/game_calm_03.jpg"
}
],
"Settings": {
"BackgroundImage": "https://assets.HOST.com/img/mini-joy/lobby-bg/calm_01.jpg"
}
}
{
"Lobby": [
{
"Bundle": "LobbyCards",
"Image": "https://assets.HOST.com/img/mini-joy/lobby-cards/offer_1_for_10_a.jpg"
},
{
"Bundle": "LobbyCards",
"Image": "https://assets.HOST.com/img/mini-joy/lobby-cards/player_of_the_day_elva.jpg"
},
{
"Bundle": "GameA",
"Title": "Wild West Adventure",
"Action": "Platformer",
"Cost": 20,
"Image": "https://assets.HOST.com/img/mini-joy/lobby-cards/game_calm_01.jpg"
},
{
"Bundle": "GameB",
"Title": "Island Explorer",
"Action": "Platformer",
"Cost": 20,
"Image": "https://assets.HOST.com/img/mini-joy/lobby-cards/game_calm_02.jpg"
},
{
"Bundle": "GameC",
"Title": "Far Land",
"Action": "Platformer",
"Cost": 20,
"Image": "https://assets.HOST.com/img/mini-joy/lobby-cards/game_calm_03.jpg"
}
],
"Settings": {
"BackgroundImage": "https://assets.HOST.com/img/mini-joy/lobby-bg/calm_01.jpg"
}
}
{
"Lobby": [
{
"Bundle": "GameA",
"Title": "Wild West Adventure",
"Action": "Platformer",
"Cost": 20,
"Image": "https://assets.HOST.com/img/mini-joy/lobby-cards/game_illustration_01.jpg"
},
{
"Bundle": "GameB",
"Title": "Island Explorer",
"Action": "Platformer",
"Cost": 20,
"Image": "https://assets.HOST.com/img/mini-joy/lobby-cards/game_illustration_02.jpg"
},
{
"Bundle": "GameC",
"Title": "Far Land",
"Action": "Platformer",
"Cost": 20,
"Image": "https://assets.HOST.com/img/mini-joy/lobby-cards/game_illustration_03.jpg"
}
],
"Settings": {
"BackgroundImage": "https://assets.HOST.com/img/mini-joy/lobby-bg/illustration_01.jpg"
}
}
通过简单地更改配置,您可以添加优惠、更改主题,甚至使新游戏对玩家可用。所有这些都可以立即完成。
微调游戏玩法
一个简单的平台游戏,但有一个转折!几乎每个方面都是可定制的。使您的游戏更难、更容易,或只是给它一个新鲜的外观,所有这些都不需要更新。
可配置元素
角色速度 | 你的角色移动得有多快。 |
跳跃高度 | 定义垂直限制。 |
重力 | 你的角色下落得有多快。 |
背景 & 角色 | 更改背景和角色图像。 |
平台位置 | 决定平台的放置位置。 |
{
"CompletionAward": 100,
"JumpForce": 330,
"Gravity": -300,
"MoveSpeed": 6,
"BackgroundImage": null,
"CharacterImage": null,
"Platforms": [
{
"Position": {
"x": -140,
"y": 132
},
"Length": 90
},
{
"Position": {
"x": 70,
"y": 10
},
"Length": 150
},
{
"Position": {
"x": -80,
"y": -140
},
"Length": 150
},
{
"Position": {
"x": 145,
"y": -140
},
"Length": 50
},
{
"Position": {
"x": 120,
"y": -244
},
"Length": 160
}
]
}
{
"CompletionAward": 100,
"JumpForce": 530,
"Gravity": -200,
"MoveSpeed": 10,
"BackgroundImage": "https://assets.HOST.com/img/mini-joy/game-bg/balloon_city_desat.jpg",
"CharacterImage": "https://assets.HOST.com/img/mini-joy/game-characters/dino.png",
"PlatformColor": "#ff6f61",
"Platforms": [
{
"Position": {
"x": -140,
"y": 132
},
"Length": 90
},
{
"Position": {
"x": 100,
"y": 10
},
"Length": 90
},
{
"Position": {
"x": -140,
"y": -140
},
"Length": 90
},
{
"Position": {
"x": 100,
"y": -140
},
"Length": 90
},
{
"Position": {
"x": -140,
"y": -244
},
"Length": 90
}
]
}
通过外部化游戏的配置,您可以轻松更改外观和感觉。通过调整平台位置、重力和跳跃力量来更改游戏的难度。此外,为不同的关卡创建多个配置,并让它们由 AI 生成。
游戏内商店:应用内购买的动态定价
许多游戏都有一个游戏内商店,玩家可以使用应用内购买购买积分。使用 Joystick 和动态远程配置,您可以修改定价并创建折扣,而无需触及游戏的核心代码。操作团队可以拥有更多的灵活性。
可配置元素
活动定价包 | 设置玩家可以购买的包。 |
定价包详细信息 | 设置价格并确定每个包的奖励数量。 |
{
"packagesInUse": [
"Pkg-01-010",
"Pkg-02-060",
"Pkg-05-150",
"Pkg-10-300"
],
"Definition": [
{
"Key": "Pkg-01-010",
"Price": "$1",
"Award": 10
},
{
"Key": "Pkg-02-060",
"Price": "$2",
"Award": 60
}
{
"Key": "Pkg-05-150",
"Price": "$5",
"Award": 150
},
{
"Key": "Pkg-10-300",
"Price": "$10",
"Award": 300
}
]
}
使用动态内容使其更加强大
实际上,您可能希望设置细分或 AB 测试许多这些元素。例如,只向符合条件的玩家展示特别优惠,或在某个时间展示新游戏。Joystick 有一个强大的动态内容和细分引擎,可以帮助您定位、计划更改和 ab 测试任何内容。
利用远程配置的力量提供了无与伦比的灵活性。有了它,您可以实验、适应并保持您的应用或游戏新鲜有趣。最好的部分?玩家不需要等待更新。使用远程配置让您的游戏实时发展!