im starting a project where the main point of the website would be to play a simple node js canvas game. I want it to have functionality such as hosting games, joining someone thats hosting, spectating games, tournaments etc.
So when the user is on the homepage i want them to see a list of all the current hosts which updates in real time and then when they click on them, it will give the host the option to accept them and if they do, send them both to a different page to play the game.
So i was first thing of making it in php so i could run some sort of ajax timer to update a html table dynamicly and in real time. Someone suggested i could do this just using html and js but im not sure which is better. I know i could just use a node js canvas to list all games and that would be really easy but having a canvas display a table doesnt seem reasonable at all.
Anothers thing is when 2 people go to play a game, should i take them both to another page and then connect them both to the node js server again and pass in their user id or so? Someone said i could make a single page application with different urls which sounds good but im not sure which is better. I would like a url such as /game/12341 or something so anyone with that link can go and spectate that game
Any advice at all on which methods are best for this sort of site would be very much appriciated
via Rachel Dockter
No comments:
Post a Comment