Car Racing Game. Figure 1 The Car Racing Game



Similar documents
MP3 Player CSEE 4840 SPRING 2010 PROJECT DESIGN.

Ping Pong Game with Touch-screen. March 2012

Solomon Systech Image Processor for Car Entertainment Application

Digital Systems Design. VGA Video Display Generation

USER GUIDE Version 2.0

Video to PC Adapter. Model: Operation Manual

Modern Robotics, Inc Core Device Discovery Utility. Modern Robotics Inc, 2015

Chapter 6. Inside the System Unit. What You Will Learn... Computers Are Your Future. What You Will Learn... Describing Hardware Performance

7a. System-on-chip design and prototyping platforms

IP Video Rendering Basics

By: M.Habibullah Pagarkar Kaushal Parekh Jogen Shah Jignasa Desai Prarthna Advani Siddhesh Sarvankar Nikhil Ghate

RGB - CGA, EGA, HD to VGA Converter ID# 657

4. Do you have a VGA splitter ( Y Cable)? a document camera?

PRODUCTIVITY THROUGH INNOVATION 600 CONTROL DIRECT DRIVE TECHNICAL/OPERATION MANUAL

Designing a Graphical User Interface

Sample Project List. Software Reverse Engineering

Tutorial: Creating Platform Games

LEN s.r.l. Via S. Andrea di Rovereto 33 c.s CHIAVARI (GE) Tel Fax mailto: len@len.it url: http//

AUTOMATIC NIGHT LAMP WITH MORNING ALARM USING MICROPROCESSOR

E70 Rear-view Camera (RFK)

Chapter 1 Computer System Overview

How to Connect a Computer to Your TV Set Overview Many people already know that you can connect a computer to a plasma TV, but it is not as well

Magic Poker 2 Manual

«Filter-MB» Technical Manual

Embedded Display Module EDM6070

Working with the Multi Cam Mode in EDIUS

HARDWARE MANUAL. BrightSign HD120, HD220, HD1020. BrightSign, LLC Lark Ave., Suite 200 Los Gatos, CA

Lab 1: Introduction to Xilinx ISE Tutorial

ROCK BAND 3 WIRELESS KEYBOARD:

Sample only. Unit 4a Lesson 1: Pop game 50 minutes. Cross-curricular links. Overview. Learning objectives. Success Criteria. Key words. 1.

Tutorial for MPLAB Starter Kit for PIC18F

Data Acquisition Module with I2C interface «I2C-FLEXEL» User s Guide

Parts of a Computer. Preparation. Objectives. Standards. Materials Micron Technology Foundation, Inc. All Rights Reserved

Video Conference System

ABOUT YOUR SATELLITE RECEIVER

SIMPLE EPROM PROGRAMMER. EPROM Programmer Design. Hardware

Below is a diagram explaining the data packet and the timing related to the mouse clock while receiving a byte from the PS-2 mouse:

what operations can it perform? how does it perform them? on what kind of data? where are instructions and data stored?

PUSH BUTTON START INSTALLATION MANUAL

Glitch Free Frequency Shifting Simplifies Timing Design in Consumer Applications

Second Display Installation Guide Point-of-Sale Hardware System

Lesson 10: Video-Out Interface

Digital Guitar Effects Pedal

POCKET SCOPE 2. The idea 2. Design criteria 3

The RIDZ 8x2 Audio Switcher

ontroller LSI with Built-in High- Performance Graphic Functions for Automotive Applications

Note monitors controlled by analog signals CRT monitors are controlled by analog voltage. i. e. the level of analog signal delivered through the

DVB-T 730. User s Manual

Three Axis TB6560 CNC Driver Users Manual

85MIV2 / 85MIV2-L -- Components Locations

Video Conferencing Unit. by Murat Tasan

IsumaTV. Media Player Setup Manual COOP Cable System. Media Player

1. Computer System Structure and Components

IsumaTV connexion to COOP cable system Set up manual

Windows Movie Maker Digital Video Editing (PC) Note: If you are using a Mac then refer to the instructions on the class website

Implementing a Digital Answering Machine with a High-Speed 8-Bit Microcontroller

Computer Hardware HARDWARE. Computer Hardware. Mainboard (Motherboard) Instructor Özgür ZEYDAN

OVERVIEW Playbacks: Shortcuts: Memories: Data Entry Wheels: Touchpad: Master and Blackout:

Nios II-Based Intellectual Property Camera Design

COMPACT DISK STANDARDS & SPECIFICATIONS

Narrow Bandwidth Streaming Video Codec

CHAPTER 2 TRAFFIC SIGNS AND HIGHWAY MARKINGS

UltraCade Multi-Game System Frequently Asked Questions

FPGA Implementation of IP Packet Segmentation and Reassembly in Internet Router*

If this PDF has opened in Full Screen mode, you can quit by pressing Alt and F4, or press escape to view in normal mode. Click here to start.

Specification and Design of a Video Phone System

Kiva Technology User s Manual

US-122L/US-144 Release Notes

TEST CHAPTERS 1 & 2 OPERATING SYSTEMS

Music On Hold and Paging

Apple iphone/ipod Touch - ieffect Mobile Guitar Effect Accessory & Application

REC FIM LOCKPICK INSTALLATION OPTIONS

Chapter 1 Video Capture Cards

Adding emphasis to a presentation in PowerPoint 2010 and 2013 for Windows

Digital Systems Based on Principles and Applications of Electrical Engineering/Rizzoni (McGraw Hill

Berkeley Audio Design Alpha USB

Plotting Spectrum Analyzer Data without a Plotter

Microtronics technologies Mobile:

3D Input Format Requirements for DLP Projectors using the new DDP4421/DDP4422 System Controller ASIC. Version 1.3, March 2 nd 2012

CHAPTER 11: Flip Flops

Contents of the Guide

Monitor Characteristics

LEVERAGING FPGA AND CPLD DIGITAL LOGIC TO IMPLEMENT ANALOG TO DIGITAL CONVERTERS

Wattbike Power Cycling Studio Edition. User Manual

OLED into Mobile Main Display

PRODUCING DV VIDEO WITH PREMIERE & QUICKTIME

IGSS. Interactive Graphical SCADA System. Quick Start Guide

Creating Maze Games. Game Maker Tutorial. The Game Idea. A Simple Start. Written by Mark Overmars

White paper. CCD and CMOS sensor technology Technical white paper

1 DVR 670 Series firmware version (date )

Windows Live Movie Maker

LAB 7 MOSFET CHARACTERISTICS AND APPLICATIONS

Ar Drone Controller Version and above

2 SYSTEM DESCRIPTION TECHNIQUES

Test Specification. Introduction

An Introduction to MPLAB Integrated Development Environment

Secu6 Technology Co., Ltd. Industrial Mini-ITX Intel QM77 Ivy Bridge Mobile Motherboard Support 3 rd Generation Core i7 / i5 / i3 Mobile Processor

AXIS 211A Network Camera

Video Encoding Best Practices

Transcription:

CSEE 4840 Embedded System Design Jing Shi (js4559), Mingxin Huo (mh3452), Yifan Li (yl3250), Siwei Su (ss4483) Car Racing Game -- Project Design 1 Introduction For this Car Racing Game, we would like to accomplish a video game imitating the existing game showed as Figure 1 with a projective view. The theme of our game is to compete with the other 5 opponents that are controlled by computer in a racing tournament, the player s goal is to get to the destination as soon as possible while trying to avoid bumping to other cars or road object, the final score will be posted according to the finishing position, numbers of bumps and the time. Figure 1 The Car Racing Game This game consists of three major modules. First part is the Game Logic Generator which calculate the logic of this game, such as to detect bumps to obstacle, speed control based on keyboard input, opponents control and road generation, and this module is based on software. The second part is the Screen Rendering Module, we adopt the Sprite Graphics technique to decompose the display screen into 7 layers, which will be explained in derails in later section. The last part is the Audio Module which generate the proper sound under the control of game logic. The overall design of the game is demonstrated in figure 2. The following content of this paper explain each modules in details.

Software Keyboard Input Game Logic Module Avalon Bus Hardware Sprite Controller Audio Controller VGA Controller Audio Codec VGA Output Audio Output Figure 2 The overall design of Car Racing Game including Software and Hardware. 2 Game Logic Module (Software) Game Logic Module will be completed in C language with two major driver Sprite driver and Audio driver. Game Logic Module control the Sprite and Audio through Avalon Bus using the driver interface function. The main function of the Game Logic is list as following table. Generate the position (coordinate) of object which is the control input of Sprite Controller, according to the game logic Road Trees Clouds Cars Speed Position Score Timer Generate the Audio control signal Sounds like bump, break, accelerate etc. The Game Logic Module generates all the motion control signals of all the objects in this game according to various algorithms and feed the signal to Sprite and Audio modules through the Avalon Bus using Driver Function implemented. For player s car, there are two behaviors: move forward and change direction.

Move forward: To implement the action of moving forward, we first make the end of the road at the center of the screen to make sure the player s focus is on the road. Then we create stripes of two different patterns, one is light and the other is dark. We draw the stripes on specified positions shown in Figure 2. We keep switching positions of two kinds of stripes to generate the effect of moving the road. We use the up arrow on the keyboard to speed up. When the up arrow is pressed, we raise the switching frequency to make the road move faster. When the player s car hit the back of another racing car, it slows down and we lower the switching frequency. When the player s car passes another car, we simply move the car that gets passed from its current position down to the bottom of the screen and then disappear. By moving the car, we will also keep scaling the car. The similar algorithm applies when the player s car gets passed; we just move the passing car from the bottom of the screen up and keep scaling the car as it moves. Change direction: We use the left and right key to control the left and right movement of player s car. We will keep track of the position of the car. When left or right key is pressed, we move the position of the car to the left or right lane and draw the car based on the position. 3 Sprite Control Module (Hardware) According the Figure 2, the Sprite Control Module s job is to generate the 640*480 pixels RGB value for VGA Controller based on the control signal provided by the Game Logic Module. The Game Logic Module provides the X and Y coordinates for different objects, like trees, clouds, cars, scores, speed, which is also called Sprites. These Sprites are like label pictures store in ROM, and can be pasted to the screen according the X and Y coordinates. We lists a few Sprites we will use in our games. Three sizes of Cloud (32*32, 48*48, 64*64) Three sizes of Tree (16*32, 24*48, 32*64)

Three sizes of Car of different directions (32*32, 48*48, 64*64) The following table list all the Sprites that we need in this game. Sprite Cloud Tree Car Amount 3 3 9 Total ROM (Bytes) 22272 11136 66816 1 Pixel Size 32*32, 48*48, 64*64 16*32, 24*48, 32*64 32*32*3, 48*48*3, 64*64*3 640*480 Background (including road, land and sky) Number Speed Total 10 1 27 32*32 48*48 353152 30720 6912 1059456 921600 The estimated total ROM size = 1.02 MB, each Pixel is defined by 8-bit R + 8-bit G + 8-bit B. We break the game display figure into 7 layer with different priority. Sprite with higher priority will be displayed above that with lower priority. The diagram for the Sprite Controller Module is demonstrated in Figure 3. Cloud Tree Speed hcount, vcount Address Sprite Controller Pixel RGB Data VGA RGB X and Y coordinates for each objects (From Game Logic Controller) Figure 3 The Sprite Controller Module

The VGA module is the same as Lab 3. The Sprite Controller Module merges the different Sprites to generate the final RGB information for displaying on the screen. The priority of different layers is showed in Figure 4. Figure 4 Sprite Merging (the priority ranks from low to high from left to right) 4 The Background Generation Algorithm In our design, the background containing roud, land and sky is generated different from other Sprites, because it can t be simply be pasted to the screen according to X and Y coordinates of Sprites. Therefore we design a special module for Background Generation. The background is showed in Figure 5. A(X,Y). B. Figure 5 The Background Sprite C. The rendering algorithm of this background is based on the coordinate of A (X, Y). Every pixel above Y horizon is set to Blue because it is Sky Region. All pixels within Triangle ABC is set to Gray, because they belong to the Road Region. The rest pixels are set to Green, because they belong to the Grass Region. 5 Audio Design Audio Generator Module is designed to send instructions to the Audio Controller Module in order to play appropriate sound effect according to the game processes. For example, the background music is always

on during the period when game is on. And special sound effects such as vehicle acceleration, braking, and collisions are integrated when the specific situations happen. At the beginning of the game, the software extracts the background sound sample previously stored in the SDRAM and load it into the circular queue in the Audio Controller Module, which will continuously send signals to the SSM2603 Audio Codec to play the background sound sample until the player exit the game. During the car racing, the software continuously checks whether the player hits the acceleration or braking button, or if there is any collision happens. Whenever a specific situation is detected, the software will instruct the DRAM to load the corresponding special sound effect into FIFO, and instruct the SSM2603 Audio Codec to play the special sound effect. The Sockit board we are using in the lab provides the Analog Devices SSM2603 audio CODEC (Encoder/Decoder). This chip supports microphone-in, line-in, and line-out ports, with a sample rate adjustable from 8 khz to 96 khz. The SSM2603 is controlled via a serial I2C bus interface, which is connected to pins on the CycloneV SoC FPGA. The schematic diagram of the audio circuitry is shown in Figure 6. Figure 6. Audio Circuitry in Sockit Board