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

letmethink

  • *
  • Posts: 2511
I got bored today so began to modify the engine to get something to export to html5. I think haven't got gravity working yet although it may be an overly large collision - debug draw needs modifying.

Click here for some basic rendering and left and right controls:

http://www.newgrounds.com/projects/games/896135/preview

I will probably have more fun later and fix more stuff.
~Letmethink

Donni11

  • *
  • Posts: 2079
Thats great :)!  Here are some haxe files I found that lets you turn haxe files  into html5.
https://github.com/vpmedia/AS3toHX
https://github.com/HaxeFoundation/as3hx

letmethink

  • *
  • Posts: 2511
That's not what those do Donni
~Letmethink

Donni11

  • *
  • Posts: 2079
Oh , yea they turn flash into html5 butit helps with exporting.

rob1221

  • *
  • Posts: 8820
That's not what those do Donni

Justin

  • *
  • Posts: 3576
Feel free to make a pull request for the engine when you're done (or as done as you plan to be, anyway, doesn't need to be perfect).

https://github.com/Stencyl/stencyl-engine

For Live Support: Join our discord channel and ping me @justin.

Donni11

  • *
  • Posts: 2079
@rob1221, so it turns the flash files to haxe right ?

rob1221

  • *
  • Posts: 8820
Yes, which is useless because we're already using Haxe.

letmethink

  • *
  • Posts: 2511
Awesome, I managed to fix a bug relating to tiles and began to make collisions work. I did come across an annoying bug on openfl's end I believe (I need to isolate it), so for now the demos I post will work on chrome but not firefox (I haven't tested any other browsers.)

Currently using the arrow keys scroll the page, but I think I know a way around that.

It is here again:  http://www.newgrounds.com/projects/games/896135/preview

-------------------------------------------------------------
EDIT: Fixed the scrolling but I had to do it manually, now to find a way to do it through haxe.

 EDIT2: Found a way, but requires editing lime I believe (haven't actually tested this yet) - http://community.openfl.org/t/stop-browser-moving-on-playing/1439/5
-------------------------------------------------------------

Currently I think that the collision boxes are offset by 1 pixel (rather than being 1 pixel too tall), so I presume js uses an index starting at 0 rather than 1 (or something similar). I'll look into it.

I also need to fix all graphical events (which should be interesting). Fonts could be easy or difficult. I doubt I'll get onto tinting for a while.

I will then move onto shaking the screen.

Also I need to fix lots of other things...

« Last Edit: August 26, 2015, 07:48:52 am by letmethink »
~Letmethink

letmethink

  • *
  • Posts: 2511
With what I had done so far, I ported my LD33 game to html5. It only works in chrome so far:

http://www.newgrounds.com/projects/games/896330/preview

It seems to work perfectly. Yay!

« Last Edit: August 26, 2015, 08:05:42 am by letmethink »
~Letmethink

yoplalala

  • *
  • Posts: 1333
Brilliant Work ! It works perfectly on my chrome :)

letmethink

  • *
  • Posts: 2511
I think for the error to go away on ff I need to update lime so I may wait on Stencyl updating that as it will probably break lots of other things.

EDIT: I attempted updating manually and got 158 errors. Fun...

« Last Edit: August 26, 2015, 09:58:12 am by letmethink »
~Letmethink

rrzl

  • Posts: 243
I thought Stencyl already update Lime to the latest 2.6 ? (from the changelog)

Works fine on Opera browser.

letmethink

  • *
  • Posts: 2511
Seems it is time to upgrade from build 8529 then. Just my luck to choose the build before the update to build this on.
~Letmethink

DTH

  • *
  • Posts: 148
Now this is a very exciting thread indeed, I do hope that update helps with the firefox issue and I wish you the best of programming Karma for this, I thought HTML5 in Stencyl was way off, so nice to see its being worked on.