Play AGS Games via browser

Started by Sledgy, Sun 04/10/2020 20:13:08

Previous topic - Next topic

eri0o

#40
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

Bòógieman

#41
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

Quote from: eri0o on Fri 23/04/2021 20:53:33
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?
>>>> END OF LINE <<<<

Crimson Wizard

#42
Quote from: eri0o on Fri 23/04/2021 20:53:33
  • 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.

Quote from: Bòógieman on Mon 26/04/2021 07:33:26
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


Quote from: eri0o on Fri 23/04/2021 20:53:33

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

eri0o

#43
Quote from: Bòógieman on Mon 26/04/2021 07:33:26is 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.

Quotetested 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.

Quote from: Crimson Wizard on Mon 26/04/2021 08:41:47
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.

Quote from: Crimson Wizard on Mon 26/04/2021 08:41:47
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).

Bòógieman

#44
Quote from: eri0o on Mon 26/04/2021 13:23:30
Quotetested 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
>>>> END OF LINE <<<<

Blano

sorry for necroposting but the link to the player is broken.. can anybody give me a valid link?
thx you! :wink: :wink:

Hobo

You can find the latest AGS web port stuff from this thread: https://www.adventuregamestudio.co.uk/forums/index.php?topic=59164.0
The first post should have everything you need to get your game running in a browser.

SMF spam blocked by CleanTalk