Game Engine - PowerPoint PPT Presentation

1 / 25
About This Presentation
Title:

Game Engine

Description:

Game Board (2) For each point on the board, you ... Update the game. Game over. Go back to Initialization phase. Game Setup Phase ... Game Setting Phase (3) ... – PowerPoint PPT presentation

Number of Views:74
Avg rating:3.0/5.0
Slides: 26
Provided by: pokai4
Category:
Tags: engine | game | over

less

Transcript and Presenter's Notes

Title: Game Engine


1
Game Engine
  • EECS150 Fall2006
  • Lab Lecture 9
  • Kenny Duong

2
Project Status
Check Point 1 N64 Controller Interface
Check Point 2 NTSC Video
VideoRAM
VideoRAM
Check Point 3 Chipcon RF Transceiver
Check Point 4 Game Engine
Block Diagram of the Design
3
Checkpoint 4
  • Basic Requirements
  • 2-player wireless Battleship
  • Find an opponent and start playing
  • Place and store ship positions
  • Display the game and scores
  • Extra Credits
  • Feel free to add extra features. Talk to TAs
    about extra credits BEFORE you do it.
  • A list of possible extra features and point
    rewards for those features will be published later

4
First thing first
  • 100 Freedom
  • 0 Freedom

5
Game Setup
  • Possible video output

6
Game Board (1)
  • Internal game board representation
  • It is in the engine. You can decide.
  • One possible way
  • Use RAM to store the board data
  • See the reference RAM implementation in cp4 zip
    file

7
Game Board (2)
  • For each point on the board, you can use 8 bits
    to represent its status
  • Things you need to represent
  • Hit or Miss
  • Ship Index
  • Ship Part Type (Vert. Tail, Hori. Tail, etc.)

8
Wireless Battleship?? Three main phases
  • In default channel
  • Initialize the board
  • If you are a client, actively find an opponent
  • If you are a server, wait for game request

Initialization Phase
  • In game play
  • Game play is not real-time
  • Maintain communication between systems
  • (with KA packets)
  • Send your shot and GameIndex
  • Receive those from your opponent
  • Update the game
  • Game over. Go back to Initialization phase

Game Setup Phase
Game Playing Phase
9
Initialization Phase
10
Initialization Phase
  • Packet formats standardize the 32-bit payload.
    You need to decide the proper source address and
    destination address.

11
Wireless Communication
  • !!! UNRELIABLE !!!
  • You must add redundancy to make it reliable
  • Send every packet multiple times. We start with
    packetRepeatTimes 3. You can experiment later
    on to find out the optimal value.

12
Administrative Info (1)
  • Checkpoint 3 due next week
  • 50 off one week later
  • Plan out a design for checkpoint 4
  • No design review, but should be useful for
    project writeup
  • Considering extra credit? Plan for it
  • Design consideration
  • Time allocation

13
Administrative Info (2)
  • Project grade breakdown
  • Checkpoint 1 10
  • Checkpoint 2 15
  • Checkpoint 3 30
  • Checkpoint 4 / Final Checkoff 30
  • Report 15

14
Administrative Info (3)
  • Extra credit
  • Up to 20 of total project grade
  • Due at the same time as your CP4 check-off
  • (either early or standard check-off)
  • Not eligible unless you complete all previous
    required project work.
  • (Single student groups can submit the blackboxes
    we gave you.)

15
Administrative Info (4)
  • Miscellaneous
  • Turn off your FPGAs when you leave
  • Its not nice to screw other people up
  • )

16
Game Setting Phase (1)
  • Parameters
  • Packet repetition times
  • packetRepeatTimes 3
  • Resend KA
  • speed once every 1/4 seconds
  • You could try different values for packet
    repetition later
  • To differentiate between games on the same
    channel, introduce a KAIndex. It starts from 0
    increments after every KA is sent.

17
Game Setting Phase (2)
  • Packet Format
  • You must transmit a KA index with your packets

18
Game Setting Phase (3)
  • Depending on whether you are a client or a
    server, there are two different paths
  • Client
  • Send KA Packets
  • Receive KA-Ack Packets
  • Update board with placed ships
  • Keep track of KA Index
  • Server
  • Receive KA Packets
  • Send KA-Ack Packets
  • Update board with placed ships
  • Keep track of KA Index

19
Game Playing Phase (1)
  • Packet Format

20
Game Playing Phase (2)
  • KA-Alive Scheme is the same is in initialization
  • Communication to VideoRam is more complicated
  • Send Row,Col with Shot Packet
  • ShipIndex with Sunk Packet
  • See Design Document for more detailed description
    of state transitions

21
VideoRAM
  • You are free to choose any implementation
  • For your reference, in our implementation, we
    have dedicated groups of signals for Read/Write
    Ship positions, and for Write characters on the
    screen
  • Refer to the Checkpoint assignment for detailed
    port information

22
Project Tips (1)
  • Design
  • Get used to debugging
  • An unverified module is useless
  • Refer to lab4 and lab5
  • Start from SIMULATION
  • Testing
  • Multiple boards, different addresses, different
    orderings, etc.

23
Project Tips (2)
  • Requirements
  • Finish these first
  • Make sure it works well
  • Shouldnt depend on a certain N64 controller
  • Should work on multiple boards
  • Extra Credit
  • Finish early, its worth 5
  • Keep your required version separate
  • Dont touch it while you work on extra credit!

24
Project Writeup
  • Includes
  • Block diagrams
  • Bubble-and-arc diagrams
  • Comments
  • NO SCHEMATICS (Theyre too detailed)
  • Use your design reviews!
  • Documentation helps you debug
  • Also makes it easier for us to help you
  • More details will be posted later

25
  • Enjoy Life
Write a Comment
User Comments (0)
About PowerShow.com