During this week I made a few minor changes to the UI in game and began to plan for the networking portion of the project. To the UI I added a slider which allows users to adjust the speed of their train, a text box to show the current speed, and a quit button. Most of the week was developing a plan for the client server multiplayer portion of the game. At this time I will be pursuing a simple model where the server does not have to run the game but only has to keep tabs on the pertinent data which the clients use to simulate the game. This means that the server will store data like the number of trains on track the colors of those trains, the addresses of clients, the orientation of each turnout, the speed of trains, ect. When one of the clients attempts to change any important data they will notify the server and if the change does not conflict with the current state of the track according to the server then the change is allowed and the server adjusts its data and broadcasts the change. This model will be using UDP sockets which are fast but do not guarantee successful data transmission. This means I will need to write the code in such a way that we can tolerate data loss. Over next week, Spring break, I hope to set up a socket and communicate basic messages between the client and server.
Blog Week 7
by
Tags:
Leave a Reply