Hello guys!
I will use this like a news thread if you don't mind!
...just to keep you up to date
So, last time, I worked on the transition between "screens" which needed automatic re-authentification.
(new page, new connection, knock knock, who's there?)
yesterday, I worked a little on the game server itself. It's currently able to join games for players but it's just that for now. I fight more and more with technical details in ruby programming, which makes me loose lots of time.
Observations so far:
1. usage of websockets
it is pretty straightforward to set up on client-side and works out of the box on firefox and chrome. The resulting event driven model is very nice and intuitive. I still think it has tremendous advantages over classic http update polling. Not only performance wise but also how the code is structured.
2. plain text messages as protocol
I chose plain text in the very beginning for simplicity reasons. It turns out to be very practical and the right choice:
- it's easier to handle than json data whose content has to be checked anyway
- when dumping incoming and outgoing messages, the logs are very readable
- you cn easely interact with the server using command line only
3. ruby as server side language
I heard many good things about it, the websocket API was simple, so I wanted to give it a shot. I experienced using ruby as extremely inefficient and impractical. Perhaps it is because I'm fairly new to ruby but it takes me loads of time to get things right since ruby is fairly unintuitive in many situations.
- since it's "dynamically typed" you cannot know a method is incorrect before running and testing the server
- debugging is time consuming
- refactoring is problematic
- ...in the end, it's just a pain in the ass.
I think that, because of the stage of the prototype, I will finish it using ruby. However, once its done, I
strongly recommend re-implementing the prototype server in a more structured language like java.
...and if someone wants to assist, you're very welcome!