The new version 0.4.2 has been released! It adds support of:
The key feature is the optional payload
parameter, which can be used for social features, i.e. inviting friends in your .io game session.
The new version 0.4.2 has been released! It adds support of:
The key feature is the optional payload
parameter, which can be used for social features, i.e. inviting friends in your .io game session.
Version 0.5.0 has been released!
It implements the newest Feedback API and has updated docs with examples of how to style banner ads.
+1 game at Yandex
Yay! Itâs still a damn good game!
Another Defold game on Yandex.Games:
Hi
Thanks for the excellent plugin!
Really a timesaver
I am having an issue though
DevTools failed to load source map: Could not load content for https://s3.mdst.yandex.net/games/source-maps/v6634140/sdk/v2-proxy.js.map: Connection error: net::ERR_CONNECTION_TIMED_OUT
DevTools failed to load source map: Could not load content for https://s3.mdst.yandex.net/games/source-maps/v6634140/sdk/v2.js.map: Fetch through target failed: Session is unregistering, canât dispatch pending call to Network.loadNetworkResource; Fallback: Connection error: net::ERR_CONNECTION_TIMED_OUT
DevTools failed to load source map: Could not load content for https://s3.mdst.yandex.net/games/source-maps/v6634140/sdk/v2.js.map: Connection error: net::ERR_CONNECTION_TIMED_OUT
I asked our publisher about it, they said the issue is on the engine side. I guess what they mean is the devâs problem, not theirs. I wonder if anyone has the solution for this?
Your publisher is wrong.
These messages are warnings from Chrome DevTools. It tries to download source maps for minified javascript files when you open DevTools. It seems Yandex doesnât provide source maps for their private SDK, i.e. the files are absent or the URL to the source maps are invalid. Thatâs why you see these warnings. And they donât affect the game in any way.
Does your game not run well because of these messages in Chrome DevTools Console?
I see, so thatâs what that warning meant.
The game just wontâ run
See screenshot, itâs just black after Loading scene is finished
What if you upload a debug build, does the log say anything then?
You could try to run a local HTML5 build to find out the issue with your game. Itâs a debug build, i.e. youâll see possible errors and the print
output in Chrome DevTools. Even outside the Yandex.Games platform it will run just fine (with some errors from Yandex.Games SDK, of course, without ads and other API).
If youâre sure that there is a problem with the Defold engine, you can upload the prebuilt YaGames demo project (download link) to your draft to check that.
Iâll give it a try, thanks!
Itâs odd because the same game has been uploaded to GameDistribution and widely distributed without any problems. Iâve only seen this problem working on Yandex build. Not sure yet what may cause it. I guess the only way to check would be to sign up as Yandex dev so we can access the dashboard ourselves.
Yes! This is a great idea.
Also, you can set up a custom error handler to log Lua errors to the browser console in the release build:
local function setup_error_handler()
if html5 and not sys.get_engine_info().is_debug then
sys.set_error_handler(function(source, message, traceback)
local s = source:gsub("'", "\\'"):gsub("\n", "\\n"):gsub("\r", "\\r")
local m = message:gsub("'", "\\'"):gsub("\n", "\\n"):gsub("\r", "\\r")
local t = traceback:gsub("'", "\\'"):gsub("\n", "\\n"):gsub("\r", "\\r")
local pstatus, perr = pcall(html5.run, "console.error('LUA ERROR: (" .. s .. ")\\n" .. m .. "\\n" .. t .. "')")
if not pstatus then
-- Never happens
print("FATAL: html5.run(..) failed: " .. perr)
end
end)
end
end
-- do this in the main script of your bootstrap collection
function init(self)
setup_error_handler()
end
Ah apparently itâs just a silly mistake on our end
A function was defined after the line where itâs called, thatâs why it stuck at Black screen
Thanks @aglitchman @Mathias_Westerdahl , really appreciate all your help
Previously, the SDK limited fullscreen ad impressions to «once every three minutes». We are now moving to the «once every two minutes» limitation.
We will continue to experiment with these ad limitations so that user metrics donÊŒt drop and game developersâ earnings increase.
Please note: we recommend that developers call the display of full-screen ads in the game without taking into account the limitation, that is, as often as possible, but in suitable places in the game â so that the user understands that this is not a part of the game, but an ad unit. Do this in logical pauses in the game, for example: before starting the game, when moving to the next level, after losing.For example, inserting an ad unit is appropriate after going to the next level by pressing a button, and not appropriate in the middle of a level, when an ad suddenly appears under the playerÊŒs finger.
Important! High ad unit clicks that result in bounces on advertisersâ landing pages negatively impact user experience and undermine advertisersâ trust in the platform. Therefore, games with a high proportion of unmotivated/random clicks automatically receive less revenue and may be blocked by moderators.
Hey, guys! We have released the new game recently - Fish Eat Fish.
Itâs a game for 1-3 players, and the main task is to eat smaller fish to grow. Currently, the game is only available in Russian.
*The development had started a long time before the announcement of YandexGames Jam, and the game doesnât participate in the contest
Yandex.Games has started restricting the number of calls to cloud save functions (i.e. like set data, increase stats, etc). The current limit is 5 requests per 5 minutes. The point is that your game doesnât pass the moderation if you donât limit the request count internally in your game.
So, I extracted a small example from our games to show how to postpone a call to yagames.player_set_data
if you hit the limit:
local throttled_player_save = {
-- Last queued data
queued = nil,
-- Counters
requests = 0,
reset_time = 0,
-- Consts
MAX_REQUESTS = 5,
RESET_PERIOD = 60 * 5,
}
-- @param data table
function throttled_player_save.queue(data)
assert(type(data) == "table")
local self = throttled_player_save
self.queued = data
end
-- Call this function in script's update() function
function throttled_player_save.update()
local self = throttled_player_save
if not self.queued then
return
end
local self = throttled_player_save
local now = socket.gettime()
if self.reset_time < now then
-- i.e. do reset
print("Reset counters")
self.requests = 0
self.reset_time = now + self.RESET_PERIOD
end
if self.requests >= self.MAX_REQUESTS then
return
end
print("Save data (" .. (self.MAX_REQUESTS - self.requests) .. " requests left)")
yagames.player_set_data(self.queued, false, function() end)
self.requests = self.requests + 1
self.queued = nil
end
-- # How to use
-- ------------
--
-- Call `throttled_player_save.update()` in your global script in the `update()` function.
-- Call `throttled_player_save.queue(data)` to save player's data to cloud,
-- i.e. do that instead of directly calling `yagames.player_set_data()`.
Yandex Games has changed the limits for the all API calls, and they are now:
player_set_data()
, player_get_data()
: 100 req / 5 min.player_set_stats()
, player_get_stats()
, player_increment_stats()
: 60 req / 1 min.leaderboards_get_description()
, leaderboards_get_player_entry()
: 60 req / 5 min.leaderboards_set_score()
: 60 req / 1 min.leaderboards_get_entries()
: 20 req / 5 min.20 requests per 5 minutes.
This week, Yandex Games introduced the âFlagsâ panel in the Developer Console.
With these flags, new game features can now be enabled without additional updates or going through moderation. In fact, this is a remote configuration and you no longer need to use third-party services to remotely manage your gameâs parameters.
Version 0.10.0 of the unofficial SDK for Defold has been released, and it implements the new remote config feature - Remote Config - SDK methods | Yandex Games SDK
Usage example:
local options = { defaultFlags = { test1 = "A" }, clientFeatures = { { name = 'levels', value = '10' } } } -- also, options can be `nil`
yagames.flags_get(options, function(self, err, result)
-- `result` is a table
end)