The game controller, which includes the telnet server, is designed entirely in the Lua scripting language. The game controller is responsible for proxying the traffic between the telnet client and the Pac-Man game running in the browser. The game controller's source code (Lua script) uses ready to use components such as the high level socket/websocket API.
How the Telnet to Pac-Man Server Works
- A browser navigates to the Pac-Man "game controller" running in the server.
- The browser loads all resources such as the MP3 sound files.
- The game is now ready to accept a telnet connection.
- A telnet client connects to the server.
- The game controller connects the two clients together and initiates the game.
- Keyboard events are sent from the telnet client to the Pac-Man game running in the browser via the game controller proxy.
After starting the Pac-Man game in a browser, use a telnet client and telnet to: 126.96.36.199 port# 2000