networked air hockey video game - columbia university

13
Aimee Sanchez – ams2300 Ankita Nayak – aan2120 Kapil Verma – kv2208 Vinay Sharma – vs2330 Networked Air Hockey Video Game

Upload: others

Post on 12-Feb-2022

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Networked Air Hockey Video Game - Columbia University

Ai m e e S a n c h e z – a m s 2 3 0 0An k i t a N a ya k – a a n 2 1 2 0

K a p i l Ve r m a – k v 2 2 0 8V i n a y S h a r m a – v s 2 3 3 0

Networked Air Hockey Video Game

Page 2: Networked Air Hockey Video Game - Columbia University

OVERVIEW

Game Play Two players Paddle control using mouse First player to 8 points wins!

Players on separate terminals Communication through Ethernet directly connected network

Page 3: Networked Air Hockey Video Game - Columbia University

OBJECTIVES

Build the game from scratch that features:

Fully integrated system (hardware and software)

Clean, intuitive design

Fun game play

Page 4: Networked Air Hockey Video Game - Columbia University

DESIGN ARCHITECTURE

Altera Cyclone II FPGA

NIOS processor CPU SRAM

Peripherals VGA Mouse Ethernet

Page 5: Networked Air Hockey Video Game - Columbia University

BLOCK DIAGRAM

Avalon Bus

NIOS Processor

VGA SRAM Mouse

Page 6: Networked Air Hockey Video Game - Columbia University

VIDEO DISPLAY

Page 7: Networked Air Hockey Video Game - Columbia University

CIRCLE GENERATION ALGO

Drawing circles require computing the square of the x,y coordinates as well as the radius

Multiplication is toxic! It is possible to generate circles using only lookups

and addition: Created array which contains pre-computed squares Lookup into the array to get the square based on the index Use these values as constant for computing the equation of a

square

Page 8: Networked Air Hockey Video Game - Columbia University

NETWORKING!

Point to point ethernet connection established between the players.

Master – Slave configuration. IP packets transmitted. Paddle coordinates from slave to master and vice

versa transmitted over the ethernet. Puck coordinates transmitted only from master to

slave.

Page 9: Networked Air Hockey Video Game - Columbia University

PS2 MOUSE INTERFACE

3 byte serial transmission from the PS2 mouse. Data captured continuously from the data register Used Altera alt_up_ps2_port.c functions to capture the

mouse data Created ps2_mouse.c file from scratch! to handle the

directions and positions of the paddles.

Page 10: Networked Air Hockey Video Game - Columbia University

SCORE KEEPING

Bit maps created for PLAYER: 1 ,2.

Bit maps created for score from 0 -8.

Every time a goal is scored by a player, the appropriate bit map location is chosen based on the new score and displayed on the VGA.

Scores are also transmitted over the ethernet to the other player’s display.

Page 11: Networked Air Hockey Video Game - Columbia University

Physics simulation

Page 12: Networked Air Hockey Video Game - Columbia University

PROJECT EXPERIENCE

Worked in parallel

Lots of collaboration

Learned to work in distracting environment

Page 13: Networked Air Hockey Video Game - Columbia University

SUMMARY

Lessons Learned Important to understand the details of each component Make use each member’s individual strengths Always leave space for adjustments or additions