Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Newcomers AppGameKit Corner / What is the "trick" to getting HTML5 games to run in web browser from website

Author
Message
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 10th Dec 2016 07:52 Edited at: 10th Dec 2016 08:06
Hello. I am hoping someone can provide some guidance.

I just started playing around with AppGameKit about a week ago. I have a tiny game project I am working on a bit here & there.

Now the programming and all is no issue at all. Everything is coming along very well. The game runs fine on my computer as both a Windows application and in Firefox running locally.

However, tonight I decided to upload it to my website because I was thinking of doing a little work in progress thing and let people try it out.

When I run in Firefox locally like I said it works fine. Here is a video of it in action (sorry I have no idea how to use the Video tag to embed it tried but it did not work):

[video=https://www.youtube.com/watch?v=xf83WFy7bCE] <-- doesn't seem to work
https://www.youtube.com/watch?v=xf83WFy7bCE

As you can see it is just a tiny retro style game. You take on the role of a farmer throwing pitchforks up into the sky to take care of those pesky attacking crows who just happen to be dropping exploding eggs.

You have 5 pitchforks available and have to collect them after using them. They respawn in fixed locations.

Anyway, the issue is when I try to run the game from my website it loads and immediately errors out.



I can't make any sense out of this error message. It seems to be describing something in a fair amount of detail yet at the same time all of the text is telling me nothing.

I checked the AppGameKit Editor to see if there were any build options for HTML5 so I could enable the ASSERTIONS=1 thing or use other debugging options but could find nothing.

Does anyone know what the issue would be? Like I said the video above is from the same exact HTML5 game running in the same FIrefox browser only it is running locally from my hard drive instead of from my website.

Thanks!
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
damothegreat
User Banned
Posted: 10th Dec 2016 22:36
Is it first time you tried it on your website

Hazard a guess

Maybe a file read/write permission issue on your IIS setup.

Using Tier 1 AppGameKit V2
Started coding with AMOS
Anything is possible if put mind to it
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 10th Dec 2016 23:47
@damothegreat hey thanks for taking the time to reply. Appreciate it!

Yes this is the first time I have tried deploying anything from AppGameKit to a website.

It shouldn't have any issue with reading. At least not that I know of because I put other games there done in Unity, Monkey X, etc and they have no problems.
I don't think there should even be any writing going on. At least I am not doing any writing to files inside my code.

I guess what I can do is export one of the small AppGameKit samples as HTML5 and see if it works on my website and also upload my game to GameJolt as a WIP that nobody can see.
Those two things should give me an idea if it is something to do with my website or if it is something to do with my game program specifically.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 11th Dec 2016 00:20
Hey @damothegreat you may be on the right track! I just uploaded my game to my GameJolt account (in private mode so only I can see it) and it works fine.

And I uploaded one of the AppGameKit samples to my website and get the same error message.

This creates an even bigger mystery for me though because the games I upload using Unity, Monkey X, etc to my website work fine. So I am not sure what I would need to change for AppGameKit HTML5 projects to be able to run.

Is there some special thing I need to do on my website? If so, what and how?

Thanks!
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
damothegreat
User Banned
Posted: 11th Dec 2016 13:24
I'm not too sure at moment. I'll take a look at the export module settings

Has anyone else here experienced a similar issue to garbenjamin

It may need @paul to look into it if general issue

Shall take a look when I can as I'm currently at hospital to look after mum
Using Tier 1 AppGameKit V2
Started coding with AMOS
Anything is possible if put mind to it
MikeHart
AGK Bronze Backer
21
Years of Service
User Offline
Joined: 9th Jun 2003
Location:
Posted: 11th Dec 2016 21:07 Edited at: 11th Dec 2016 21:17
Is that the console output from the browser you posted above?

Which export options did you use?

I checked my app on my website, works fine there.
-----------------------------------------------------------
Using AGK2 Tier 1
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 12th Dec 2016 00:09 Edited at: 12th Dec 2016 00:38
@MikeHart that is what appears at the top of the web page after the game loads.

Let me make a video that will probably better illustrate what I am seeing.

I refreshed it once just to do a repeat. Basically what happens is the program loads (or starts to load at least) I can see the loading % going up to what appears to be about 90% and then the error appears right at the top of the web page above the game window.

https://www.youtube.com/watch?v=SH_Yge4A3_Y

Or if you just want to see it in action firsthand here is a link to the build on my website: http://garsgames.com/AGKprojects/AOTC/

The only options I see for the HTML5 export are to limit the included library support for 2D or to support both 2D and 3D AND the memory config for using Dynamic Memory or not.
I have tried the various combinations of those two and it makes no difference. Also the export works fine on my GameJolt web account.

Not a big deal though I can always just put up my WIPs on GameJolt instead of my own website. I just thought it was odd because I have never ran into this before.

GameJolt export is here: http://gamejolt.com/games/attack-of-the-crows/216892
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
MikeHart
AGK Bronze Backer
21
Years of Service
User Offline
Joined: 9th Jun 2003
Location:
Posted: 12th Dec 2016 06:51
Maybe a bug. I would post it as that.
-----------------------------------------------------------
Using AGK2 Tier 1
damothegreat
User Banned
Posted: 12th Dec 2016 14:00
Maybe use Microsoft's sysinternals app processmon to analyse any failures (access denieds) on file and registry read and writes... This may help to see if its that and to deduce the issue down a bit better
Using Tier 1 AppGameKit V2
Started coding with AMOS
Anything is possible if put mind to it
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 12th Dec 2016 18:38 Edited at: 12th Dec 2016 18:39
@MikeHart and @damothegreat thanks for posting. Well, I don't want to get sucked into working on this trying to figure it out. I just thought perhaps someone else had encountered this and knew how to resolve it.

I only dabble in game dev for fun and just want to spend the time I do put on it into actually making games of a sort. As long as they work fine when deployed to GameJolt, etc I can work with that.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
damothegreat
User Banned
Posted: 12th Dec 2016 22:24
To me.. If there is a general issue somewhere when putting apps onto a webserver to run - it needs to be looked into and resolved really.

couple Years down the line, someone else may like to do this and it wont work.

Battle issues as we come across them is my motto.

Using Tier 1 AppGameKit V2
Started coding with AMOS
Anything is possible if put mind to it
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 13th Dec 2016 17:12
@damothegreat I hear you. That's always been my approach as well up til recently. Thing is I have no idea where to even begin to look. MX HTML5 deployments work fine on my site. Unity deployments work fine on my site. AppGameKit HTML5 deployments work fine on GameJolt.

That all points to something specific about AppGameKit HTML5 deployment on my website. But what? I have no idea and no clue as to where to even begin looking. So for me it is just a waste of the limited time I have available to spend on this stuff.

If the builds didn't work on GameJolt I'd "bite the bullet" and dig into it or else switch back to MX or Unity. But since they do I can work with that.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
Carharttguy
8
Years of Service
User Offline
Joined: 8th Jul 2016
Location: Belgium
Posted: 19th Dec 2016 12:02
Hello

Did you set the .mem and .data as mime types on your webserver?
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 19th Dec 2016 19:55 Edited at: 19th Dec 2016 19:57
@Carharttguy I'd need to get into the control panel and check on that. I've never needed to set anything up. When I get some time (probably after Christmas or New Year's at this point) I'll check and see if I can find any settings.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)
Phaelax
DBPro Master
21
Years of Service
User Offline
Joined: 16th Apr 2003
Location: Metropia
Posted: 20th Dec 2016 21:24
If it's a file access issue, what's the permission level of the files? Is it 644? (filezilla will display that info)

"I like offending people, because I think people who get offended should be offended." - Linus Torvalds
GarBenjamin
AGK Developer
7
Years of Service
User Offline
Joined: 30th Nov 2016
Location: USA
Posted: 21st Dec 2016 06:11
@Phaelax thanks for the suggestion. Definitely something I will look into when I get time. Right now I need to focus full steam ahead so with my limited time I can get a game out for Christmas.
TI/994a (BASIC) -> C64 (BASIC/PASCAL/ASM/Others) -> Amiga (AMOS/BLITZ/ASM/C/Gamesmith) -> DOS (C/C++/Allegro) -> Windows (C++/C#/Monkey X/GL Basic/Unity/Others)

Login to post a reply

Server time is: 2024-11-24 15:58:24
Your offset time is: 2024-11-24 15:58:24