(solved)A few questions about the ags 3.6.0 web compiling.

Started by FanOfHumor, Wed 30/03/2022 14:51:49

Previous topic - Next topic

FanOfHumor

I have a few questions about using the html that is compiled using ags 3.6.0.
1:When I open the html file of the compiled files why does it never load.
2:Does opening the html game require internet.I don't know if it uses an online emulator or something.
3:If the game was multiplayer could it be run as one game but be accessed by many people and show the others using it.By that I mean that it would show others playing it too.Perhaps this should be in advanced technical forums.
I think that's about all the questions I need answered for now.

Khris

1. you need to serve the game. Opening it by double-clicking the index.html file will not work.
If you have web hosting already, you can upload it there to test it. You can also serve it locally by installing apache and putting them game in a folder inside apache's htdocs folder. Then you visit http://localhost/gamefolder in your browser.

2. no, as long as you run the game by visiting the locally served index.html file, the computer does not also require an internet connection

3. the fact that you can run the game inside a browser does not mean you can skip the necessary steps to create a multiplayer game. I.e. create a server the game connects to. Showing what other people do is achieved by running the entire game logic on the server (i.e. where people's player characters move, what the do, what they say). The local game only acts as a display device essentially, reflecting the server's state.

Crimson Wizard

For running the game in browser you need to set up a server. Like Khris said, you can make a local server on your machine using any appropriate software. eri0o recommends python3 http.server utility, personally I used this tool for chrome, because latest python3 does not install on my Windows 7.

There's also a dedicated forum thread about AGS web port, I recommend reading it, and perhaps ask any questions there:
https://www.adventuregamestudio.co.uk/forums/index.php?topic=59164.0

FanOfHumor

So are you saying multiplayer online is possible but it obviously needs to be hosted?

Khris

Again, the fact that you can run an AGS game in a browser does not have any bearing on what is required to create a multiplayer game. The game does not run online, it runs on your computer. Whether it is hosted elsewhere or served by a locally installed web server.

Creating a multiplayer game was possible long before AGS 3.6 came along, and the first game I saw was basically an IRC chat client which transformed clicks into text and text back into character movements and action. Your game was basically chatting with other games, but you needed an IRC server for that.

So in short: running the game in a browser does not mean it can magically communicate with other instances. A server is always required. You can in theory run your own server though, but you will need to set up a dyndns domain and port forwarding in your router to allow other players to connect to it.

FanOfHumor


SMF spam blocked by CleanTalk