rzymek / obsolete-web-boards-gwt

Moved to & reimplemented at https://github.com/rzymek/web-boards. Game engine for playing online adaptations of board wargames. Is inspired by VASSAL, but allows play diractly via browser (on desktop or smartphone).
https://github.com/rzymek/web-boards
Other
2 stars 1 forks source link

WebBoards

Work in progress...

WebBoards is a game engine for playing online adaptations of board wargames.
Is inspired by VASSAL, but allows play diractly via browser.

Goals:

Implementation is based on SVG, GWT and runs on Google App Engine

The first game being implemented is MMP's Bastogne: Screaming Eagles under Siege.

Contributing

  1. Fork this repo
  2. Push changes to your fork.
  3. Create a pull request

To push changes to your fork basicly do:

git add .               #Mark all local changes for commit
git commit -m "...."    #Commit to local repository
git push                #Push the changes (commits) to the repo at github

Remember to keep your fork in sync.

Setting up the development environment

You need maven3 to build webboards.

  1. Clone your fork
    git clone https://github.com/$USER/webboards.git
  2. Start the devserver
    mvn install appengine:devserver or ./dev.sh
  3. Go to http://localhost:8888

To generate Eclipse project files call mvn eclipse:eclipse. Then in the IDE select File > Import > Existing projects into workspace...

Applying changes

To apply client side changes call mvn gwt:compile and refresh the page.
To apply changes to resources (jsp, html, etc) call mvn war:exploded and refresh the page.
To apply server side changes restart the mvn appengine:devserver command.

To speed up gwt compilation, only one browser type is supported during developement. The default is webkit-based (chrome, safari). You can select another use passing -Dbrowser=... to the mvn command. The possible values are: safari(for chrome as well), opera, gecko1_8, ie9, ie8, ie6. Up to date values can be found in UserAgent module

Debugging

To debug server side code setup remote debugging to connect to localhost:8000.
In Eclipse select Run > Debug configurations... > Remote Java Application: Remote debugging in Eclipse

To debug client and server code run in GWT DevMode using
mvn gwt:debug
(Remember to first stop mvn appengine:devserver as it runs on the same ports).
Then use remote debugging to connect to localhost:8000 (as above).
When running in GWT DevMode you need to append '&gwt.codesvr=127.0.0.1:9997' to the URL.
You can create a bookmarklet that appends it to the current URL using this:
javascript:window.location=window.location+'&gwt.codesvr=127.0.0.1:9997'
The disadvantage of GWT DevMode is that opening webboards page takes a lot longer then using AppEngine DevServer.

Deploy to App Engine

To deploy to Google App Engine call:
mvn clean appengine:update -Pprod -Dappid=$appid -Dver=$ver
where $appId is your application id from http://appspot.com and $ver is version. The ver parameter is optional.