DOC PREVIEW
MIT 6 111 - Three-Dimensional Ray-Cast

This preview shows page 1-2-3 out of 8 pages.

Save
View full document
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
View full document
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience
Premium Document
Do you want full access? Go Premium and unlock all 8 pages.
Access to all documents
Download any document
Ad free experience

Unformatted text preview:

1Three-Dimensional Ray-Cast PongRichard HughesElizabeth Power!Overview• What is Pong?– Traditional Pong is a two-dimensional game that “simulates” table tennis. The player controls a paddle by moving it vertically on the left side of the screen to block the ball.– The goal is for the player to keep the ball from hitting the left side of the screen.• Common variations…– 2 Player• Compete against a computer controlled opponent or another player which controls a second paddle on the right side of the screen– Multiple Balls• Added complexity of having to keep track of 2 to 5 balls– Pong Doubles and Elimination (aka Quadrapong)• Version for up to 4 Players• Each player starts with 4 points and looses one each time they miss the ball– Doctor Pong (aka Puppy Pong)• An adoption for use in a non-coin-operated environment• Specifically used to occupy kids in doctors’ waiting rooms.– Breakout• Pong with bricks• A layer of bricks lines the top third of the screen and when the ball hits a brick, the ball bounces away and the brick is destroyed.2What Makes Our Pong Special?• 3-Dimensional– Functionally• Puck moves in x, y, and z directions• Paddle moves in x and y directions– Graphically • Walls are shaped and shaded to look more realistic• Puck is shaded to look like a sphere• Paddle shaded to have a elliptical surface (if time permits)• Increasing complexity– Each time you catch the ball its speed increases– The reflection angle changes based on where on the paddle you catch the ball– Multiple balls (if time permits)• Keeps score– Reach 63 to winDivision of LaborPhysicsPaddle ControlsMonitorShared DataThe GameGraphicsPicturesPlay Watch Elizabeth Power Richard Hughes3PhysicsThe physical implementation of our game.Purpose:– Manage interactions between Puck and Paddle– Monitoring the score & status of the game instance– Create a “Ready” signal for synchronization with Graphics DivisionPhysics: Ready Physics: ScoreIn order to reduce synchronization issues between the Physics & Graphic Divisions, the Physics Division will create a “Ready”signal for the Graphics to use. • In– Catch– Miss– Clock– Reset• Out– Score [7:0]– Win– LoseThe Score Module keeps track of the status of the game. • It counts how many times the paddle “catches” the puck and outputs that as the score.• It also decides and tells you when you win or lose.4Physics: Paddle• In– Clock– Reset– Up– Down– Left– Right– Puckx[11:0] – Pucky[11:0] – Puckz[11:0]• Out– Miss– Catch – Vx[3:0]– Vy[3:0]– Vz[3:0]– Paddlex[11:0] – Paddley[11:0]The Paddle Module does all of the hard work.• The Paddle Module take all of the game control inputs (Up, Down, Left, Right)and moves the Paddle accordingly.• If the Paddle catches the Puck, the module will pulse “Catch.” It will also increase the z velocity and change the x & y velocities based on where on the Paddle the Puck hits.• If the Paddle misses the Puck, the module will enable “Miss” and the x, y, & z velocities will become 0 until Reset is enabled.Physics: Puck• In– Clock– Reset– Vx[3:0]– Vy[3:0]– Vz[3:0]• Out– Puckx[11:0] – Pucky[11:0] – Puckz[11:0]The only duty of the Puck Module is to go and, eventually, stop. • The Puck will go with the desired x, y, & z velocities until it hits a wall, at which time it will “bounce” off and continue with the properly inverted x, y, & z velocities.• The Puck will stop all movement whenever the paddle misses the puck, indicating that the game is over. This is taken care of by the Paddle Module because it changes x, y, & z velocities to 0.5GraphicsPurpose:– Display interactions between Puck and Paddle– Display the score & status of the game instance– Render the graphics in 3 dimensionsThe graphical representation of our game.Graphics: Implementation• Ray-Casting– Phong is for suckers –Distance & Position functions are for winners • The Hard Part: Division– 5x division for 5x planes – 1x division for ray-generation – 1x division for sphere intersection6Graphics: Integer Math• How much fixed-point precision?– Python tests indicate:• 10 bits is too few to accurately intersect the sphere • 12 bits is sufficient. • How many bits do we need? – 12 bits 'to the right of the decimal point' • How many bits left of the decimal point? – Multiplication makes enormous numbers • doubling # of bits– Keep the excess in registers in appropriate locations– Alter the precision with left-right shifts to keep scale appropriate. Graphics: Keeping things 3D • Without phong shading, how do we ensure that I'm not faking it? – Coordinate-function coloring. – Color of plane: P(x,y,z,sX,sY,sZ) – Color of sphere: S(sX,sY,sZ)7Putting It All TogetherINUpDownLeftRightPhysics DivisionOUTScreenGraphics DivisionconnectionsReady/DoneScoreWinLosePuckxPuckyPuckzPaddlexPaddleyTimelineNov 6Block Diagram MeetingNov 13Project PresentationDec 7Nov 9Nov 16Nov 23 Nov 30Dec 8Final Project Check OffPhysicsWhole ProjectGraphicsDec 4Begin Full Project TestingThanksgivingFull TestingFull TestingFull TestingFull TestingFull TestingDesigningThanksgivingThanksgivingPlanningPlanningPlanning PrepImplement in Python Implement Basics Implement Basics Test . Movement Full TestingFull TestingFull TestingFull TestingFull TestingPaddle ModulePuck ModuleScore ModuleImplement Basics Test Score Test ScoreTest . Movement Nov 25Sprites FunctionalChange Python to Verilog CodePlanning Nov 16Skeleton Graphics CompleteNov 30Coordinate Coloring FunctionalImplement “Angles”Test . Movement Test Angles Test Angles Dec 7Nov 9 Nov 16Nov 23Nov 30ReportDesigning Presentation Puck PaddleDec 10Report DueFull Write-UpGraphicsDONE!8Testing Issues• Testing Without the Other Division– Graphics Division • Use randomly generated values for Puck and Paddle locations and the Score• Use the clock to generate the ready signal– Physics Division• Use ModelSim to simulate parts of the game before the graphics are ready• Modular Cooperation– Creation of “Skeleton” Graphs • Implemented by November 16• Provides Physics the ability to control the Paddle and visibly watch the Puck / Paddle interactions– Lengthy “Total Testing Time”• We


View Full Document

MIT 6 111 - Three-Dimensional Ray-Cast

Documents in this Course
Verilog

Verilog

21 pages

Video

Video

28 pages

Bass Hero

Bass Hero

17 pages

Deep 3D

Deep 3D

12 pages

SERPENT

SERPENT

8 pages

Vertex

Vertex

92 pages

Vertex

Vertex

4 pages

Snapshot

Snapshot

15 pages

Memories

Memories

42 pages

Deep3D

Deep3D

60 pages

Design

Design

2 pages

Frogger

Frogger

11 pages

SkiFree

SkiFree

81 pages

Vertex

Vertex

10 pages

EXPRESS

EXPRESS

2 pages

Labyrinth

Labyrinth

81 pages

Load more
Download Three-Dimensional Ray-Cast
Our administrator received your request to download this document. We will send you the file to your email shortly.
Loading Unlocking...
Login

Join to view Three-Dimensional Ray-Cast and access 3M+ class-specific study document.

or
We will never post anything without your permission.
Don't have an account?
Sign Up

Join to view Three-Dimensional Ray-Cast 2 2 and access 3M+ class-specific study document.

or

By creating an account you agree to our Privacy Policy and Terms Of Use

Already a member?