thomasahle / TrinityProject

A mindblowing trainbased game for entire family
http://thomasahle.github.com/TrinityProject/
GNU General Public License v3.0
8 stars 3 forks source link

Building for GWT/HTML5 #24

Closed EdShaw closed 12 years ago

EdShaw commented 12 years ago

I got this working on an older branch, but I'm about to do the same work on the current head.

I'll try and keep on top of the GWT module files having all the imports, but one thing that would be nice is if we could keep the projects use of Java libraries to https://developers.google.com/web-toolkit/doc/latest/RefJreEmulation#Package_java_util

deque for instance won't compile on GWT because it isn't emulated. I'm about to fix that particular case though.

thomasahle commented 12 years ago

Ok, we can always use LinkedList instead of ArrayDeque. Weird they didn't emulate it though. Its great ;)

thomasahle commented 12 years ago

I still can't run the html version. Had hoped you would come and showcast it today.

EdShaw commented 12 years ago

Not finished pushing all the needed changes yet. Give me a second.

EdShaw commented 12 years ago

I reimplemented ComponentFactory without reflection. I t's hideous, but it works as far as I can tell, and most importantly, it works with GWT. Please don't judge.

thomasahle commented 12 years ago

Works great Ed! Please put it on our website ;)

EdShaw commented 12 years ago

I was going to see if I could fix a few remaining issues first, but ok.

How is everything working for you? I have an issue with the buttons on the menu overlapping, and the play button is missing. Not sure if this is a browser issue or a PlayN/project issue though.

thomasahle commented 12 years ago

The overlap disappeared after reloading. I assume Lena is using the width of the images to position them. In our final version we need to have a loading screen, so we avoid such problems.

The play button appeared when I (using chrome's inspect element) changed the canvas size to 2000x1000. When we redo LevelScene to layout things properly (as a part of implementing your palette component perhaps) this should be fixed.

EdShaw commented 12 years ago

I'll add some AssetWatchers to fix this.

thomasahle commented 12 years ago

Try it out. I'm however shaking a bit at the though of having to insert anonymous classes and asset listeners all over the ui code. If it gets messy, I think it is better to just do a loading scene and wait for everything to finish before we go.

EdShaw commented 12 years ago

http://thomasahle.github.com/TrinityProject/game/TrainBox.html

thomasahle commented 12 years ago

Super. I've updated the website with a link.