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.

AppGameKit Classic Chat / WadPacker issue with HTML5 game.

Author
Message
Zaxxan
Developer
4
Years of Service
User Offline
Joined: 17th Nov 2020
Location: England
Posted: 14th Nov 2021 23:25 Edited at: 15th Nov 2021 07:36
I have finally tried WadPacker on one of my games and I have successfully added all of the assets to a Wad file. I have modified my code to use the WadPacker file and the game runs as a Windows executable and as a APK file on Android. When I output as HTML5 and upload to itch.io I just get a black screen. Has anyone successfully used WadPacker on a HTML5 game? If so any suggestions on what I may be doing wrong?
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 15th Nov 2021 00:10 Edited at: 15th Nov 2021 00:14
Do you need asset protection for HTML5, I thought the server blocked access to the files?

also, do memblocks work on the web,

maybe chuck in a check for the file to see if its being found


and then add more messages along the way to see where its failing, like a breadcrumb trail

Edit: also, did you export with dynamic memory selected?
Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
Zaxxan
Developer
4
Years of Service
User Offline
Joined: 17th Nov 2020
Location: England
Posted: 15th Nov 2021 00:25 Edited at: 15th Nov 2021 07:37
I'm not sure if protection is needed for HTML5 myself but now I have changed my code to work with WadPacker any HTML5 output will have the WadPacker changes in it. I did have dynamic memory selected when I output the HTML5 program. I have also tried Vishnu Studios and have packaged one of my games and uploaded it to itch.io so that it can be downloaded. I assume by doing this that the assets are now protected? After downloading my game from itch.io Windows warns against running it so I assume that this is because the file isn't signed. Encryption/packing is all new to me so I just want to make sure that my assets are secure.
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 15th Nov 2021 00:49 Edited at: 15th Nov 2021 00:55
Quote: "but now I have changed my code to work with WadPacker"


OK, heres the thing, although multiplatform code bases will run on all platforms there are edge cases where you need to be platform specific, use GetDeviceType() (I think) and check what platform the game is running on ... this is the nature of multiplatform coding I'm afraid it cant be avoided

When planning to target multiple platforms from a single code base you need to plan ahead and/or edit the project to keep all platforms happy, my guess is html is not liking the memblock commands in wadpacker, I could be wrong though so don't take that as gospel, look the functions up the help file tells you what works on what platform.

as for the signing, I thought TGC signed the exe?


Edit: The code once, publish everywhere mantra is a fallacy!
Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
Zaxxan
Developer
4
Years of Service
User Offline
Joined: 17th Nov 2020
Location: England
Posted: 15th Nov 2021 01:14 Edited at: 15th Nov 2021 01:51
I don't think it will take too much work to get it working again on html5. I already use getdevicebasename for specific platforms. I think Vishnu Studio changes the exe file and it doesn't appear to be signed.

Update: now working on html5 again
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 15th Nov 2021 02:16
Cool, glad you got it sorted, also something to bear in mind for your next projects.
Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
Virtual Nomad
Moderator
18
Years of Service
User Offline
Joined: 14th Dec 2005
Location: SF Bay Area, USA
Posted: 15th Nov 2021 03:15 Edited at: 15th Nov 2021 22:46
anything that we should watch for when using this for html or otherwise?

i tested the vishnu packer today for the first time. the interface is a little clunky but i had a windows project packed on first try and in under 5 mins from launch.
PartTimeCoder
AGK Tool Maker
9
Years of Service
User Offline
Joined: 9th Mar 2015
Location: London UK
Posted: 15th Nov 2021 03:37 Edited at: 15th Nov 2021 03:38
Well I cant find anything in the help about memblocks not working in HTML5 so maybe its a path issue, html wants lower case path names, right? (or is that the droid?)

read/write path issue maybe?

Dont know, but it has been seen where one single upper case letter in a file path can break an entire project.
Open Source plugins
Cl - DnD Plugin
Buy Me A Coffee
Zaxxan
Developer
4
Years of Service
User Offline
Joined: 17th Nov 2020
Location: England
Posted: 15th Nov 2021 07:24 Edited at: 15th Nov 2021 07:30
Android definitely needs lowercase as I ran into that issue on my first project. The only thing I found with WadPacker was that on every image I had to assign an index of 0 to all images, sounds etc as anything above this resulted in an array out of bounds.

Login to post a reply

Server time is: 2024-11-21 13:16:56
Your offset time is: 2024-11-21 13:16:56