1 / 50

SE Team 9 GlobalFlyer

SE Team 9 GlobalFlyer. Cole Hoosier Ryan Hannebaum Leanne Gray Alex Stampbach. Project Statement. GlobalFlyer allows a player to fly a Wright brothers-style airplane in 3D space using the OGRE graphic rendering engine and the FMOD sound system. Iteration Plans. Fixup

aideen
Download Presentation

SE Team 9 GlobalFlyer

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. SE Team 9GlobalFlyer Cole HoosierRyan HannebaumLeanne GrayAlex Stampbach

  2. Project Statement • GlobalFlyer allows a player to fly a Wright brothers-style airplane in 3D space using the OGRE graphic rendering engine and the FMOD sound system.

  3. Iteration Plans • Fixup • 1: Get music and sound effects working again • 2: Get collision detection with buildings working • 3: Update Ogre library versions • Visual Environment • 1: Add hovering objects to the world • 2: Add proximity detection to hovering objects • 3: Modify texture of hovering objects based on proximity • User Interface • 1: Add mouse control of camera • 2: Add visually-appealing digital readouts of data the user might want • 3: Add the ability to toggle sound, gui, etc.

  4. GlobalFlyer Web Site • http://seteam9.cis.ksu.edu/

  5. The Plan and Analysis

  6. Plan for Iteration 3

  7. Comparisons of Effort

  8. Earned Value • EV= Budgeted cost of Work Performed over Budgeted at Completion • Shows our the gradual completion of tasks over time

  9. Schedule Performance Index • SPI= Budgeted Cost of Work Performed over Budgeted Cost of Work Schedule • Shows that we are always on or ahead of schedule

  10. Schedule Variance • SV= Budgeted Cost of Work Performed minus Budgeted Cost of Work Schedule • Show how far ahead of schedule (or right on target) we were

  11. Cost Performance Index • CPI= Budgeted Cost of Work Performed over Actual Cost of Work Performed • Show us under budget and over budget but finally ending under (just barely)

  12. Cost Variance • CV= Budgeted Cost of Work Performed minus Actual Cost of Work Performed • Show just how much over and under budget we were

  13. OCL

  14. OCL • Areas that lend themselves well to OCL specifications • The airplane cannot fly beneath the ground • The FMOD sound system shouldn't be re-initialized • The bubbles and buildings must be within the boundaries of the world • Checking the win-condition for a level, theoretically we would load a new level after hitting all targets

  15. OCL • The airplane cannot fly beneath the ground • context OgreCharacter::update(elapsedTime, *input) : void • post: self.raySceneQuery->forAll( worldFragment.singleIntersection.y < self.mMainNode.getPosition().y )

  16. OCL • The FMOD sound system shouldn't be re-initialized • context CFMod::InitSoundSystem() : bool • pre: self.initialized = false • post: self.initialized = true

  17. OCL • The bubbles and buildings must be within the boundaries of the world • context SampleApplication::createScene() : void • post: self.buildings.getBoundingBox->forAll( getMinimum.x >= 0 and getMinimum.z >= 0 and getMaximum.x <= 10000 and getMaximum.z <= 10000 ) • post: self.bubbles.getBoundingBox->forAll( getMinimum.x >= 0 and getMinimum.z >= 0 and getMaximum.x <= 10000 and getMaximum.z <= 10000 )

  18. OCL • Checking the win-condition for a level -- theoretically we would load a new level after hitting all targets • context OgreCharacter::targetsRemaining() : int • result = self.targetHit->count(false) • context OgreCharacter::checkWin() : bool • result = self.targetsRemaining = 0 • context SampleListener::frameStarted(frameEvent) : void • post: self.mChar.checkWin = false

  19. Testing Code void Sound::Play() { debug ("Sound::Play 1"); if (m_pSound != NULL) { debug ("Sound::Play 2a"); m_soundChannel = FSOUND_PlaySound(FSOUND_FREE, m_pSound); } else { debug ("Sound::Play 2b."); } debug ("Sound::Play 3 (last)"); }

  20. Testing Output Airplane::Airplane (only) Airplane::GetPosit (only) Airplane::GetRelVeloc (only) Airplane::GetVeloc (only) Airplane::checkWin (only) Airplane::inObstacle 1 Airplane::inObstacle 2 Airplane::inObstacle 3a Airplane::inObstacle 3b. Airplane::inObstacle 4a Airplane::inObstacle 4b. Airplane::inObstacle 5a Airplane::inObstacle 5b. Airplane::inObstacle 6 (last)

  21. Exceptions to C1 Sound::InitSoundSytem 3a -- would need an invalid version of fmod Sound::InitSoundSytem 4a -- would need a bad version of fmod Sound::Load 3a -- fmod would have to screw up to hit this case Sound::Mute 2b. -- fmod would have to screw up to hit this case Sound::Pause 2b. -- fmod would have to screw up to hit this case Sound::SetLoop 2b. -- fmod would have to screw up to hit this case bool Sound::Load(char *strName) { debug ("Sound::Load 1"); bool retval = false; // set to 'true' if successfully loaded // if FMOD isn't loaded, or strName is invalid, we can't load a sample if (initialized && strName) { debug ("Sound::Load 2a"); m_pSound = FSOUND_Sample_Load(FSOUND_FREE, strName, 0, 0, 0); // make sure we got a valid sound pointer if (!m_pSound ) { debug ("Sound::Load 3a"); // bad news, bail out with an error message DisplayError(); ……..

  22. UML Models

  23. FrameStarted Sequence Diag

  24. Old Class Diagram Overview

  25. New Class Diagram Extended Camera GlobalFlyer ExtendedFrame Listener Sound Airplane Level Manager PhysicsEngine

  26. GlobalFlyer

  27. ExtendedFrameListener

  28. ExtendedCamera

  29. LevelManager

  30. Airplane

  31. PhysicsEngine

  32. Sound

  33. New Featuresand Updates

  34. Library Update Ogre has updated from 1.2.3 to 1.4.0 during the year. We thought it might be nice to start next year’s team with updated code. 

  35. Where’s the Keyboard? using namespace OIS; void Airplane::Update (Real elapsedTime, Keyboard *keyboard, Mouse *mouse) { … if ( keyboard->isKeyDown(KC_W) …)…. …} airplane.{h,c}

  36. LevelManager • Sets up the world • Bubbles • Buildings • Format follows: int buildingPositions[MAX_LEVEL][MAX_BUILDINGS][6] = { … {//level 2 {5000, 0, 6000, 50, 950, 3000}, // x, y, z, width, height, length {10000, 0, 6000, 50, 950, 3000}, // 1 {6000, 0, 5000, 3000, 950, 50}, // 2 {6000, 0, 10000, 3000, 950, 50}, {6000, 1000, 6000, 3000, 50, 3000}, {0, 0, 0, 0, 0, 0}, // 5

  37. LevelManager

  38. LevelManager

  39. Camera Controls if (mKeyboard->isKeyDown (KC_F1) && mExCamera) { mExCamera->SetTightness (1.0f); } else if (mKeyboard->isKeyDown (KC_F2) && mExCamera) { mExCamera->SetTightness (0.1f); } else if (mKeyboard->isKeyDown (KC_F3) && mExCamera) { mExCamera->SetTightness (0.05f); } else if (mKeyboard->isKeyDown (KC_F4) && mExCamera) …….. extended_frame_listener.cpp

  40. Camera Controls

  41. Sight & Sound • bind keys to toggle cockpit and sound • create guard variable to ensure only a single toggle per click

  42. Toggle Cockpit F9

  43. Toggle Cockpit Void ExtendedFrameListener::setTextArea(…Ogre::Overlay* olay){ overlay = olay; … } //toggle GUI if (mInputDevice->isKeyDown (KC_F9) && keyCountGUI >= 0.5) { if (overlay->isVisible()) { overlay->hide(); } else { overlay->show(); } keyCountGUI = 0; }

  44. Toggle Sound (demonstration) F10

  45. Toggle Sound if (mKeyboard->isKeyDown (KC_F10) && mChar && keyCountSound >= 0.5) { bool enabled; enabled = mChar->ToggleSound(); keyCountSound = 0; if (enabled) { status->setCaption("Sound Enabled"); } else { status->setCaption("Sound Disabled"); } } else if (keyCountSound >= 4.0) { status->setCaption(""); } void Airplane::toggleSound() { soundEnabled = !soundEnabled; musicSound.Mute(); if (soundEnabled) { if (crashed) { crashSound.Mute(); } else { engineSound.Play(); } } else { if (crashSoundStarted) { crashSound.Mute(); } else { engineSound.Stop(); } } }

  46. Protection from Rapid-Fire • key press was registering every frame (up to 250 times per second) • Introduced timer to guard against this rapid-fire toggling • once toggle is registered, cannot be registered again for 0.5 second

  47. The Result:

  48. Who has Questions? -Images from texasbestgrok.mu.nu/images/GF2.jpg

More Related