Get started with HTML5 target

I write games using haxe nme and use the flash target to create flash games. But i wanted to start use html5 targets (and possibly other targets), but the index.html file that is generated only displays a white screen. So my question, what do i need…

Viewing 1 to 4 (4 Total)
Get started with HTML5 target

ZeroCreativity1

ZeroCreativity1
Total Posts: 22
Joined: December 22, 2011

I write games using haxe nme and use the flash target to create flash games. But i wanted to start use html5 targets (and possibly other targets), but the index.html file that is generated only displays a white screen.

So my question, what do i need to do to convert my code to be html5 compatible? and is there some debugging techniques i could use to see where it blowing (or having the problem). Thanks.

Let me know if you need additional information.

Tags:
Posted on December 22, 2011 at 7:20 PM

ZeroCreativity1

ZeroCreativity1
Total Posts: 22
Joined: December 22, 2011

Re: Get started with HTML5 target

Uploaded the Source:http://code.google.com/p/circle-madness-nme/source/browse/... (if that helps).

Posted on December 24, 2011 at 7:53 PM

grumpytoad

grumpytoad
Total Posts: 63
Joined: November 21, 2011

Re: Get started with HTML5 target

Hey, I went through the code with a debugger, it seems to fail because of the newlines in the texts. I will try to fix this.

However, even when I removed the newlines, though this worked and displayed something, played music and had interaction, there are still lots of parts that would need to be improved.. I couldn't get the flash version working, so I couldn't compare.

Note, with this amount of code, lots of things can go wrong. It's easier to start with something small..

- Niel

Posted on December 25, 2011 at 4:16 PM

ZeroCreativity1

ZeroCreativity1
Total Posts: 22
Joined: December 22, 2011

Re: Get started with HTML5 target

Thank you, it does seem the \n in the Text field caused the program to crash. I also discovered that the trace statements are append the the htmlDoc and can viewed using firebug. That seem help alot. I guessing the jeash project needs a bug report on this issue, i can't believe that a \n should cause the html app to crash.

Another problem seems that some onKeyPressEvents aren't triggering, as well as some onMouseClick don't seem to work. (I was able to get a linux app running with some of the same problems, but its a lot better).

Here is the flash app for comparison:http://zerocreativitygames.dyndns.org/CircleMadness.swf... (not sure why it doesn't compile for you, i use linux, but i won't see why that would matter, maybe a different nme version?).

or for an older version check out here:http://www.kongregate.com/accounts/ZeroCreativity1....

I choose this application to start because it renders most of the game using basic shape from the drawCircle command. It's one of my simplest and smallest games, it only gets more complicated from here.

Thanks again.

Posted on December 29, 2011 at 11:15 PM