Download - 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.
Terence LeeGrant JohnsonKevin HobsonJeff Patterson
• Language: C#• Graphics Framework: XNA• Physics: JigLibX• Inventory Menus: XWinForms• Installer: Inno Setup 5• Tools:– Visual Studio 2008– Paint.NET– Blender
Custom model renderer◦ Everything is a SceneNode
Combined with JigLibX physics◦ Handles collisions and movement
GameManagerGameManager
ScreenManager
Game Screen
CollisionManager
SceneManager
LevelManager Console
Debug Drawer
Game
Menu Screen Pause Screen
Level Editor
SceneNodeSceneNode EntityEntity
SceneNodes Entities
ModelNodeModelNode
PhysicalNodePhysicalNode
FPSCameraFPSCamera LevelNodeLevelNode
EnemyEnemy ItemItem LevelLevel
WeaponPart
WeaponPart WeaponWeapon
JigLibX◦ Gravity◦ Friction◦ Collisions◦ Collision event handlers
In ModShooter: ◦ Relative bounding boxes◦ OR triangle accuracy meshes (levels)
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
• 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
Select your action, then select your barrel.
Could select parts and build weapons. No information. Could not un-equip weapons without
disassembling them.
All of this has been addressed!
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!”
Information boxes for each action and barrel
Information for weapons “Dequip” buttonThere’s more! Can now discard unwanted items Can NOT assemble incompatible parts Given a few parts to start with
If you build it, they will be shot
Infinite ammo One click, one shot Physical bullets Invisible gun! Code all over the place Manual naming
Consolidate methods into Player class.
Connect weapon’s fire rate, ammo capacity into game play.
Implement other weapons.◦ Shotgun◦ Machine gun
Ammo and Reloading Semi/auto firing Hitscan Mauser Code consolidated Auto named
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
More advanced AI◦ Behaviors not just based on distance from player◦ Waypoints
Fixing Textures (Warlock texture) More models Bullets and Walls
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
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
Blender used to create game environments exported in XBF format
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.)
<?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>
XNAConsole IronPython for scripting Python Interpreter
◦ Can change variables during runtime◦ Works with C# Reflection system◦ Custom commands
Save Load Spawn
Purpose of custom console commands Can create any entity with any parameters
directly from in-game console
Crosshair Health Ammunition Color flashes for events
◦ Hit by bullet: Red◦ Pick up health pack: Green
Death Screen
Specialized Item Entity Collision fires event
◦ Increases player health◦ Notifies HUD◦ Deletes health box
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