Yes, I am breaking the code some. I’m trying to make it workable across the board. For some reason Azure is giving me problems and I am trying to fix it now. I can see it working on your site so it most likely it is Azure specific. I have the sample chat from Socket.IO working locally but it won’t work on Azure. Here’s the code:
It’s now deployed on Azure and supports multiple players. It doesn’t matter the order when players join, they all will be visible in the scene. The game can be accessed from here: http://xnaspacerace.azurewebsites.net/
Network movement is choppy and laggy at the moment. I’ve taken a first round stab at it but it needs more work.
Please fork the game and make whatever changes you wish. I just added missiles, and blasters (other projectiles fired from the ship) to the latest codebase. The transformations work for the first ship. Tomorrow I’ll adjust it for the second ship, and add keyboard support to fire the missiles. I think SPACE BAR and ENTER does it now.
The online demo now demonstrates the particle engine for the ships, and missiles, plus a little more life-like feel of the ship (but does need tuning). Additionally, the newest feature are the explosions, and improvement of network players (something else that needs work). You can view the demo here: http://xnaspacerace.rvbgames.com/
Thank you Detzt for both the compliments and keyboard handling suggestions. I’ll give it a try.
I have a similar question posted in Answers that seems to take a different approach:
Ideally I’d like the application to have keyboard focus, not too mention the correct gamepad state, when it starts. At the same time I’d like to try and maintain normal behavior within the browser unless it impairs the games functionality in some manner. Does the use of preventDefault() have unexpected consequences?
It appears to me that every key-down event is being discarded if the application doesn’t handle it. Is that correct?