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

letmethink

  • *
  • Posts: 2545
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: 2181
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
Peace

letmethink

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

Donni11

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

rob1221

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

Justin

  • *
  • Posts: 4716
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 server and ping me @justin.
I'm most often available between 10am and 10pm Japan time. (GMT+9)

Donni11

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

rob1221

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

letmethink

  • *
  • Posts: 2545
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: 2545
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: 1632
Brilliant Work ! It works perfectly on my chrome :)

letmethink

  • *
  • Posts: 2545
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: 242
I thought Stencyl already update Lime to the latest 2.6 ? (from the changelog)

Works fine on Opera browser.

letmethink

  • *
  • Posts: 2545
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.