Velojet can you change the runtime.js a bit for me?
I don't need movements in-game.
I need them to appear both in-game (not like in your demo which player 1 can move from the outside of the game to it insides borders, i need it to show him already in some fixed position which I'd like to define on construct).
I don't need to set nicknames in-game (yet (registered members later).).
All I need is to get both connected and some message appears when player 1 is connected Like > Player 1 Connected.
For Player 2 is connected or awaiting for player 2 to establish connection.
When both are connected is up to me to code and instructions.
Can you aid me in this simple script?
Scripting its not my best, since I'm trying to make a game where registered clients get connected after challenging each other they need to enter inside the "arena" with their own created nicknames.
Its based on a game by turns.
jQuery('#join').click(function () {
if (_this.isConnectedToMaster()) {
_this.createRoom(game.name);
_this.joinRoom(game.name);
// Ensure nick has 3 chars max
//
// C?DIGO PARA QUANDO ACEITA O DESAFIO E ENTRA NA ARENA! (em vez de ser nome ? click tnh de refazer)
// if ((game.myPlayer.nick = jQuery('#nick').val()).length > 3) {
// game.myPlayer.nick = game.myPlayer.nick.substring(0, 3);
// }
}
});
How to change this to not have a click event? How get already joined? When opened the link the first two for example.