The Laser-War Game Author: Hongliang Zhang Lambton College 2014.11 JAVA GAME • Consists of two parts, Server and Client • Server jar file: JGameServer.jar • Client files: JGameClient.jar and a folder resources contains pictures and sound files for the game. How To Run The Game • Server java –jar JGameServer.jar Default port: 8998 To set another port, for example, 8000 java –Dport=8000 –jar JGAmeServer.jar How To Run The Game • Client Unzip the file gameClient.zip to get JGameClient.jar and the folder resources java –jar JGameClient.jar Default connection to IDEVUSR011.FRANKENI.COM:8998 An IBM iServer with the server program already running on it How To Run The Game To set another host and port, for example, 122.122.122.122:8000 java –Dhost=122.122.122.122 –Dport=8000 – jar JGameClient.jar Game Introduction • One game played by two players Each player control one spaceship to attack the other. • The Server can supports may games at the same time. • They are based on netty.io Game Introduction • One space ship has 30 energy. If got shot by the other, it would lose one. If reached zero, it would lose the game. • Speed Default speed is 3. Pressing up-key to accelerate. Pressing down-key to slow down. Limit: -9 To +9 keybroad • Up key: Accelerate • Down key: Slow down • Left key: Turn left • Right key: Turn right • Space key: Laser attack A gaming keyboard like Logitech G11 to support 3-key input. Game Start ! • Two players play the same game. The first player create a new game. The second join it. • java –Dhost=xxx.xxx.xxx.xxx –Dport=xxxx – jar JGameClient.jar First Player Screen First Player Screen The First Player Screen • The window title Laser-War Game ID: 1014 • When the second player join the same game, he must choose the game id 1014. • The spaceship could not move until the second player come in. But it could be turned and shooting. The Second Player Screen The Second Player Screen • Select the game id 1014 that was created by the first player. Gaming • Both players are in the game now! The first player can move his spaceship! Sounds Effect! Enjoy It Thanks!
© Copyright 2026 Paperzz