Jibble

Author Topic: Play AGS Games via browser  (Read 3586 times)

eri0o

Re: Play AGS Games via browser
« Reply #40 on: 26 Apr 2021, 00:32 »
Hey, worked on a bunch of fixes and I think I got it working in a reasonable state, if someone wants to try again.  (roll)

AGS Web Player (3.6.0 Alpha) ericoporto.github.io/agsjs/3_6_0/index.html

sorry for bumping. Details on previous post here: https://www.adventuregamestudio.co.uk/forums/index.php?topic=58470.msg636635317#msg636635317
« Last Edit: 26 Apr 2021, 00:34 by eri0o »

Re: Play AGS Games via browser
« Reply #41 on: 26 Apr 2021, 07:33 »
great to see that you carry on!, thx for that!  (nod) :-*

tested again with my game Maniac Mansion Mania Episode 53, looks like the game runs just a bit slower than normal  ???
the speech font's outline is out of place, but I think this has something to do with "newer AGS running older AGS games", so not directly a problem of the browser port

MIDI output is mute in the games I tested, probably need a sound font but using one makes the size huuuge, so I probably won't fix this.
sad to hear that, this means the web player will not support a lot of older games  :cry:
is there an optional way to put the sound font to the game files, so that the web player uses it when its found?
« Last Edit: 26 Apr 2021, 07:37 by Bòógieman »
>>>> END OF LINE <<<<

Re: Play AGS Games via browser
« Reply #42 on: 26 Apr 2021, 08:41 »
  • Also, apparently there's some change in the FreeType used by AGS, unfortunate building FreeType to WASM is super hard and I can't figure out, for now I am using a prebuilt FreeType from Emscripten itself, but it's an older version that is different from the one used by AGS and some fonts will render wrong.

To double check, the one in browser version is older than one that comes with AGS? (I think AGS does not use newest FreeType either)
There were couple of reports of broken fonts in older games (e.g. https://github.com/adventuregamestudio/ags/issues/835), which happened probably after we switched to using one version of FreeType universally on all ports.

tested again with my game Maniac Mansion Mania Episode 53, looks like the game runs just a bit slower than normal  ???
the speech font's outline is out of place, but I think this has something to do with "newer AGS running older AGS games", so not directly a problem of the browser port

Idk if related, but we had this old hack for Maniac mansion mania games, it got to be enabled during compilation:
https://github.com/adventuregamestudio/ags/blob/master/Common/font/ttffontrenderer.cpp#L111



Does this happen only in a browser port or everywhere in latest AGS?
« Last Edit: 26 Apr 2021, 08:43 by Crimson Wizard »

eri0o

Re: Play AGS Games via browser
« Reply #43 on: 26 Apr 2021, 13:23 »
is there an optional way to put the sound font to the game files, so that the web player uses it when its found?

I haven't tested yet, but theoretically if you put the soundfont with the game it should work. The problem is the soundfont size will occupy RAM of the JS/WASM VM, so ideally one should use a soundfont that is as small as possible.

Quote
tested again with my game Maniac Mansion Mania Episode 53, looks like the game runs just a bit slower than normal

This may be a bug, I will check it. If you can report the platform you used to test I will use the same and see what I can find.

To double check, the one in browser version is older than one that comes with AGS?
It's, it's FreeType 2.0.6, from 2015, directly from Emscripten FreeType port. AGS version is much newer, I think 2.1.13 or something similar.

According to my own notes for myself I built FreeType from AGS repositories for WASM in the past, but I don't see how, I tried to build with the exact same machine, tools and got known errors. So I think my notes are misleading. But I don't have some errors with font rendering in the old build. I can't build the exact same WASM I did in the past unfortunately. Anyway, I will look into FreeType with the people from FreeType itself and see how far I get - the build errors are in the C macros.

I will look more into this and try to figure out what happened, but the problem is either in Emscripten or my code (or FreeType), not ags.

Does this happen only in a browser port or everywhere in latest AGS?

It doesn't happen on the new SDL2 port, it was a bug on the old SDL2 port (the original Sonneveld code), which was the one the previous browser port was based on (so it happened there too).
« Last Edit: 26 Apr 2021, 13:49 by eri0o »

Re: Play AGS Games via browser
« Reply #44 on: 26 Apr 2021, 13:57 »
Quote
tested again with my game Maniac Mansion Mania Episode 53, looks like the game runs just a bit slower than normal

This may be a bug, I will check it. If you can report the platform you used to test I will use the same and see what I can find.
Firefox 88 64bit, on Win10 Pro 64bit, 20H2
« Last Edit: 26 Apr 2021, 16:25 by Bòógieman »
>>>> END OF LINE <<<<