You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+14-12Lines changed: 14 additions & 12 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,13 +12,9 @@ YaGames is the Yandex.Games SDK native extension for the [Defold](https://www.de
12
12
13
13
[Yandex.Games](https://yandex.com/games/) is a collection of browser HTML5 games for smartphones, computers, tablets, and TVs. The games are available in Yandex Browser and the Yandex app. Games from the catalog are displayed in Yandex recommendation systems, which have a total audience of more than 50 million users per month.
14
14
15
-
You can check [here](https://radar.yandex.ru/yandex) the size of Yandex.Games audience. The platform is constantly growing.
16
-
17
15
## Installation
18
16
19
-
You can use it in your own project by adding this project as a [Defold library dependency](http://www.defold.com/manuals/libraries/). Open your `game.project` file and in the dependencies field add **a link to the ZIP file of a [specific release](https://github.com/indiesoftby/defold-yagames/tags).**
20
-
21
-
**Note:** Use [version 0.8.1](https://github.com/indiesoftby/defold-yagames/releases/tag/0.8.1) for Defold <=1.3.7.
17
+
You can use it in your own project by adding this project as a [Defold library dependency](http://www.defold.com/manuals/libraries/). Open your `game.project` file and in the dependencies field add **a link to the ZIP file of a [specific release](https://github.com/indiesoftby/defold-yagames/releases).**
22
18
23
19
## Getting Started
24
20
@@ -31,17 +27,17 @@ You can use it in your own project by adding this project as a [Defold library d
31
27
### Checklist For Releasing Game
32
28
33
29
1.[Sign up as a developer](https://yandex.ru/dev/games/doc/dg/concepts/about.html?lang=en).
34
-
2. Translate your game to the Russian language (*tip:*It's a great idea to translate your game title into Russian too.). English and Turkish are optional [(more info)](https://yandex.ru/dev/games/doc/dg/concepts/languages-and-domains.html?lang=en).
30
+
2. Translate your game to the Russian language (*tip:* translate your game title into Russian too!). English and Turkish are optional [(more info)](https://yandex.ru/dev/games/doc/dg/concepts/languages-and-domains.html?lang=en).
35
31
3. Prepare assets for the catalogue:
36
32
- Icon 512 x 512 px.
37
33
- Cover 800 x 470 px.
38
34
- Screenshots.
39
35
-*(Optional)* Videos and GIF.
40
36
4. Add [the extension](https://github.com/indiesoftby/defold-yagames/archive/master.zip) as a Defold library dependency to your project.
41
37
5. Enable monetization and earn revenue from placing ad blocks in your game. Ad blocks are available in the following formats:
42
-
-**Interstitial blocks**: ad blocks that completely cover the app background and show up at certain points (for example, when accessing the next game level). *Important: Mute sounds before showing the ad.*
43
-
-**Rewarded videos**: blocks with video ads that the user can choose to view and earn a reward or in-game currency. *Important: Mute sounds before showing the ad.*
44
-
-**Sticky banners**: the same as RTB but they're much easier to setup.
38
+
-**Interstitial blocks**: ad blocks that completely cover the app background and show up at certain points (for example, when accessing the next game level). *Important: Mute sounds before showing the ad!*
39
+
-**Rewarded videos**: blocks with video ads that the user can choose to view and earn a reward or in-game currency. *Important: Mute sounds before showing the ad!*
40
+
-**Sticky banners**: banner ads, super easy to setup.
45
41
-**In-game purchases**: earn revenue by providing paid services to your users.
46
42
5. You can [publish your game on Yandex.Games](https://games.yandex.ru/console/) from this moment. It fully meets [the requirements](https://yandex.ru/dev/games/doc/dg/concepts/requirements.html?lang=en).
47
43
@@ -173,6 +169,9 @@ end
173
169
174
170
### Misc
175
171
172
+
> [!TIP]
173
+
> We don't use thes features in our games as we don't see any improvements in our games metrics, and the complexity of its integration and support is quite high.
174
+
176
175
#### Native Cache How-To
177
176
178
177
Yandex's [Native Cache](https://yandex.ru/dev/games/doc/dg/concepts/native-cache-settings.html?lang=en) lets users use games offline. Currently, it's available only in Yandex Browser or the Yandex app on smartphones.
Yandex allows to integrate Service Worker into your game to be able to run both offline and online.
185
+
Yandex dropped the Service Worker description page in their docs, but it still allows to integrate Service Worker into your game to be able to run both offline and online.
187
186
188
187
1. Set the path to the file `sw.js` in the `game.project` settings.
189
188
2. Copy the `yagames/manifests/web/sw.js` file to the root directory of your release build.
@@ -215,11 +214,14 @@ Yandex.Games JavaScript SDK uses ES6 Promise for asynchronous operations. For Lu
215
214
216
215
### Lua <-> JS
217
216
218
-
The best way to integrate SDK into your game is to read [the official documentation](https://yandex.ru/dev/games/doc/dg/concepts/about.html?lang=en) and to use corresponding Lua API functions. The table below helps to do that:
217
+
The best way to integrate SDK into your game is to read [the official documentation](https://yandex.ru/dev/games/doc/dg/concepts/about.html?lang=en) and to use corresponding Lua API functions.
218
+
219
+
And it's also a good idea to upload a demo build of YaGames to your game's draft and click on the buttons to understand what the arguments are and what each function returns.
219
220
220
221
| Yandex.Games JS SDK | YaGames Lua API |
221
222
| ------------------- | --------------- |
222
223
|`YaGames.init(options)`|`yagames.init(callback)`<br>The `options` is a JavaScript object `{}`, and it can be set in the `yagames.sdk_init_options` setting. |
@@ -296,7 +298,7 @@ The best way to integrate SDK into your game is to read [the official documentat
296
298
297
299
## Sitelock
298
300
299
-
It's a good idea to protect your HTML5 game from simple copy-pasting to another website. YaGames has Sitelock API for that purpose. It's simple, but it's better than nothing.
301
+
It's a good idea to protect your HTML5 game from simple copy-pasting to another website. The YaGames extension has Sitelock API for that purpose. It's simple, but it's better than nothing.
300
302
301
303
By default, it checks hostnames `yandex.net` (CDN of the Yandex.Games) and `localhost` (for local debugging).
0 commit comments