graphics qubed
DESCRIPTION
Graphics Qubed. SCE Presentation of Epoch: Relic of Time. Introduction. Team: Graphics Qubed Roles: Team Leader ( Audrey Wells ) Lead Architect and Tester ( Sean Matthews ) Configuration Manager ( Peter Dudek ) Project: 3D Graphical Computer Game Epoch: Relic of Time. - PowerPoint PPT PresentationTRANSCRIPT
Graphics Qubed
SCE Presentation of
Epoch: Relic of Time
Introduction
• Team: Graphics Qubed• Roles:
– Team Leader ( Audrey Wells )
– Lead Architect and Tester ( Sean Matthews )
– Configuration Manager ( Peter Dudek )
• Project: – 3D Graphical Computer Game
– Epoch: Relic of Time
Outline of Main Points
• Initial Goals• System Structure and Design• System Features• Problems Encountered• Demonstration of Game
Initial Goals – Completed
• Simple 3D Adventure-RPG Game• Multiple levels, each containing several rooms• Variety of textures to make interesting levels• Objects and characters to interact with• User Interface for inventory objects• Story screens between levels
Initial Goals – Eliminated
• Artificial Intelligence for characters• Health levels and other player statistics• Hazards that lower player health• Expanded User Interface
System Structure and Design
• Object-Oriented Design:– Tools:
• C++ Programming Language
• OpenGL: Widely used API (Application Programming Interface) for 2D and 3D graphics
– Object Classes:• Level Class
• Tile Class
• Player Class
• Item Class
• Interface Class
• COGLTexture Class
• Main Module
OpenGL Sample Codevoid Tile::drawPit(int x, int y, COGLTexture tex){
float t = tileSize;
tex.SetActive();
glColor3f(1.0, 1.0, 1.0);
glBegin(GL_POLYGON);
glTexCoord2f(0, 0);
glVertex3f(t * x, -t, t * y);
glTexCoord2f(0, 1);
glVertex3f(t * x + t, -t, t * y);
glTexCoord2f(1, 1);
glVertex3f(t * x + t, -t, t * y + t);
glTexCoord2f(1, 0);
glVertex3f(t * x, -t, t * y + t);
glEnd();
}
System Structure and Design
• Level Design:– 2D arrays of data
– A integer key describing tile types0 – Empty
1, 3, 5 – Individual Wall Types
2, 4, 6 – Individual Floor Types
7 – Tree
8 – Pit
9 – “Special” Floor
Level Array Sample Codeint roomSix[15][15]={
{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0},
{0,0,0,0,0,3,3,3,3,3,0,0,0,0,0},{0,0,0,0,3,3,4,4,4,3,3,0,0,0,0},{0,0,0,3,3,4,4,4,4,4,3,3,0,0,0},{0,0,3,3,4,4,4,4,4,4,4,3,3,0,0},{0,3,3,4,4,4,3,4,3,4,4,4,3,3,0},{0,3,4,4,4,3,3,4,3,3,4,4,4,3,0},{0,3,4,4,4,3,4,4,4,3,4,4,4,3,0},{0,3,4,4,4,3,4,4,4,3,4,4,4,3,0},{0,3,3,4,4,3,3,3,3,3,4,4,3,3,0},{0,0,3,3,4,4,4,4,4,4,4,3,3,0,0},{0,0,0,3,3,4,4,4,4,4,3,3,0,0,0},{0,0,0,0,3,3,4,4,4,3,3,0,0,0,0},{0,0,0,0,0,3,3,3,3,3,0,0,0,0,0},{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}
};
Level Array Sample
System Structure and Design• Game Scripting:
– Overview of scripting
– Very verbose and tedious!
• Player Scripting:– Keep track of player coordinates
and direction
– Item and tile collision
– Switching between rooms in a level
• Item Scripting:– Assigning certain tasks to items
– Pop-up dialogue boxes
– Very verbose and tedious
Item Scripting Sample Codeif(door.isItemInRoom()){
if(isItemInWay(door, pX, pY, pDir) && avatar.getHasBronzeKey()){
door.setItemInRoom(false);
door.setItemUsed(true);
bronzeKey.setItemInInventory(false);
bronzeKey.setItemUsed(true);
theInterface.setLeftTexture(leftInterfaceTex);
avatar.setHasBronzeKey(false);
//Load pop-up “Door is unlocked”
}
else if(isItemInWay(door, pX, pY, pDir)){
//Load pop-up “Door is locked”}
}
System Features• Texture Mapping: The process of superimposing a 2D texture or pattern over the surface of a 3D graphical object. This is an efficient method for producing the appearance of texture, such as that of wood or stone, on a large surface area.
System Features
• 3D Items:– Multiple planes in 3D space
– Doors, stairs, characters
• 2D Items:– Placed over a flat floor tile
– Textured to look like a 3D object
– Levers, keys
Items placed throughout the game’s environment add variety and interactivity.
System Features
• Level Design– Using tile types to create a
variety of environments
– Levels have unique time themes
• Level Puzzles– Interacting with other characters
– Using objects to accomplish goals
– Navigating complex terrain
Problems Encountered
• Creating class structure• Setting up OpenGL 3D space• Enabling texture-mapping• Running out of texture memory• Time constraints
Prevented us from adding audio and additional levels (especially bigger, better, and more challenging ones)
Project Demonstration