User Tools

Site Tools


html5

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
html5 [2017/08/16 11:54]
AnvilHouse [IFrame]
html5 [2017/08/19 05:45] (current)
Lee
Line 1: Line 1:
 ====== HTML5 ====== ====== HTML5 ======
  
-This page is currently under active development.+After **[[game#​build_game|Building a HTML5 game]]**, you'll want to upload it somewhere so that others can play your game directly from their web browser. ​This section will explain the best methods of doing so, whilst also highlighting some of the more common errors/​mistakes people make so you can avoid them.
  
-----+===== Packaging Your Files for Distribution =====
  
-===== 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:
-If you are uploading your HTML5 game to a hosting site, the way you zip your files can change. Each uploading ​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   * **Kongregate** - zip all of your files except the index.html
Line 21: Line 19:
  
 ===== IFrame ===== ===== IFrame =====
-Using an iframe is a very simple embedding method that is supported by all major browsers. 
  
-After uploading your game files into your web page file index, click on the game link to get the proper web address from your browser'​s web address bar.+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.
  
 {{:​screenshot_10.png?​600|}}  ​ {{:​screenshot_10.png?​600|}}  ​
  
-To embed your HTML5 within a page you simply need to add your <​iframe>​ tag and attribute HTML code into your desired segment of the page by using your newly acquired web address.+To embed your HTML5 game within a page you simply need to add your <​iframe>​ tag and attribute HTML code into your desired segment of the page by using your newly acquired web address. ​For example:
  
-**Example.** 
 <​code>​ <iframe src="​your game address">​Your browser does not support Iframes.</​iframe>​ </​code> ​ <​code>​ <iframe src="​your game address">​Your browser does not support Iframes.</​iframe>​ </​code> ​
  
 ---- ----
 +
 =====  Javascript Error Console ​ ===== =====  Javascript Error Console ​ =====
-When using the debugging index.html or testing a web build via the engine, 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 .exe build option.+ 
 +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 comparisonit is the same as errors that overlay your tested game window that is built via the normal ​Windows (.exe) **[[game#​build_game|Build]]** ​option.
  
 {{::​screenshot_11.png?​300|}} {{::​screenshot_11.png?​300|}}
  
-==== Common Errors  ​====+---- 
 + 
 +===== Troubleshooting ===== 
 + 
 +==== Cannot Enlarge Memory Arrays ​====
  
 <​code>​ 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. </​code>​ <​code>​ 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. </​code>​
  
-**How to fix**- The user should change ​the HTML5 Memory ​options in settings to properly allocate the correct memory needed for your project, your desired ​value is denoted by the 1 line in the error.+This error is the result of insufficient pre-allocated memory. You can fix this by increasing ​the HTML5 Memory ​Size value in **[[general#​mobile_web|Game Settings]]**.
  
 {{::​screenshot_12.png?​500|}} {{::​screenshot_12.png?​500|}}
  
 ---- ----
 +
 +==== Run-time Error -3 ====
  
 <​code>​Unhandled run-time error '​-3':​ Resource is too new or corrupt.</​code>​ <​code>​Unhandled run-time error '​-3':​ Resource is too new or corrupt.</​code>​
  
-**How to fix**- Update your engine to the latest build. ​This error means your current build is trying ​to open an asset created with said newer version.+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 ====
  
 <​code>​Handled run-time error '​-1':​ Identifier "​X"​ is not a variable, switch, custom event or internal command.</​code>​ <​code>​Handled run-time error '​-1':​ Identifier "​X"​ is not a variable, switch, custom event or internal command.</​code>​
  
-**How to fix**- ​This could be one of two things. Either you have a script trying to access a switch/​variable/custom event/​etc ​that doesnt ​existor you have a script trying to pull a network ​event name. Editing the offending script with the proper switch/​variable/​custom event/etc will fix this.+This error could be the result ​of one or two things. Either you have a script trying to access a **[[variables|Variable]]**/**[[customevents|Custom Event]]** ​that doesn'​t ​exist or you have a script trying to pull a **[[networkmessages|Network Message]]** ​event name. You can fix this by modifying the affected script.
  
 ---- ----
 +
 =====  FAQs  ===== =====  FAQs  =====
  
-   * **Q** - I exported my game to HTML5 but none of my sounds are playing!+//**I exported my game to HTML5 but none of my sounds are playing!**//
  
-   * **A** - Check to see if your Sound Effect and music files are set to WAV or OGG. Due to licensing conflicts MP3                files are unable to be exported in built HTML5 games.+Check to see if your **[[sounds|Sound Effect and Music]]** ​files are set to WAV or OGG. Due to licensing conflicts MP3 files are unable to be exported in built HTML5 games.
  
-----+//**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?**//
  
-   * **Q**  -  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.
- +
-   * **A**  -  ​As of update ​v1.018.007 the javascript error console ​was removed from exported HTML5 games. +
- +
-----+
  
-   * **Q**  -  ​Can I make a multiplayer game with HTML5?+//**Can I make a multiplayer game with HTML5?**//
  
-   * **A**  -  ​No. HTML5 does not support raw sockets, thus it cannot be used for playing games with network ​                      ​messages.+No. HTML5 does not support raw sockets, thus it cannot be used for playing games with **[[networkmessages|Network Messages]]**.
html5.txt · Last modified: 2017/08/19 05:45 by Lee