Top Banner
The Laser-War Game Author: Hongliang Zhang Lambton College 2014.11
17

The Laser-War Game Author: Hongliang Zhang Lambton College 2014.11.

Dec 18, 2015

Download

Documents

Theresa Hopkins
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: The Laser-War Game Author: Hongliang Zhang Lambton College 2014.11.

The Laser-War Game

Author: Hongliang ZhangLambton College

2014.11

Page 2: 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.

Page 3: The Laser-War Game Author: Hongliang Zhang Lambton College 2014.11.

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

Page 4: The Laser-War Game Author: Hongliang Zhang Lambton College 2014.11.

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

Page 5: The Laser-War Game Author: Hongliang Zhang Lambton College 2014.11.

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

Page 6: The Laser-War Game Author: Hongliang Zhang Lambton College 2014.11.

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

Page 7: The Laser-War Game Author: Hongliang Zhang Lambton College 2014.11.

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

Page 8: The Laser-War Game Author: Hongliang Zhang Lambton College 2014.11.

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.

Page 9: The Laser-War Game Author: Hongliang Zhang Lambton College 2014.11.

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

Page 10: The Laser-War Game Author: Hongliang Zhang Lambton College 2014.11.

First Player Screen

Page 11: The Laser-War Game Author: Hongliang Zhang Lambton College 2014.11.

First Player Screen

Page 12: The Laser-War Game Author: Hongliang Zhang Lambton College 2014.11.

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.

Page 13: The Laser-War Game Author: Hongliang Zhang Lambton College 2014.11.

The Second Player Screen

Page 14: The Laser-War Game Author: Hongliang Zhang Lambton College 2014.11.

The Second Player Screen

• Select the game id 1014 that was created by the first player.

Page 15: The Laser-War Game Author: Hongliang Zhang Lambton College 2014.11.

Gaming

• Both players are in the game now! The first player can move his spaceship! Sounds Effect!

Page 16: The Laser-War Game Author: Hongliang Zhang Lambton College 2014.11.

Enjoy It

Page 17: The Laser-War Game Author: Hongliang Zhang Lambton College 2014.11.

Thanks!