building html5 games,HTML5

After

Packaging Your Files for Distribution

If you are uploading your HTML5 game to a hosting site, the way you ZIP up your files can change. Each web site should have their desired configuration outlined within their uploading forms. Below are a few examples of configurations used by some of the more popular hosting sites:

Kongregate – zip all of your files except the index.html

Game Jolt – zip all of your files except the index.html

ec14d35372f61e626fe4951ba83a9831.png

Itch.io – zip all files, including your index.html

b77e69ac03f212fea478e178e7b0df2a.png

IFrame

Using an IFrame is a very simple embedding method that is supported by all major web browsers. After uploading your game files to your web page file index, click on the game link to get the proper web address from your browser’s web address bar.

ecb235711dabeed5260ef59f36ba7a9d.png

To embed your HTML5 game within a page you simply need to add your tag and attribute HTML code into your desired segment of the page by using your newly acquired web address. For example:

Your browser does not support Iframes.

Javascript Error Console

When using the debugging index.html or testing a web build through 001 Game Creator, a large log text box is displayed under your game window. This is used to display any errors currently happening in your game. In comparison, it is the same as errors that overlay your tested game window that is built via the normal Windows (.exe)

974dd8dec3b0714d6f2b145ca23cbb85.png

Troubleshooting

Cannot Enlarge Memory Arrays

Cannot enlarge memory arrays. Either (1) compile with -s TOTAL_MEMORY=X with X higher than the current value X, (2) compile with ALLOW_MEMORY_GROWTH which adjusts the size at runtime but prevents some optimizations, or (3) set Module.TOTAL_MEMORY before the program runs.

This error is the result of insufficient pre-allocated memory. You can fix this by increasing the HTML5 Memory Size value in

179d035f9334dacb2c916c1a00d34156.png

Run-time Error -3

Unhandled run-time error '-3': Resource is too new or corrupt.

This error is the result of 001 Game Creator being out of date. Please ensure you’ve downloaded and installed the latest version to resolve this issue.

Run-time Error -1

Handled run-time error '-1': Identifier "X" is not a variable, switch, custom event or internal command.

This error could be the result of one or two things. Either you have a script trying to access a

FAQs

I exported my game to HTML5 but none of my sounds are playing!

Check to see if your

When I place the exported HTML5 in a hosting site, or embedded in a page, it shows a large log text box down at the bottom. What should I do?

As of v1.018.007 the javascript error console has been removed from exported HTML5 games. Please ensure you’ve downloaded and installed the latest version to resolve this issue.

Can I make a multiplayer game with HTML5?

No. HTML5 does not support raw sockets, thus it cannot be used for playing games with

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值