May 2, 2014
The goal of this project was to implement a small text based game using a TCP based client-server model to enable multiplayer functionality. I chose early on to focus on developing robust server/client applications rather than fleshing out the game.
- Message passing is used to pass messages and the associated data between clients and the server.
- String manipulation, in particular appending to strings, is used commonly to concatenate parts of text before being displayed on screen.
- The game's internal game state is basically a giant database of what is going on in the game.
- The game state is also a global variable that receives heavy state modification.
- Iteration is used to loop through various items in a list via for-each
- Let is used fairly often to combine larger code into local variables with smaller names
- Racket's TCP Library allowed me to make connections between the server and client(s) possible.
- Racket's Threading Library was very helpful in allowing the server to have multiple connections made to it simultaneously.
For me, this project wasn't really about creating something innovative. It was more about the challenge of working with the TCP library in racket.
Technology Used Block Diagram
I really enjoyed working on this project. Writing scheme/racket code always forces you to look at the problem from a different perspective. Writing a TCP client and server in racket was an even bigger learning experience.