I'd like to give you some feedback about a work I did with C2. It's an online multiplayer bomberman game prototype.
For the time being you can just explore 5 small maps, drop bombs and kill your ennemies.
You can try it here : http://18.104.22.168/ (Server might go down sometimes).
I'll be very glad to receive your feeback on it!
How it works
The app is composed of 2 parts : client and server.
For the client side I used C2 and for the server side I used node js. The communication between the client and the server is made with websockets.
Each time the player wants to perform an action, the client requests the authorization to the server. If the server grants authorization, the action to perform is broadcasted to all connected clients at the same time.
For example, when the player 'foo' presses the left arrow of his keyboard :
1. The client asks the server the authorization to move on the left.
2. If the move is possible, the server send the order to move the player 'foo' on the left. If the move isn't possible, the server doesn't answer and the player doesn't move.
Biggest difficulty I faced
The biggest issue on the client side I had to deal with, was to parse data received from the server and store it on client side.
For example, it needed to store the position of the wall in an array on the client. I succeed to do it with the native Array plugin but It was quite complicated. See below :
You may have faced the same issue? How did you solve it?
If you are interressed in, I'll be glad to share my capx and my code with you. But first I need to clean some parts I'm still not 100% proud of.
Thank you very for reading!