1 / 9

Project 2 Mobile Game: Hexagon

Project 2 Mobile Game: Hexagon. Zhong Zou, Joseph Ferrara EE194 WIR. Hexagon. Hexagon is a popular animated strategy board game. Rules for Hexagon: Two types of moves: a jump or double jump, indicated when player’s piece is selected.

mandyc
Download Presentation

Project 2 Mobile Game: Hexagon

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Project 2Mobile Game: Hexagon Zhong Zou, Joseph Ferrara EE194 WIR

  2. Hexagon Hexagon is a popular animated strategy board game. Rules for Hexagon: • Two types of moves: a jump or double jump, indicated when player’s piece is selected. • Entering into a hexagon occupied by an opponent’s piece will transform them into yours. • To take over the world, the player who occupied more cells wins.

  3. Communication Scheme • Two games talk to each other over the TCP sockets. • At start up, the game will act as a client and search for a server to connect to. • After 2 Seconds, if no server is found, client connection times out. The game switches to server mode and waits for an incoming connection. • After the connection is established, the server will have the option to pick a color to play, the client will play the opposite color.

  4. Three Types of Commands After the server picks a color to play, it will send a command with the message, “PLAYER color”, so client can be setup to play opposite color. • During game playing, when a player presses a key, it will send out a command with message “KEYCODE num”, where num represented integer value of key pressed. • After two players finish a round, any player can press restart command, it sends out “RESTART” message to reset game board to initial state for both players.

  5. Other Features: • At the bottom of the screen, game displayed how many cells are occupied by each player and whose turn is it now. • After the game board is all filled up, the player with more cells will win. • The game also gives the player an option to play music during game playing. • After one player exits the application, other player switches back to client mode to search for connection.

  6. Project 3Sensor Network Zhong Zou, Joseph Ferrara EE194 WIR

  7. BLOCK DIAGRAM For Sensor Mote Antenna Radio Input/Output LED Main Controller Buzzer Temperature Sensor Network Setup Two types of motes: • Base Mote: Connect to PC directly, acts as gateway between PC and sensor network. • Sensor Mote: Motes equipped with sensor board, connect to each other and base mote via Radio Frequency.

  8. Routing Scheme • The base mote initiates the route discovery algorithm by broadcasting out “Route Setup” message. • A sensor mote after receiving first “Route Setup” message, it sets the sender of that message as its parent, and broadcasts out “Route Setup”. • After “Route Setup” message flooded through the network, each sensor mote can be able to send its measured value to the base mote by first transmitting it to its parent. Its parent in turn will forward data to parent of its own and data will eventually reach the base mote and be displayed on PC.

  9. Sensor Motes • Each sensor mote will sample current temperature of its surrounding environment every second. • If the temperature is below 35°C, sensor mote will blink its green led once every 2 seconds. • If the temperature is above 35 but below 40°C, sensor mote will blink its yellow led once every second, and sends out a warning message to base mote. • If the temperature is above 40°C, sensor mote will blink its red led once every half second and turn on its buzzer. It also broadcasts out a critical warning message to all of its neighbor sensor motes, so all of them will turn on their buzzers.

More Related