Having fun modifying the engine to get the html5 export to work.


1MrPaul1

  • *
  • Posts: 1268
now flash games starts only after clicking play.
But I want to make game banner and want to start it automatically without pressing of any buttons.
So will html 5 exported game starts automatically or also we will need to press play button to start game?

1MrPaul1

  • *
  • Posts: 1268
How to export ready game?
Now, after export we re getting one zip file with resource folder without js and html and image files

letmethink

  • *
  • Posts: 2547
Just create a zip of the games folder in "games-generated/gamename/export/html5"
~Letmethink

1MrPaul1

  • *
  • Posts: 1268
I did this but when I uploaded this zip on NG the game not started stops on preloader with 100% progress bar while test html 5 from stencyl works perfect

nickquest

  • Posts: 60
I'm sure glad this is being developed again. I haven't been able to test or publish successfully yet. Won't get past the loading screen, but I'm excited to see the feature available.

letmethink

  • *
  • Posts: 2547
What do you see in the browser console? Anything. Until Stencyl updates openfl, test on chrome. When they do, all browsers will work.

If you need to publish in the intermediate period, I think I post the workaround on page 3 to get it working on all browsers.
~Letmethink

nickquest

  • Posts: 60
What do you see in the browser console? Anything. Until Stencyl updates openfl, test on chrome. When they do, all browsers will work.

If you need to publish in the intermediate period, I think I post the workaround on page 3 to get it working on all browsers.

I get these errors in the chrome console. The loading bar proceeds almost to the end and gets stuck. Seems to have the same problem no matter what I try to publish.

Uncaught TypeError: Cannot read property 'charCodeAt' of null
Uncaught TypeError: Cannot read property '_h' of undefined

« Last Edit: October 01, 2015, 07:34:28 pm by nickquest »

letmethink

  • *
  • Posts: 2547
I will probably be able to look at this tomorrow. It looks like something I could fix. Just checking, do you have any extensions enabled for your game?

Also, do you mind attaching the zip of your html5 game being built here. I think that would help as I could reference the line of the error that is produced.
~Letmethink

nickquest

  • Posts: 60
It won't let me publish, only test. When I try to publish I get this error. No I am not using any extensions.

Level:     ERROR
When:      2015-10-02 13:21:07:157
From:      root

Unexpected problem on thread pool-2-thread-2: null

Throwable: java.lang.NullPointerException
   at stencyl.sw.editors.snippet.designer.Definitions.createGetVariableBlock(Definitions.java:860)
   at stencyl.sw.editors.snippet.designer.SnippetDesigner.createVarGetter(SnippetDesigner.java:781)
   at stencyl.sw.editors.snippet.designer.codebuilder.CodeBuilder.loadDefinitions(CodeBuilder.java:254)
   at stencyl.sw.editors.snippet.designer.codebuilder.CodeBuilder.writeToString(CodeBuilder.java:277)
   at stencyl.sw.io.write.resource.SnippetsWriter.convert(SnippetsWriter.java:570)
   at stencyl.sw.io.write.resource.SnippetsWriter$1.run(SnippetsWriter.java:505)
   at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
   at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
   at java.lang.Thread.run(Thread.java:745)

letmethink

  • *
  • Posts: 2547
You can do the equivalent of publishing by zipping the games generated folder under the html5 export after testing
~Letmethink

nickquest

  • Posts: 60

yoplalala

  • Posts: 1502
Since stencyl 3.4 there are problems with gradient variants

C:/Program Files (x86)/Stencyl/plaf/haxe/lib/stencyl/1,00/com/stencyl/models/background/GradientBackground.hx:35: characters 51-57 : Array<Int> should be Array<Float>
GradientBackground.hx:35: characters 51-57 : Type parameters are invariant
GradientBackground.hx:35: characters 51-57 : Int should be Float
/background/GradientBackground.hx:35: characters 51-57 : For function argument 'alphas'


so I corrected it by replacing  var alphas = [100, 100]; by
Code: [Select]
#if js
var alphas:Array<Float> = [100, 100];
#else
var alphas = [100, 100];
#end

« Last Edit: October 13, 2015, 11:06:23 am by yoplalala »

letmethink

  • *
  • Posts: 2547
I made then [100.0,100.0] locally when testing, but haven't committed anything yet.
~Letmethink

yoplalala

  • Posts: 1502
In any case HTML5 seems to work perfectly for me now. Thanks Letmethink !