GAM531-P1x - ICT

birdsowlSoftware and s/w Development

Dec 2, 2013 (3 years and 10 months ago)

125 views

GAM531

DPS931


Week 1

Introduction

Professors

Joseph Hughes

Info:


scs.senecac.on.ca/~
jp.hughes


T2104


Jp.hughes@senecacollege.ca

Roles:


Primary Lecturer


Modern API Wizard

Chris

Szalwinski

Info:


scs.senecac.on.ca
/~
chris.szalwinski


T2093


chris.szalwinski@senecacollege.ca

Roles:


Mathematical Genius


D
PS931 Overlord

So what does this course teach you?

So we will be making 3D games?

What is an game engine?


Think of a car…







Game Logic

HP = 10;

DMG = 20;

Player.attack
();

LoadLevel
(10);

Enemy.Spawn
();

RenderScene
();

Game Engine

glEnable
(GL_BLEND);

glBindBuffer
(
bufferID
);

glBindTexture
(
textureID
);

glDrawElements
(size,
data);

Game Output


And now for some code…


Some Examples…

???

Engine

Game
Logic

How is an engine structured?

Engine
Core

Client
Interface

Operating
System
API

Device
API

Separation of concepts

HARDWARE

FIRMWARE

OS API

DEVICE API

APPLICATION

CPU

GPU

CHIPSET

DRIVERS

Window Creation

Console Write

Input detection

Your Program

Open GL 4.3

DirectX 11

Why do we need Device APIs?


OS APIs are slow


Indirect, limited functionality


Unable to harness true potential of hardware




Device APIs are fast!


Give nearly direct control over the device


Specialized to fit to fit programmer’s needs

What devices are we using?


We will be making use of the Graphics Processing Units (GPU)


GPUs are highly parallelized processing units made for graphical processing


GPUs can come as discrete Graphics Cards or Integrated Chips with your mother
board or CPU (APUs)

To recap…

Application

Device APIs

Firmware

Hardware

//
Set up the description of the static index buffer.

indexBufferDesc.Usage

= D3D11_USAGE_DEFAULT;

indexBufferDesc.ByteWidth

=
sizeof
(unsigned long) *
m_indexCount
;

indexBufferDesc.BindFlags

= D3D11_BIND_INDEX_BUFFER;

indexBufferDesc.CPUAccessFlags

= 0;

indexBufferDesc.MiscFlags

= 0;

indexBufferDesc.StructureByteStride

= 0;


//
Give the
subresource

structure a pointer to the index data.

indexData.pSysMem

= indices;


//
Create the index buffer.

result
= device
-
>
CreateBuffer
(&
indexBufferDesc
, &
indexData
,
&
m_indexBuffer
);

//
Set the depth buffer to be entirely cleared to 1.0 values.

glClearDepth
(1.0f
);


//
Enable depth testing.

glEnable
(GL_DEPTH_TEST
);



//
Set the polygon winding to front facing for the left handed system.

glFrontFace
(GL_CW
);


//
Enable back face culling.

glEnable
(GL_CULL_FACE
);

glCullFace
(GL_BACK
);


//
Initialize the world/model matrix to the identity matrix.

BuildIdentityMatrix
(
m_worldMatrix
);

The ultimate goal



To render a 3D world to the screen

Engine recap

Engine
Core

Client
Interface

Operating
System
API

Device
API

Into the Emperor Engine

Engine

DX11
Device

GL 4.3
Device

Controller

Manager

Model

DX11
Object

GL 4.3
Object

DX 11
API

GL 4.3
API

DX 11
API

GL 4.3
API

1 m

1 m

1 m

1

1
or

1

1
or
1

iEngine

iController

iModel

Finishing Recap


This course is all about engine development!


An engine is framework that enables programmers to accomplish complex tasks
with relative ease


A system API is an interface that exposes a set of functions to provide
programmers with control and functionality that would otherwise be out of
grasp


Device APIs like DirectX 11 and OpenGL 4.3 allow a more direct and more efficient
method interfacing with the firmware controlling the hardware


The GPU is a highly parallelized processing unit designed for 3D graphic
rendering


You got a glimpse of the Emperor Engine’s design

Course Breakdown


Please read the course outline on the ICT website!


Mark breakdown:






Labs are worth 2% each, if a lab is not complete by the end of the lab period the
highest mark achievable on the lab is ½.


You are expected to know how to use git and Visual Studio 2012, there will be a
review of them next class


A laptop or desktop computer with a modern GPU is highly recommended

Labs (10)

20%

Assignment (1)

30%

Mid
-
term

20%

Exam

30%

To Do


Install Visual Studio 2012 on your personal computers


Install most recent DirectX SDK on your personal computers


Update the graphics drivers of you personal computer (must support OpenGL
4.3)


Create a Git Hub account if you don’t already have one