Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - eri0o

#581
Engine Development / Re: AGS engine Web port
Fri 11/06/2021 12:45:35
I use the OS check as a proxy-way to check for differences in features. Like, the web check here can be used so, if you have a chance that the game is played on a touch screen, you can to provide alternative controls.
#582
Engine Development / Re: AGS engine Web port
Fri 11/06/2021 11:33:52
Quote from: Crimson Wizard on Fri 11/06/2021 11:06:10
Quote from: eri0o on Fri 04/06/2021 12:26:54
If you want to handle some web difference, System.OperatingSystem is 8 for the web port
Code: ags
bool is_web = System.OperatingSystem == 8;


Maybe we could reserve it in script API just in case it's not overwritten by something?

That would be good, that was the reason I haven't advanced anything in the FreeBSD support.
#583
#584
Engine Development / Re: AGS engine Web port
Fri 04/06/2021 12:26:54
Yes, it's for the favicon.ico, you can dismiss it!
Spoiler
you can add a favicon.ico file but itch will ignore since it's wrapped in an iframe, but may be useful if you have your own website. If you want to quiet it, add this in the html header. But it's really alright to get it as 404.
Code: html
<link rel="shortcut icon" href="data:image/x-icon;," type="image/x-icon">
[close]

Did everything else worked? Any bugs you find are useful!

If you want to handle some web difference, System.OperatingSystem is 8 for the web port
Code: ags
bool is_web = System.OperatingSystem == 8;
#585
Is it possible to have a greyish rectangle background for short code formatting (the [ tt ] block )? Also don't know if possible, but if it's, having a way to create anchors would be awesome. (these are for referencing headers in my short in forum READMEs for my modules like https://www.adventuregamestudio.co.uk/forums/index.php?topic=58894.0)
#586
Engine Development / Re: AGS engine Web port
Thu 03/06/2021 06:06:56
added a new version of the ags_web.zip on the top post that I think fixes bugs reggarding the correct resizing of the game screen. I also added a percentage number indicating how much of the game files has been downloaded!

(I read the other issues, I am working on them)
#587
This error can be prevented changing SpeechBubble.asc, Line 726 from
Code: ags
    if(_bubbleOverlays[id] != null)
      _bubbleOverlays[id].Remove();

to
Code: ags
    if(_bubbleOverlays[id] != null && _bubbleOverlays[id].Valid )
      _bubbleOverlays[id].Remove();

(minimal project: TestOverlaySpeechBubble.zip)
#588
people,

I started to try to update the AGS Xcode project for MacOS and discovered that Xcode is super alien for me (I normally do MacOS through CLion using CMake). If some of the MacOS devs that occasionally appear here see this message, I made some initial work to get at least the libraries in a newer version and in a state they build and install, but I am stuck trying to understand how to add files in Xcode in a way the headers actually work. In case some Xcode expert wants to join and upgrade the projects, here is the initial work: https://github.com/ericoporto/ags/tree/macos-xcode-sdl2
#589
Engine Development / Re: AGS engine Web port
Thu 27/05/2021 01:51:40
Fixed a very big bug that makes games crash when tabbing out or getting it out of focus, updated the links above.
#590
Engine Development / Re: AGS engine Web port
Wed 26/05/2021 14:47:36
@Mehrdad thanks! It's been a long road!

@Snarky Yeah! I have been thinking about making an editor plugin to add it to the build menu, but thought that it wasn't THAAAT hard to could just mention it here and see if people can tryout the files! I actually started writing the single game player with archive.org in mind (lots of ags games there). Also GitHub pages I think act as CDN so theoretically people could point to the WASM there to only load once and cache, but turns out Gamejolt and Itch.io recommend to ship all files with no dependencies together to avoid Cross-Origin Request errors.

@Potajito, I PMed about it, but the Web port should be compatible with Mobile browsers.




In the index.html, in the CSS that is embedded in it, under canvas.emscripten {, it may be necessary to adjust min-height and min-width it to your game native resolution too. If someone can experiment and tell me about it would be useful, specially considering Itch.io.
Spoiler
Code: html
      canvas.emscripten {
        position: absolute;
        top: 0px;
        left: 0px;
        margin: 0px;
        width: 100%;
        height: 100%;
        overflow: hidden;
        display: block;
        min-height: 180px; /* set to your game height */
        min-width: 320px; /* set to your game width */
        border: 0 none;
        background-color: #000
      }
[close]

Edit:

Just found a bug I forgot to fix, fixed in the zip file above, should be working now.
#591
Engine Development / AGS engine Web port
Wed 26/05/2021 02:45:17
the web port is now available along AGS 3.6.X releases!

>>any game launcher<<
    single game example
it's AGS, so Alt+Enter will get you in/out of Fullscreen

please report bugs here or in AGS GitHub issue tracker! If you are unsure if it's a bug, ask about problems here in the thread!!!

New: CW did an amazing video and sound refactor and after it, it was possible to get video working on the web port! Download this game to test in the above launcher link!

Old packaging instructions are not needed anymore since it should now be possible to build directly from the Editor by simpling checking the appropriate box in General Settings and selecting the Web as a build target.

Packaging a Game

  • In the AGS Editor, go to General Settings, and under Compiler, there is the Build target platforms entry, select Web!
  • Click Build EXE (f7)
  • in the Compiled/Web/, you can test running locally a web server in the directory (python3 -m http.server or any other tiny local server you have) and opening the address in the browser.
  • Remember that if you use anything beyond left click your game won't be mobile friendly for now.
  • TEST BEFORE SHIPPING
  • zip the contents of the Compiled/Web/ dir and upload it in either itch.io or gamejolt so people can play your web port.

Spoiler

Web packages now are available with AGS Releases in GitHub, with a name similar to ags_3.6.0.17_web.tar.gz, with versions changing accordingly. But they are not needed anymore if you are using AGS Editor since you can now build directly from there!
The old instructions are left here for historical purposes.

  • Download the zip above and extract the files to an empty folder
  • Copy your game files to the same directory. If possible, use the .ags version from Compiled/Data
  • Edit the file my_game_files.js overwriting the array with your game files.
  • Edit the title tag on index.html with your game name.
  • Optionally, test running locally a web server in the directory (python3 -m http.server) and opening the address in the browser.
  • Remember that if you use anything beyond left click your game won't be mobile friendly for now.
  • TEST BEFORE SHIPPING
[close]

Notes: the port won't work in any big ags game (like a game beyond 300MB (unless you are like in charge of the navigator using electron or phonegap or something...)).

itch.io
Spoiler
Itch provides here a small guide on html5 games that might be relevant. Config is something like this (note, the resolution has to match your game resolution).

Only mark web-friendly if your game is Left mouse click only (for now everything else will be difficult to support in the touch only device). You can also use itch's full-screen button for now.
[close]
Gamejolt
Spoiler
is a bit simpler, after uploading the zip file
[close]

If you want to build this binary from source...

Known issues

  • Currently the webport kidnaps all keyboard keys, but I could do focus handling (on HTML canvas), if someone has a need for this tell me about and we can test your use case.
  • If you want persistent save files, ask me about it here in the thread, they are technically possible
  • Won't render correctly LucasFan-Font.ttf
  • Can't play MIDI, if you intend to build for web, avoid it. Use ogg files always.
  • Browser interprets ESC key as exiting of Fullscreen (not sure why yet since it's not a default behavior)
  • Last builds are hitting a Chrome bug in Mobile, the way to avoid is using an old Emscripten when building, but this has it's own issues. THE BUG HAS BEEN FIXED in Chromium upstream, and it will be running flawless in Chrome 100, you can test now by installing Chrome Canary. Chrome 100 will be stable after March 29 , 2022!

Extra Information

  • System.OperatingSystem has an enum for the Web system, if you want to account for differences in your game at runtime
  • leave sprite compression on for your game, it has no perceptible perfomance impact.
  • Port idea originated from the previous topic (here).

If you know JS or CSS, I really need help making the HTML and file loading prettier. Below is current loading:

#592
I imagine things downloaded from the internet after Catalina gets tagged as insecure by the OS, so I it would require both code signing and notarization to run. But the SO answers says a bunch of different things: https://stackoverflow.com/questions/64842819/cant-run-app-because-of-permission-in-big-sur/64895860#64895860
#593
Hey Snarky, when you update the module, if you can please add the border support that was here : https://www.adventuregamestudio.co.uk/forums/index.php?topic=56121.msg636587529#msg636587529 (I don't think they made into the latest release).
#594
Was the signature size reduced? I can't seem to keep my signature as it was before.
#595
#596
Thank you!  :-D
#597
Adding itch io profile as a new social network on the forum profile would be nice.
#598
I think you are mixing what the module does and what ags cameras do.

AGS Cameras have a property called AutoTracking which will make them follow whoever is the player.

https://adventuregamestudio.github.io/ags-manual/Camera.html#cameraautotracking

If you move the camera in other ways, like directly setting a camera position, it will disable this tracking, which is necessary for the module.

https://adventuregamestudio.github.io/ags-manual/Camera.html#camerasetat

Your default game camera can be accessed under Game.Camera property. When you disable the rellax camera, if you want it to return the default following you can just set AutoTracking to true.

I usually do my Camera movement that is not through rellax using the Tween module - because I usually want the smoothness - but it's interesting that you have a use case without smoothness.

There's a constant inside rellax that sets the smoothness, perhaps I could expose it too in case people want to tweak it.
#599
Hi, I added support for solid characters. If you control a solid character it should collide with other solid character.
#600
Probably lockviewframe doesn't play sound, so I need to handle it manually. I actually never noticed sounds weren't playing. I will fix this later tonight and update it here!

Edit: I think I fixed, please verify!
SMF spam blocked by CleanTalk