Play in browser issues

Started by cat, Wed 26/02/2025 20:53:38

Previous topic - Next topic

cat

I'm not sure if this is an AGS site issue or web build issue or an issue with my game. Let's find this out and then move the thread where it belongs.
@eri0o You might know more :)

I added the web build of Mr Bear to the game page (https://www.adventuregamestudio.co.uk/play/game/2369/).

PC - Windows - Firefox/Edge
When I click "Play in Browser" a new page opens and my game is loaded. The intro animation is shown, but without sound. Then, the next room is shown. The character should say a sentence and afterwards the game should start. However, the talking animation is played, but I hear no voice acting. Even more problematic is the fact that the talk animation does not stop and the rest of the game does not continue. This changes, once I click inside the game. Suddenly I can hear the audio and the animation stops, I can play the game just like the windows build.

Android - DuckDuckGo (my phone)
My phone is apparently too old, it doesn't even load. Let's ignore this.

Android - Firefox (raeff's phone)
It's the same as with PC-browser. When the intro is over (without sound), the character again says his sentence but without voice acting. The only thing that is possible to do in this situation is to click the cogwheel in the corner, this will fix the game. Just clicking in the screen doesn't do anything. When clicking anywhere in the screen during the intro sequence, this will fix the game as well.

So my assumption is, that the game has to be clicked/activated before it runs correctly. Would it be possible to do this automatically on page load or something?

The only other game that has this feature activated is https://www.adventuregamestudio.co.uk/play/game/2824/ and here also the music only starts to play when activating the game window with a click.
If direct activation from the site itself is not possible, maybe the game shouldn't start but show a button "Start game" or similar to make sure the game is running in a valid state.

AGA

One for @eri0o I'm afraid!  eriOo, I've tried using .focus on the <canvas> tag in the iFrame's onload, but it doesn't seem to do anything.

cat

Two more things I noticed:

As a developer, when I upload a game: where is this actually hosted? Is it on the AGS site itself? Or is this forwarded to another server? In this case, this should be stated more clearly, maybe with a link to their terms and conditions.

As a player on mobile, "Press ALT+ENTER to play the game in full screen, then ESC to return to browser." doesn't make much sense. I wasn't sure if it is possible to go to full screen on mobile. It might be a good idea to extend the the text a bit:
"Press ALT+ENTER to play the game in full screen, then ESC to return to browser. Alternatively, use the cogwheel icon in the bottom-right corner of the game." (or similar)

Kara Jo Kalinowski

When I try to upload a web version with a zip file, it just takes me to a white page and doesn't upload.

AGA

Quote from: cat on Thu 27/02/2025 09:07:43As a developer, when I upload a game: where is this actually hosted? Is it on the AGS site itself? Or is this forwarded to another server? In this case, this should be stated more clearly, maybe with a link to their terms and conditions.

AGS site.

Quote from: cat on Thu 27/02/2025 09:07:43As a player on mobile, "Press ALT+ENTER to play the game in full screen, then ESC to return to browser." doesn't make much sense. I wasn't sure if it is possible to go to full screen on mobile. It might be a good idea to extend the the text a bit:
"Press ALT+ENTER to play the game in full screen, then ESC to return to browser. Alternatively, use the cogwheel icon in the bottom-right corner of the game." (or similar)

I'll try to tweak the wording!

Quote from: Kara Jo Kalinowski on Thu 06/03/2025 00:59:26When I try to upload a web version with a zip file, it just takes me to a white page and doesn't upload.

Are you following the instructions as given?  'Here you can upload a .zip file of the contents your "Compiled\Web" folder after selecting "Web" in the "Build target platforms" menu of the AGS Editor, then clicking "Build EXE".'  If so, can you please upload the exact zip you're trying to upload and I'll see if I can debug the issue.

Kara Jo Kalinowski

#5
Quote from: AGA on Sat 08/03/2025 12:13:44
Quote from: cat on Thu 27/02/2025 09:07:43As a developer, when I upload a game: where is this actually hosted? Is it on the AGS site itself? Or is this forwarded to another server? In this case, this should be stated more clearly, maybe with a link to their terms and conditions.

AGS site.

Quote from: cat on Thu 27/02/2025 09:07:43As a player on mobile, "Press ALT+ENTER to play the game in full screen, then ESC to return to browser." doesn't make much sense. I wasn't sure if it is possible to go to full screen on mobile. It might be a good idea to extend the the text a bit:
"Press ALT+ENTER to play the game in full screen, then ESC to return to browser. Alternatively, use the cogwheel icon in the bottom-right corner of the game." (or similar)

I'll try to tweak the wording!

Quote from: Kara Jo Kalinowski on Thu 06/03/2025 00:59:26When I try to upload a web version with a zip file, it just takes me to a white page and doesn't upload.

Are you following the instructions as given?  'Here you can upload a .zip file of the contents your "Compiled\Web" folder after selecting "Web" in the "Build target platforms" menu of the AGS Editor, then clicking "Build EXE".'  If so, can you please upload the exact zip you're trying to upload and I'll see if I can debug the issue.


Hey, I realized that there was a problem with the game in web, I think it's related to trying to read a text file. As the game is a MAGS game I'll wait before fixing it and trying to upload, but in the website itself it just goes into infinite loading so I'm not sure if it's related. Or I could be completely wrong as to why it's not working.

https://www.dropbox.com/scl/fi/p1x5nwf1r1k50rfb0v11j/Web.zip?rlkey=webg3pklw4s2dykatj6331i47&st=jnggy7ko&dl=0

AGA

The site doesn't touch the game itself when you upload, all it does is run some security checks and unpack the files ready to be run.  So the game could be completely broken, but the site won't know, it *should* upload regardless.

AGA

Looking at the zip you uploaded, it's quite possible the issue is that you zipped up the Web folder itself, rather than its *contents*.  The structure of your file looks like "Web\MAGSMan.ags", rather than the "MAGSMan.js" it's expecting.

AGA

@eri0o can you provide any help with cat's original report above, please?

cat

A bit more on this: my colleague tried it on his iPhone and iPad. On one it didn't work at all, on the other he had the same issues with the focus. When he just started the game without clicking anything, the game would crash soon. If he clicked during loading, the intro and beginning of the first screen did work. However, it crashed shortly afterwards.

I saw with various online game engines that after loading, there would be a start button you have to press to start the game. Maybe this could be done here as well? This would at least make sure that the game has focus before starting it.

SMF spam blocked by CleanTalk