Skip to content
This repository was archived by the owner on Oct 4, 2023. It is now read-only.

Implement multiple players #5

Open
IchordeDionysos opened this issue Dec 11, 2015 · 1 comment
Open

Implement multiple players #5

IchordeDionysos opened this issue Dec 11, 2015 · 1 comment

Comments

@IchordeDionysos
Copy link
Contributor

I want to implement a support for multiple players:

In firebase I want to have multiple games located in the root of the firebase database, and every game has several properties, for example maxPlayers, the gameId and the map as a String which allows all users to generate the same map. Furthermore each game should contain an players array, which container a player object with some properties like top, left, rotation, which all specify the tanks transformation.
The structure should look something like this:

{
    --firebaseKeyGame1: {
        maxPlayers: 6,
        gameId: "Ghe7de",
        map: "[[[140,true,false,false,true], ...",
        players: {
            0: {
                top: 20,
                left: 180,
                rotation: 45
            },
            1: { ... },
            ...
        },
       --firebaseKeyGame2: { ... },
       ...
}

and you should be able to select a game from tmp-game and push it down to tmp-map, in tmp-map you should loop over all players to get all players displayed on the map

NOTE: already started this issue on multiple-players and multiple-players2

@IchordeDionysos
Copy link
Contributor Author

The only thing which isn't working in multiple-players branch, is that it isn't firing the gameChanged observer and so it isn't pushing to firebase ...
No idea why ...

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant