200 likes | 344 Views
GURKHA ARMY (A 3D Indoor Game). Kiran Timsina (064/BCT/515) Krishna Pd. Panthi (064/BCT/516) Suraj Niroula (064/BCT/546). Introduction. About FPS(First Person Shooter) The screen displays only the arm carried in the hand of first person(i.e. end user). About Game Scenario
E N D
GURKHA ARMY(A 3D Indoor Game) KiranTimsina(064/BCT/515) Krishna Pd. Panthi(064/BCT/516) SurajNiroula(064/BCT/546)
Introduction • About FPS(First Person Shooter) The screen displays only the arm carried in the hand of first person(i.e. end user). • About Game Scenario • First Person view • 3D game • Indoor Environment • Mission in each level • Health, Ammo • Clear all the enemies saving your health & ammo • Navigatearound for destination
Objectives • To build game engine • To build 3d engine • To design program in multithreaded structure • To build a 3d modeler that can generate necessary polygons by processing 2D image. • To implement the concept of BSP(Binary Space Partitioning) tree for assisting efficient rendering of scene, collision detection between objects(3d characters, bullet) and walls. • To load 3d characters as players of the game. • To assign game mission for each level.
PATH • Information about path is found by processing top view of each floor. • Convention in designing top view • White line represent walls • Red line represent stairs • Blue point indicates the starting point of level • Green point/s indicate the floor( 1 dot for ground, 2 dots for first floor,& so on)
PATH (contd..) • Steps in top view image processing • Find 2D edge points • Derive normal vectors • Find 3D coordinates of planes that shall represent wall • Normalise 3D plane coordinates • Scale plane coordinates • Export plane coordinates to text file
PATH(contd..) • Polygons of path are structured in BSP(Binary Space Partitioning) tree • BSP tree • A binary tree that selects a splitting polygon at the root node • All other polygons at the up side or left side of root are placed in left subtree • All other polygons at the bottom side or right side of root are placed in right subtree
CHARACTERS • Frames are edited in 3DsMAX • Individual frames are exported in 3ds file format • Frames for first person • A single frame consisting of hand & rifle for first person to represent idle state • Several frames to represent the animation while firing
CHARACTERS(contd..) • Frames for enemy • Several frames to represent the animation for different states • Stand • Die • Chase • Fire
CULLING • A path can consists of thousands of polygons • Rendering becomes slow if all such polygons are rendered • Some sort algorithm is needed to eliminate unwanted set of polygons
CULLING(contd..) • Culling Algorithm • Get the position of first person • Traverse along the BSP tree to find the current leaf containing the first person • Find other leaf that are potentially visible from the current leafusing PVS(Potentially Visible Set) adjacency matrix • Render only those leaves found in above two steps.
COLLISION DETECTION • Testing for collision with all the polygons of path can be inefficient and in fact not necessary • An algorithm is needed to reduce the number of polygons that needs testing • Algorithm • Get the position of first person • Traverse along the BSP tree to find the current leaf containing the first person • Test for collision with only those polygons that form the current leaf.
STATE MACHINE • Definition- State machine is a system that has finite number of states and predefined procedures for changing the states. • Set of possible states for an enemy • Stand • Chase • Fire • Die
STATE MACHINE(contd…transition diagram) Stand (default) FPS not in sight & out of range Hit by bullet FPS in sight &out of range FPS in sight & in range Hit by bullet Die chasing FPSout of sight Hit by bullet Firing FPSin sight & in range
FUTURE ENHANCEMENT • A 3d modeler that can show complete house for assisting civil engineers to make general people understand how their house would look like • Networking • Multiple levels