1 / 37

Story Overview

Help the Gunsmithing Major rescue her kidnapped kitten, Sparkles, by fighting enemies and building new weapons along the way. Use C# language, XNA graphics framework, JigLibX physics, and XWinForms inventory menus.

blassiter
Download Presentation

Story Overview

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. Story Overview • You find your kitten "Sparkles" has been catnapped!  You discover a note left by his captor and vow to retrieve your precious Sparkles.  Little did your newfound enemy know, you are actually a Gunsmithing Major at the local Community College.  You will stop at nothing to save him, fighting your way through various environments, building new weapons as you go to take down increasingly tougher enemies. • Gunsmithing major gives an excuse as to why main character can create guns as well as she can.

  2. Technical Overview Terence Lee Grant Johnson Kevin Hobson Jeff Patterson

  3. Technologies Used • Language: C# • Graphics Framework: XNA • Physics: JigLibX • Inventory Menus: XWinForms • Installer: Inno Setup 5 • Tools: • Visual Studio 2008 • Paint.NET • Blender

  4. Game Framework • Custom model renderer • Everything is a SceneNode • Combined with JigLibX physics • Handles collisions and movement

  5. Game ScreenManager Menu Screen Game Screen Pause Screen LevelManager GameManager Console CollisionManager Debug Drawer Level Editor SceneManager SceneNodes Entities ModelNode SceneNode Entity Enemy Item Level PhysicalNode FPSCamera LevelNode WeaponPart Weapon

  6. Physics System • JigLibX • Gravity • Friction • Collisions • Collision event handlers • In ModShooter: • Relative bounding boxes • OR triangle accuracy meshes (levels)

  7. Control System • Common FPS controls • WASD movement and strafing • Spacebar: Jump • Control: Crouch • Shift: Run • Mouse: Look and fire • Crouching and jumping is context sensitive • Need to calculate distance from ground

  8. Improvements • Different graphics framework • XNA too low level • Had to implement basics such as: • SceneNode framework • Camera system • Model rendering/transforming • Convenience of matrices vs Euler vectors • Additional calculations, no simple object transformations • Comparatively few resources • However, C# was good • Should have used more interfaces • Did not refactor code often; test code remains

  9. Inventory Select your action, then select your barrel.

  10. Previously • Could select parts and build weapons. • No information. • Could not un-equip weapons without disassembling them. All of this has been addressed!

  11. // Inventory Screen TODO • Add data displays for parts and weapons. • Show stats of individual parts. • Preview resulting stats from valid combinations. • Show stats of weapon, parts it’s using. • “Unequip” button: save a weapon for later. • Prohibit selection of incompatible parts. • Or at least tell the user “NO!”

  12. Let’s build! • Information boxes for each action and barrel • Information for weapons • “Dequip” button There’s more! • Can now discard unwanted items • Can NOT assemble incompatible parts • Given a few parts to start with

  13. Weapon system If you build it, they will be shot

  14. Last time • Infinite ammo • One click, one shot • Physical bullets • Invisible gun! • Code all over the place • Manual naming

  15. //Weapon System TODO • Consolidate methods into Player class. • Connect weapon’s fire rate, ammo capacity into game play. • Implement other weapons. • Shotgun • Machine gun

  16. This time • Ammo and Reloading • Semi/auto firing • Hitscan • Mauser • Code consolidated • Auto named

  17. Enemies • Behaviors (AI-ish) • STAND (for level placement) • AIMPLAYER • PATROL (unused, left over from previous TB) • PATROL_AND_CHASE • Models • Wizard, Warlock (unused – Texture issue) • AIMPLAYER shooting • issues

  18. Improvements • More advanced AI • Behaviors not just based on distance from player • Waypoints • Fixing Textures (Warlock texture) • More models • Bullets and Walls

  19. DropBox • When an Enemy is killed, they drop one of the following: • (A)ction Box – randomized action and characteristics • Upon pick up, this action added to the inventory • (B)arrel Box – randomized barrel and characteristics • Upon pick up, this barrel added to the inventory • Health Box

  20. Installer • Inno Setup 5 used • Open source program • Comes with helpful installer-creating wizard • Included script with program creates Inno Setup’s installer! • Installer checks whether .NET 2.0 and XNA 3.0 is present • Issues: • Lack of familiarity with Pascal • Installing XNA 3.0 Redist files if not present

  21. Environments Blender used to create game environments exported in XBF format

  22. Data Driven Loading/Saving • Each Entity type implements two functions • LoadFromXml(XmlNode): Reads info from XML, sets properties of Entity • WriteXml(TextWriter): Writes the Entity’s properties in XML format to the TextWriter • Each Entity reads/writes data common to all Entities (Name, Model, Position, etc.) and data specific to its type (Life, AmmoCapacity, BarrelLength, etc.)

  23. Sample XML <?xml version="1.0" encoding="utf-8" ?> <level> <levelModel>Content/Models/office</levelModel> <entities> <player> <camera> <position>10,0,-10</position> <xRotation>-0.04199977</xRotation> <yRotation>-0.6885061</yRotation> </camera> <life>100</life> </player> </entities> </level>

  24. Console • XNAConsole • IronPython for scripting • Python Interpreter • Can change variables during runtime • Works with C# Reflection system • Custom commands • Save • Load • Spawn

  25. Level Editing • Purpose of custom console commands • Can create any entity with any parameters directly from in-game console

  26. Heads Up Display • Crosshair • Health • Ammunition • Color flashes for events • Hit by bullet: Red • Pick up health pack: Green • Death Screen

  27. Health Boxes • Specialized Item Entity • Collision fires event • Increases player health • Notifies HUD • Deletes health box

  28. Event Boxes • Take specialized action upon collision • Invisible except in debug mode • Warp Boxes • Send player to another location (same or different level) • Used to switch levels • Damage Boxes • Harmful to any entity (player or enemy) that touches it • Used for “dangerous” areas

More Related