Hello! I have the following task to do in the next following 3 weeks: create a real-time multiplayer strategy game. I have no experiance in making multiplayer games, no experience in phaser io, node js or using web sockets. But I am a fast learner and I already learned a few things about those libralies. I am thinking of using Angular and phaser for the client side. Nodejs and socket io for the server side. The thigs I need to be done:
-multiple game rooms
-states for the game(menu, playing, game)
-interacting on a MySQL table for users (connecting two servers)
-building logic for the game
-real time syncronisation between every player, every unit(when it shoots, move)
Ok so the first 5 issues won't be such a dificulty for me and if it was a single player game I probably wouldnt ask this question. I am really asking for help for building the base thing and some "proof of concept". I need to connect the two players in one room, need to when a single unit is moving and shooting to some building, and the building(tower) shoots back this to be sincronized and to work for lets say a 100 units. Where do I start? What metod do I use?
1. Shoud I have game state on the server and this logic to be in the server so everything is syncronized? So when two player start playing the game, the server also (plays the game) in some kinda loop until the game ends. And sends to the users JSON lets say 30times/second. And the user interact to the game logic with controllers, which sends the info to the server and server updates it's state, mean time the client still gets every second a lot of json objects, and rerenders on every change.
2. Using Observer pattern with syncronizable interface, for keeping track of enemy possitions on your client. The server is only used or transfering data and authorising, nothing else. Have sepparate game states on each client, which you syncronise with other clients?
So which method would you advice me to start with for my prove of concept(I accept other sugsestions)? How should I build my archictecture? The prove of concept is the basic thing that I should start with but is the most hard one. I am way over my head. I would really use some help. Thanks!