No Snakes! - a multiplayer game over serial port
Last updated on December 20, 2016, 1:17 by Sebastian Mihai
I wrote No Snakes! as a proof of concept, to take advantage of Snowdrop OS's new set of serial port system calls. Much like Snowdrop OS, I wrote No Snakes! exclusively in x86 assembly language.
No Snakes! is my first attempt at a networked game. It is limited to two human players, and uses a client-server communications model. It uses the arrow keys to direct the snake. Local player's snake is always displayed in green, whereas the enemy player's snake is displayed in red.
When running in server mode
, the game is in charge of accepting input, managing the state of the game (pre-start, in-progress, game over), updating snake positions, and communicating snake and victory state to the client.
When running in client mode
, the game is much dumber. All it does is transmit player input to the server, and receive snake positions and the winner, in the event of game over.
No Snakes! is not distributed stand-alone. Instead, you can find its source code among the other apps included with my homebrew operating system, Snowdrop OS, here
If you use the materials on this page, or any other page on this web site, you do so at your own risk. They are provided "as is". No warranty is provided or implied. I neither guarantee that the materials will work, nor that they will not be harmful in any way.