Are there known issues with the web (online upload) on desktop vs mobile

I’ve been using the publish to web (online upload) gdevelop hosted playable links to help test mobile functions (haven’t learned enough yet to publish and test a standalone mobile app).

I’ve seen some weirdness when using these links between a desktop and a mobile device. Some times on the mobile the global variables don’t seem to be getting set correctly and I think I have something wrong with my button clicking logic.

I’ve got a level selection page, in it there is some tween logic to make the buttons react to mouse or touch, then a I set a global “ActiveBoard” variable to the level they select. I then change to the correct scene when the “left mouse is released” or a “touch has ended”. At the beginning of the related scene I then load an external layer based on the ActiveBoard global variable.

This all works perfect on the desktop, and works most of the time on the mobile. However after the first time in to a level and back to the level select page the global variable seems to get stuck being assigned to the original selection when on a mobile. It is not always, but after going into a level and back the level select a few times it gets confused.

The mobile player actions also get stuck or confused randomly. Sometimes the player will get stuck forever jumping after a while, even after going to the level select and back to the level again the player is instantly jumping.

None of these bugs seem to occur when using a desktop.

Here is the logic I use for the buttons and “activeboard” variable assignment. Most of the logic for the reactive tween buttons I learned from WishForge Games tutorials (they are awesome). At one point I had the “click released” and “touch ended” in the same condition with an OR but that didn’t work so I separated them:

Then this is the logic for loading the external layout based on the value of the variable. I check to see if it is greater than 0 (making sure it is assigned to something), then I load the external layout. I had grouped the hiding of the enemy AI and hitbox all in the same “At the beginning of the scene” condition as the display of the activeboard and reset the players health, but it didn’t hide the sprites to I added a second one (not ideal I know)

Here is all of my logic for the controls, mostly using the default controls when on desktop:

You can try it out if you want, here is the latest version of my game (very much in development, only level 1 and 2 are halfway built). From the desktop, Z is run, space jump, left right arrows move, press “L” to return to the level select page and “R” to reset your player. From a mobile, use the control icons and select the Menu button to return to the level select page.

In short:
Any known issues with online published games desktop vs. mobile?
Anything special I need to do with global variables here?
Anything about touch controls I need to do differently?

Can you even reproduce the issue?

Thanks as always for the help, hope you like the game.

You are using “a touch has ended” and “left mouse or touch was released”.
Also, I see you are missing quotes in some tween names, and using the same name in various tweens.

Fix those and let us know.

There’s no real difference between preview/export/web, but the browsers have restrictions (they require an interaction before playing a sound, for instance).

HI @Gruk, thanks for your help, good eye on the tween issues, I’ve added unique names and corrected the syntax.

As for the use of both Touch has ended and Mouse button was released. I thought I had to use both because there is a specific “Mouse button pressed or touch held” but I do not see a “Mouse button was released or touch has ended” single function:

At one point I tried to put them both in the same condition with an OR like this but it did not give me the expected results

The tween updates alone did not fix my primary issue of the global variable defining the active scene not being able to be updated after the first selection.

If you use Left (main) click, it also applies to touch.

Maybe because you’re mixing value and string instructions… not sure how much it matters.
Make them consistent in conditions, actions and expressions. Either use text everywhere, or use values and apply ToString() where necessary.

But in your demo linked above, I’m able to change layouts. What’s the issue, exactly?

two main issues:

  1. Only on a mobile device, if you go back to the level screen, you can click on board 2 or 3 but you are directed back the original board. On a desktop it works perfectly, you can switch back and forth all day, but on a the mobile it is very inconsistent sometimes it works sometimes it doesn’t.

  2. After a few minutes of playing, maybe switching boards if it is working, a keypress gets “stuck” like always jumping or always moving left or right. This continues even if you exit a board and return

Neither of these seem to exist on a desktop.
Here is the latest link with the tween stuff cleaned up.

I really appreciate your input.