Adding Game Distribution SDK



I was looking at adding in the game distribution asset so I could publish my game with them.
My game uses a controller proxy to load either the menu or game proxies.
I was hoping to pause the game proxy using the time step when an advert comes in…

I find their site frustrating… if I upload a new version the old one plays in the iframe… if I leave it an come back a day later perhaps it will have updated. I do see the adverts when I call them… but then afterwards just a black screen. How can this be debugged ?

function initAdverts()
	if(sysinfo.system_name == "HTML5")then
		if gdsdk then
			function(self, event, message)
				print(event, message)
				if event == gdsdk.SDK_GAME_PAUSE then
					-- pause your game"#sound", "pause_sound")"controlCentre:/controller#gameProxy", "set_time_step", {factor = 0, mode = 1})
				elseif event == gdsdk.SDK_GAME_START then
					-- resume your game"#sound", "resume_sound")"controlCentre:/controller#gameProxy", "set_time_step", {factor = 1, mode = 0})
	elseif(sysinfo.system_name == "Android")then
		initUnityAds(self, UnityGameIDs[sysinfo.system_name])

That does not seem to work… the screen is just going black after the advert.

The pause and resume messages work fine elsewhere in my game…

Could be that loading the game proxy is causing the issue… although that works fine on android and windows.



Yes, this happens sometimes for me as well. Make sure you are forcing your browser to reload everything to avoid having old files in the cache.

Hmm, I haven’t experienced this myself. What if you press the “Skip ad” option that comes with the Interstitial ads? Does it not close and return back to your game?

Are you using a custom HTML page or the default one?

I haven’t had problems pausing and resuming. I pause by setting the time step:"handler#game", "set_time_step", {factor = 0, mode = 0})

And I resume:"handler#game", "set_time_step", {factor = 1, mode = 0})

Could you perhaps put a print(“foo”) in an update() function to verify that the engine is still running? No errors in the console by the way?



After seeing that the time step works for you… I stripped out the SDK and went back to just a HTML game.

My assumption was that as it runs on windows and Android that it would run in HTML.

So the current issue still occurs without the SDK…

HTML debugging is new to me…
I start the server and browser with a batch file…
start chrome --incognito
python -m http.server -d c:\temp\game

Then I run the game… Then I pressed F12 to get the console… When I start the game… which causes the proxy to change I see this error…

So it seems that some of the renderer stuff that is in the project causes the issue…



I removed the shockwave render effect from my project and its working with game distribution.
Awaiting activation :slight_smile:
Thanks for the help.

1 Like


Hmm, ok, I wonder what the problem was?

What is the name of the game you submitted?



Its my shoot em up game… Not activated yet… wonder how long that will take.



One observation on GameDistribution…

When you go to full screen and then an advert is called… The screen pauses… yes.
The advert is running… but it is behind the frozen game screen… you have to leave full screen to see and close it.

1 Like


That’s a great catch! Could you please report this in the repository?

I need to check the guidelines from GD. It might be that they don’t recommend fullscreen games at all. But you can solve this yourself though right and leave fullscreen mode when you get the gdsdk. SDK_GAME_PAUSE event and then resume fullscreen when you get a SKD_GAME_START event.

1 Like


I didnt realise you could enter and leave fullscreen programmatically… I did a quick search on the docs and couldn’t see how.



Any one else have experience of how long it takes them to review games ?
17 days since posting… 11 days since it passed the advertising test…
I emailed them…



Ah, it can be done using DefOS.

I can reach out and ask. We have also submitted a game to go through the entire process. In our case it’s been a bit back and forth, adjusting some things as we discovered them, so I’m not entirely sure how long the actual review time is. What is the gameid of your game?



Ok thankyou. I will post the ID direct to you.

1 Like


Did you send this?



I did. Looking at my sent box it went to “defold”.
I have sent it again direct to you. Will post it here if that does not get to you.



Got it! Thanks!



They eventually came back after testing the game on a tonne of devices with screens that show the GUI going out of bounds… which causes a fail.

The fail is like the image above… after searching the forums I found out that the y anchoring is the issue causing the GUI to move… so I made the anchoring X = None…y = None and Adjust mode = fit.

This gets me the above screen which looks ok… but now the screen is not clipped… I am seeing objects when they are off of the screen. I have marked red lines roughly where the screen should be clipped.

Apart from the clipping everything is now appearing correctly.

I am using renderCam with these settings below… I want it to scale the game area and the gui to fit… which it is doing… but not to display the off screen parts… is it possible ?



Slap a big black gui on top of it :slight_smile:



ok yup I thought about something like that… :+1: