- Using Netbeans 6.0, Create a Rails application WITHOUT support for WAR deployment.
- Glassfish will use the "production" part of database.yml, so make sure you have a valid configuration there.
- Install the goldspike plugin (script/plugin install http://jruby-extras.rubyforge.org/svn/trunk/rails-integration/plugins/goldspike)
- In Netbeans, refresh the rake tasks.
- Add your dependent gems in the war.rb file located in config folder (see http://wiki.jruby.org/wiki/Goldspike for more instructions on how to do that). Basically is something like:
add_gem 'activerecord-jdbcpostgresql-adapter' add_gem 'fastercsv'
- run rake->war->standalone->create from the menu.
- copy and paste the generated war file (should be in the app's root folder) into the autodeploy folder of you glassfish domain's (domains/yourdomain) folder.
- start your glassfish server.
- Navigate to your application, e.g.: http://localhost:8080/finances/categories/list.
Construct2 can use websockets to send and receive messages between games. By using socket-io , we can use a Node.js script as the server and my modification to the socket-io plugin for Construct2 to allow the games to synchronize data between them in real-time. There are two parts to this design: the Node.js server and the Construct2 clients (the games playing). The main part of building an online multiplayer HTML5 game is to plan: how the clients will communicate how often and what to communicate how much of the logic will go into the server and how much to the client. In my sample game, I chose to have each client own a player and have the server just relay messages: Use string messages in the form TypeOfMessage, Parameter1, Paremeter2, Parater3, etc to communicate. Have the clients send their player position about 16 times a second. Whenever their player shoots, the client needs to send a message immediately. Almost all of the game logic will...
Comments