510 likes | 655 Views
Team Members: Chen Ling Wei Tan Rei Wen Alex Wang Kai Tran Anh Duc. CS4343 Game Development Project PaperFlight Final Presentation. Work Load. Game Design. Plane racing game Similar to Red Bull Air Race Go through “gates” to score points/extend time limit Obstacles to avoid.
E N D
Team Members: Chen Ling Wei Tan Rei Wen Alex Wang Kai Tran Anh Duc CS4343 Game Development ProjectPaperFlightFinal Presentation
Game Design • Plane racing game • Similar to Red Bull Air Race • Go through “gates” to score points/extend time limit • Obstacles to avoid
Technical Achievement Marker Tracking • Using marker tracking to control plane instead of traditional keyboard/mouse/joystick. • Unity3D for the game engine • ARToolKit library to detect markers using webcams • Covered by Alex later in the presentation
Technical Achievement Plane Controls and Gestures • Convert raw positional and rotational data of marker into plane control • Covered by Wang Kai later in the presentation
Why? • Marker Tracking technology has been in development for some time • Applications include: - Augmented Reality -> For advertising (Nissan, Best Buy etc) - Film Production -> Motion Tracking • Why not games?
Wiimote • USD $39.99 (amazon) • Support rotation • Support displacement • Displacement function needs IR LEDs • Displacement not so accurate (calculate the relative displacement)
SIXAXIS • USD 39.99 (amazon) • Did not support real 6 axis • Only support rotation
Marker • USD 0.1 – 20 (if you don’t have the webcam) • 6 axis fully supported • Support multiple markers
Existing AR Games • Existing AR Games are closer to demonstrations that full fledged games http://gamesalfresco.com/2008/03/03/top-10-augmented-reality-demos-that-will-revolutionize-video-games/ • We want to introduce marker tracking used in AR applications as a new form of interaction • However, we want to maintain a familiar form of game play for users
Objectives of our Game • Use marker tracking instead of traditional controls -> Intuitive, Innovative, Interesting controls • Sense of familiarity -> Common game concept -> Widely available and cheap equipment (webcam, laptop, paper markers)
Game Development • Three stage of game development • Phase 1: • Development of Marker tracking capabilities for Unity3D, and converting raw data into plane control
Game Development • Phase 2: • Fine-tuning of marker tracking and game controls • Inclusion of basic game concept elements e.g. test terrain, plane model, gates and waypoint) • Basic GUI elements
Game Development • Phase 3: • Fine-tuning of game concept • Changed to larger and more challenging terrain and gate layouts • Additional GUI elements like scoring screens and high score Lingwei and Duc will elaborate more on the game concept later in the presentation
Presentation of Individual Components • Alex – ARToolkit-Unity3D Interface • Wang Kai – Gesture Recognition • Lingwei – Assets and Level • Duc – GUI and replay
ARToolkit-Unity3D Interface • Software, technology and hardware used for ARToolkit – Unity3D Interface: • ARToolKit 2.72 library • Microsoft Visual Studio 2008 • Unity3D 2.6.1f3 • UDP Protocol for data transfer • Laptop with built-in webcam (or any computers with external webcam)
ARToolkit-Unity3D Interface Game Project within Unity3D previous marker position/ rotation 30 images per second Translation and Rotation Data ARToolkit Marker Tracking Libraries ARToolkit Application RefreshCoord Script Send Via UDP Translation and Rotation Data Marker No.
Difficulties and Constrains • Incompatibility between ARToolkit library and Unity3D • ARToolkit last updated on 2007, runs on C programming, whereas Unity3D uses C# and Javascript • Unity3D free version does not accept plug-ins • Incompatibility between ARToolkit library and Unity3D • Solved by sending data between both applications via UDP instead of trying to integrate them completely
Difficulties and Constrains • Marker mis-detection or non-detection • Non-optimal lighting conditions or webcam limitations may cause random marker mis-detection or non-detection • ARToolkit-Unity3D Interface must be robust enough to handle the above to ensure optimal playing experience
Difficulties and Constrains • Temporary marker non-detection is solved by having the ARToolkit-Unity3D Interface remember previous marker position/rotation • Marker mis-detection is solved by having ARToolkit send positional and rotational data at a fast-enough rate to minimize the effects of inaccurate data.
Difficulties and Constrain • Time Constrain • Operation of ARToolkit with Unity3D is the foundation of our project • Critical to get Unity3D communicating with ARToolkit as soon as possible so the rest of the game project can proceed
Decisions & Justifications • Using ARToolkit for marker detection • Although ARToolkit’s primary purpose is for augmented reality applications, its marker detection library is robust and fast. • It is also free, and uses C which we are familiar with • Support tracking of multiple markers • Alternatives such as FLARToolkit and OpenCV were considered, but were not used as ARToolkit is faster and more efficient.
Decisions & Justifications • Using UDP to transfer positional and rotational data from ARToolkit library to Unity3D. • Other methods were considered, including TCP, developing our own protocol, or converting ARToolkit into C# and integrate it into Unity3D • UDP packets was chosen as it is faster than TCP, and TCP’s reliability not needed here • Due to time constrain and complexity of ARToolkit’s library, we decided not to integrate it directly or develop our own protocol.
Marker: The problem • Where are the buttons? • We don’t have the buttons to provide extra information. However we can abstract enough information from the marker through the space and time. • If the camera can not see the marker? • Interpolate • Enable user do the error correction
Space Camera View
Space - the main control • Use only XYZ rotations, map to plane’s rotation. • Use Marker’s Z displacement to control the speed.
Space • We divide the camera space into 9 region. • Different region can perform different functions. • Region = Buttons ! • Why separate the region into only 9 region? • Why keep the centre region big?
Rotation • From ergonomics’ point of view, hands have certain limit to perform the rotation • We add the function that when user reaching ergonomics limit, the plane will keep rotating • The rotation speed proportional to user’s rotation of the marker
Banking • We link the flight banking function to the left and right region of the camera. • By moving the marker to the right/left, user can trigger the flight to do the banking. • User don’t need to rotate and move the marker to control the plane perform banking
Time • Use certain gesture to control the game • Can not perform time critical control • Should not be easily triggered or miss-detected
Gesture for Rewind • Idea from iPhone lock screen • Step: • Turn the marker/ Cover the marker • Move the marker right/left • Turn the marker to original rotation
Considerations and Constrains • To be precise enough to move the plane according to what the player desire • To allow enough freedom for the player to execute moves that he desire • Adjust sensitivity to detect motion accurately and yet reduce ‘noise data’ sufficiently to prevent disruption to player controls. • Ensure that occasional non-detection of markers do not cause major problems in the game controls
Summary of work • Creation of Assets (Plane model, Gate model, Menu Elements) • Level Design • Scoring System • Pointing System
Creation of Assets • Create the plane model and texture. • Add in simple scripts to drive the propeller to rotate • Add in smoking effects at the tip of the wing • Add in engine sound • Create the Gate model • Waymarkers attached to the Gates to updates score and add extra time
Creation of Assets • Design and Create the Game menu in Photoshop
Level Design • Creation of the Terrain • Design the flying course
Scoring System • For each Difficulty levels • A different count down time is set • Time remained and current score is displayed on the screen • When passing through each gate, extra time will be added and 100 points will be awarded • When player fly through the finish gate, final marks will be calculated • Final Mark = Points gained by passing gates + 10 * remaining count down time
Pointing System • Arrow above the plane to lead the player to the next gate • Got the way marker location information at the beginning of the game • When passing through one gate, change the direction of the arrow to the next gate
Summary of work • Integrate scenes • Menu system • GUI components • Replay feature
Integrate scenes: Scenes Flowchart(aka. Trip schedule) Title Screen + Difficulty Menu - Main Flight Course Scene Tutorial Flight Course Scene + - + Enter Player Name Got Highscore? Plane Crash? Complete Course? Highscore Menu Exit Replay Scene
Integrate scenes: For a safe and smooth trip(aka. Safety procedure) • Close any opened UDP network socket when exiting the scene • Otherwise, memory hogging and crashes happen! • Close any opened file stream when exiting the scene • Otherwise error replay file created!
Menu System (aka. The Tour guide) • Menu Types • Static Menu with button only: • Title menu • Difficulty menu • Highscore screen menu: • Name entry form • Highscore list menu • Save and load the highscores • Ingame Popup: • Victory/Crash/End of Replay confirmation
Menu System (aka. The Tour guide) • The menu is built with Unity3D GUI system which basically: • Provide functions to create buttons, labels, and entry field • Need to set the parameters to control the position, texture and appearance • Need to code the hierarchy and scene redirection
GUI Components (aka. Pilot’s assistant) • Work done: • Artwork design done with photoshop • Codes for the Radar are modified from adopted source in Unity3D wiki to parameterize the map scale and range of detection • Radar • Can accept parameters to adjust the scale and range of detection. • Can accept parameters to change the background • Warnings & Notices • Cannot detect marker • Mission accomplished • Height and Speed bar • Main purpose: for decoration
Replay feature (Aka. The Black Box)The use • During development phase • Record player’s flight for further analysis • Find common/repetitive mistakes of testing players • Was the turning angle too limited if the player under-steered • Was the control too sensitive if the player over-steered • Are the mistakes are just because the player had not been familiar with the control • Can the users carry out advanced flight maneuver : • Loop / Roll / Loop through the gates / Roll through the gates • Did they successfully carry out the move • Did they feel lost of control and cancel the move • In published game • Let the player view their most recent flight • Extended by Wang Kai to make Rewind function
Replay feature (Aka. The Black Box)The mechanics • Recording phase • Record the plane coordinate and orientation during the game • Data size is about 50kByte/minute • Replaying phase • Load the plane coordinate and orientation to simulate the flight