Capstone Gate #2 Report

wattlexanaduΛογισμικό & κατασκευή λογ/κού

31 Οκτ 2013 (πριν από 3 χρόνια και 10 μήνες)

88 εμφανίσεις








Capstone Gate #2 Report






Project: G
-
6

Submitted by: William Frickelton, Simon Fraser,

Kiel Gaiger, Derek O’Neill, and Orie Falconer

February, 11
th

2011



2

|
P a g e


Table of Contents

Project
Progress and Research Plan

................................
................................
................................
.....
3

Project Plan

................................
................................
................................
................................
....
3

Tasks

................................
................................
................................
................................
..........
3

Deliverables

................................
................................
................................
................................
4

Resources

................................
................................
................................
................................
...
4

Processes

................................
................................
................................
................................
....
4

Group
Responsibilities

................................
................................
................................
.................
5

Project Timing Plan

................................
................................
................................
.........................
6

Key Event Dates

................................
................................
................................
..........................
6

Issues to Date
................................
................................
................................
..............................
6

Current Progress in the Project

................................
................................
................................
....
6

Team Roles
................................
................................
................................
................................
.....
7

Contributions to d
ate

................................
................................
................................
..................
8

Project Demonstration and Prototype
................................
................................
................................

10

Demo Day

................................
................................
................................
................................
....

10

Prototype

................................
................................
................................
................................
.....

10

Documented Source Code

................................
................................
................................
.................

11

Unity
Source Code

................................
................................
................................
........................

11

C++ Source Code

................................
................................
................................
...........................

13

Instruction Manual

................................
................................
................................
...........................

14

Sources

................................
................................
................................
................................
............

15




3

|
P a g e


Project
Progress
and Research Plan

Project Plan

Tasks


Acquire all needed software:
Before implementation of the project can begin, we must first acquire all
the needed software. Ther
e are three main pieces of software that are essential to completion: Unity
3D, the motion capture software found in the gaming lab and the motion capture bridging software that
will allow us to implement real
-
time motion capture and make the data usable w
ithin Unity. All software
needed so far has already been acquired.

Gain access to the motion capture software:

In order to use the motion capture software, special
permissions must be acquired in order to gain access to the system. We have gained access an
d are now
able to use the motion capture system.

Learn to use relevant software:
Before major development can begin, all members, especially
programmers, must learn to use the software being employed for the project. We expect to dedicate a
few weeks towar
ds learning the software, with software concepts specifically relevant to the project
being learned first and as quickly as possible.

Meet with the specialist to learn and record all techniques:
In o
rder for our game to accurately
represent the real
-
world
knowledge we wish it to teach, and to teach it correctly, we must meet with a
specialist and have them educate us thoroughly in the correct lifting techniques. We can then use that
knowledge to create a complete and accurate simulation.

Use the motion capt
ure software to record the correct techniques:
As part of the game’s development,
we will capture the correct lifting techniques using the motion capture software, save them, and bind
them to a character model created for the simulation. This will allow us

to demonstrate correct lifting
techniques to the user and compare them against incorrect lifting techniques.

Begin the coding process to achieve real time data streaming:
To connect the motion capture system to
our playable game, we must create or adapt a

program that will take the captured motion data and
transfer it in real time to the game development software, where we must then interpret the data so we
can apply it to models and use it to evaluate the user.

Begin creating the serious game based around

this real time data streaming:
Once data streaming has
been successfully implemented, the development of our game can begin in earnest. We must construct
a game that is challenging, interesting and fun to play which will have the motion capture input and
lifting technique evaluation at its core.

Test at each stage of development:
Throughout the development process, after any minor milestone is
completed, a round of testing and reporting will be conducted to document and demonstrate progress
to clients.

4

|
P a g e


Con
duct a focus group evaluation:
Once the simulation is working, we will conduct a focus group
session where users will play the game or watch the game being played (not everyone can fit into the
motion capture suit) and give their input on what can be impro
ved and what they liked or disliked about
the simulation.

Gate 1 submission:
Complete all documented Gate #1 requirements

Gate 2 submission:

Complete all documented Gate #2 requirements

Demonstration:
Demonstrate the simulation to clients

Research report:
Write a research report that outlines serious games and virtual learning environments
with regard to their relevance to firefighters.


Deliverables


At the end of the project we will have submitted the following deliverables:



Complete game built in Unity3D

to teach firefighters the proper lifting techniques to avoid
lower back injury.



Research report on serious games and virtual environments and their relevance to
firefighting



Design documentation



Gameplay videos



Focus group evaluation


Resources



Currentl
y there are three major pieces of software that will
be
essential to this project’s
completion. Unity3D serves as the game development environment in which we will build and run the
game. The OptiTrack motion capture software found in the gaming lab will b
e used to capture the
motion data from the person playing the game and create a digital version of that person which we can
import into Unity. The third piece of essential software is the technology that will allow us to bridge the
gap between the motion c
apture syste
m and the Unity engine. This piece of software is from the
OptiTrack website. However, in order to utilize its capabilitie
s,

we have to stream the data over our
network from Arena to the Unity engine using C++.


Processes


5

|
P a g e



Our team’s current

method for working on the project and collaborating is as follows: Twice a
week we meet up in the UOIT game lab and work together on the project, getting as much done as
possible within the allotted time. During these sessions we also discuss the project
and organize what
each person should work on during the rest of the week in between sessions. In between meeting times,
we work on our individual sections and collaborate loosely using instant messaging or by briefly
discussing the project when we see one
another at school.


Group Responsibilities


William Frickelton


William will perform most of the required researching and writing duties. This includes writing
the bulk of the reports for Gate #1 and Gate #2 as well as the final research paper. William wil
l help
design the game and oversee testing. He will create and edit the gameplay video for the final
demonstration. William is also the REB coordinator for the project.

Simon Fraser


Simon Fraser will work primarily on programming and technology. As lead p
rogrammer he will
implement much of the code being used in the simulation and will work closely with the group’s other
programmer, Kiel Gaiger. Simon will also help with the design and writing of the game design document
and will contribute to the editing
of all reports and documents.

Kiel Gaiger


Kiel Gaiger will work mainly on programming and technology required for the simulation. Kiel
will work closely with Simon in designing and developing code, as well as setting up the required
hardware and software
and getting it working smoothly. Kiel will also help with the creation of the
design document with a focus on the technical aspects of the game.

Orie Falconer


Orie Falconer will serve as Lead Designer for this project in addition to fulfilling his
respons
ibilities as group leader. Orie will construct a game design document with the help of other
group members and will create a design that is both fun to play and educational. Orie will also be the
primary tester, as he is able to fit into the motion capture

system.

Derek O’Neill


Derek O’Neill will take the role of lead artist for the simulation. Derek will create all necessary
3D models and textures required to complete the project. He will help with the design of the game and
provide assistance in writing
the reports needed for the project. Derek also serves as the WebCT
facilitator for the group and the group’s client meeting coordinator.

6

|
P a g e



Project Timing Plan

Key Event Dates


February
11
th


As of this date,
Gate #2 and all of its requirements will be
completed to the desired
specification.


Along with the Gate #2 submission
,
our research report will
almost

be

complete and pending
approval we can conduct a study.

February
28
th


At this point, we will have a fully working game and we can work on tweaking

the game
mechanics and the rest of the game as necessary to provide a fun and educational experience.

Our
research report will also be completed by this time.

March
14
th



18th


As of this date, we will start our full capstone report and all of our resea
rch will be completed.
We will also have more tweaking to do to our game to make sure it
`
s completed to the best of our
abilities.

April 11
th



This is the due date of the final project.

The game and all accompanying reports will be
completed and submitted.


Issues to Date


To date, we have had numerous technical issues in getting everything to work as needed. As
well, last semester we had numerous projects on the go which hindered our
progress on this proje
ct.

However, this semester we have been able to
complete some major tasks (such as the networking
between the motion capture rig and Unity).

Streaming the data has been our biggest task to date.


Current Progress in the P
roject


Tasks completed:



Gate #1 in full

7

|
P a g e




Gate #2 in full



Game design document



Software acquisition



Working game

environment

Tasks in progress:



Learning of needed software

(ongoing)



Motion controller coding

(ongoing)



Development in the Unity engine

(ongoing)



REB ap
proval



Research report

Tasks not yet started:



Gameplay video



Focus group evaluation



REB study group



Full capstone report


Team Roles


William Frickelton



Researcher and report writer



REB C
oordinator



Designer

Simon Fraser



Lead Programmer



Lead Editor

Kiel
Gaiger



Programmer



Technology F
acilitator

Orie Falconer



Group L
eader



Lead D
esigner



Lead Tester

8

|
P a g e


Derek O’Neill



WebCT Facilitator



Lead Artist



Report writer


Contributions to date


Willie Frickelton



Gate 1

o

Wrote
the majority of the Gate #1 report

o

Contributed to

the game design document



Gate 2

o

Wrote
the Project Demonstration and Prototype section for Gate #2 report

o

Wrote the majority of the REB form

o

Assisted in the design of our level and placement of it’s different sections

o

Helped come up with the overall game d
esign

Simon Fraser



Gate 1

o

Worked on setting up needed technology

o

Edited

the Gate #1 report and design document



Gate 2

o

Assisted with the original REB form submission

o

Co
-
programmed with Kiel to set up the networking between Arena and Unity

(the
hardest part to figure out)

o

Helped come up with the overall game design

Kiel Gaiger



Gate 1

o

Worked on setting up needed technology

o

Contributed to

the game design document



Gate 2

o

Co
-
programmed with Simon to set up the networking between Arena and Unity

(the
hardest part to figure out)

o

Helped come up with the overall game design

Orie Falconer



Gate 1

o

Wrote the majority of the game design document

o

Group leader



Gate 2

9

|
P a g e


o

Group leader

o

Heavily edited the game design document and wrote the majority of the new con
tent

o

Assisted in the design of our level and the placement of it’s different sections

o

Modelled the level prototype in Maya

o

Helped come up with the overall game design

Derek O’Neill



Gate 1

o

Contributed to the Gate #1 report

o

Coordinated team meetings with cli
ents and faculty



Gate 2

o

Wrote the instruction manual

and c
ompiled all the sections of

the Gat
e #2 report

o

Wrote the consent form and questionnaire for REB submission

and edited the REB form
when clarification was needed

o

Created new assets in Maya (vehicles,

tree, bomb) and made the map overview in
Photoshop

o

Helped come up with the overall game design

o

Contributed to the new game design document

o

Put all current assets into Unity to show layout of the level



10

|
P a g e


Project Demonstration and Prototype

Demo Day



On
the demonstration day, we plan on providing the experience of playing our game without
having to actually get the motion capture suit on. The reason for this being is that to play the game, the
player must be in the gaming lab and must be a certain height
for the game to work correctly, as this is a
proof of concept game. Our display will include many different forms with the intention of teaching the
subject as much about the game and why this project is both important and relevant. Poster boards will
be s
etup with pictures of the game and of the game being played, along with those pictures there will be
short but detailed explanations that will inform the person of how the game is played and why this
project will help in decreasing lower back injury. Along

with the poster boards, a gameplay/marketing
video will be played all throughout the day. This video will give a visual representation to the person
watching it and will provide them a look into the game being played.


On top of this, a member of the grou
p will be present in the motion capture suit to demonstrate
both how the game works and how lower back injury is decreased by demonstrating our knowledge of
reducing these types of injuries. While all of the above will serve as a great and efficient way of

providing information on what our project is and how it works, all members will be present to answer
any questions about the project and provide more insight to any person with questions and concerns.


Prototype


Our prototype will only be playable in the

gaming lab since the motion capture rig is used as the
controller while playing. The prototype is comprised of a single level that is split up into multiple
sections.

The player takes control of The Spine, a super hero with the ability to lift any objec
t as long as
he follows regulatory safety procedures...oh and also time manipulation.

Using these powers, the player
will work to stop his nemesis, General Guideline.



11

|
P a g e


Documented Source Code

Unity Source Code

C# Code

using

UnityEngine;

using

System.Colle
ctions;

using

System;

using

System.IO;

using

System.Net.Sockets;


public

class

s_TCP

: MonoBehaviour {


internal

Boolean

socketReady =
false
;



TcpClient mySocket;
//sets our socket


NetworkStream theStream;
//sets up our net work stream for data


StreamReader

theReader;
// reads the incoming stream


String

Host =
"localhost"
;
//IP address, which will always be local host
for us


Int32

Port = 8080;
// what port do we want to connect to



void

Start () {



setupSocket();
// call sets up
the connection right away,
connects to our c++ program to accept data


}


void

Update () {



readSocket();
// reads our input (will require data parsing)



print(theReader);
// supposed to print received data


}

//
**********************************************


public

void

setupSocket() {


try

{


mySocket =
new

TcpClient(Host, Port);
// set our connection


theStream = mySocket.GetStream();
// setting the data stream


theRea
der =
new

StreamReader
(theStream);
// our reader for the
stream


socketReady =
true
;


}


catch

(
Exception

e) {


Debug.Log(
"Socket error: "

+ e);
// when we have connection
errors this will send it to our console log


}


}



public

String

readSocket() {


if

(!socketReady)


return

""
;
// if no socket connection, dont read


if

(theStream.DataAvailable)


return

theReader.ReadLine();
// return read line


return

""
;



}


public

void

closeSocket() {
// this section is simply for shutting down
the connection, should you choose. for our simulation it will NOT be used


if

(!socketReady)


return
;

12

|
P a g e



theWriter.Close();


theReader.Close();


mySocket.Close();


socketReady =
false
;


}

}
// end class s_TCP


Javascript Code

var remoteIP = "127.0.0.1";

var remotePort = 25000;

var listenPort = 25000;

var useNAT = false;

var yourIP = "";

var yourPort = "";


function OnGUI()

{


if (
Network.peerType == NetworkPeerType.Disconnected){



if (GUI.Button(Rect(10,10,100,30), "Connect"))



{




Network.useNat = useNAT;




Network.Connect(remoteIP,remotePort);



}






remoteIP = GUI.TextField(Rect(120,10,100,20),remoteIP);



remotePort =
par
seInt(GUI.TextField(Rect(230,10,40,20),remotePort.ToString()));


}


else


{



var ipaddress = Network.player.ipAddress;



var port = Network.player.port.ToString();



GUI.Label(Rect(140,20,250,40), "IP Address: " +ipaddress +
":" + port);



if (GUI.Button(
Rect(10,10,100,50), "Disconnect"))



{




Network.Disconnect(200);



}


}

}


function OnConnectedToServer()

{


for (var go : GameObject in FindObjectsOfType(GameObject))


{



go.SendMessage("OnNetworkLoadedLevel",
SendMessageOptions.DontRequireReceiver);


}

}

13

|
P a g e


C++ Source Code

For all C++ Source code, please view the following files:



SampleClient.cpp



Networking.cpp



Networking.h

They can be found in the same .zip file as this report.



14

|
P a g e


Instruction Manual

A How to Guide for “The Spine”

Step

Details

1

Go to the

UOIT Gaming Lab

The motion capture rig is used to play the game.
Since it is not possible to relocate the rig, the game
must be played in the gaming lab.




2

Turn on the Motion Capture Rig
computer and open the Arena software

This computer has all the

software needed to run the
game. It is also the only computer that has all the
cameras hooked up to it.




3

Configure the cameras on the rig using
Arena

The cameras on the rig are very sensitive. The
slightest touch on the rig will make the
calibration
wrong. This is very important. The cameras are very
sensitive to objects that are shiny, so make sure to
keep things like that covered up or out of view.

Once
they are positioned, use the magic wand to finish
configuration!




4

Set the ori
gin

Arena needs to know where your point of origin is!
There is a tool in the lab for doing just that. Place it in
the middle of the capture field
.




5

Suit up

Have your designated player suit up in the motion
capture suit. Due to the height of the
ceiling in the
lab, there is a height restriction of roughly 5’10”.
Anyone taller than that will not fit in the suit
.




6

Configure the suit using Arena

There are markers all over the suit that the cameras
pick up on. Arena will help you to place them
where
they are needed if they aren’t where they should be.




7

Open Unity and open the game project

Run the Unity engine and open the game project.
This will load all the necessary things to run the game.




8

Run the game

Hit the play button at the
top of the screen.




9

Play the game and have fun!

Enjoy your experience with The Spine! We hope are
able to take away the proper techniques and put
them into practice in real life!




15

|
P a g e


Sources

1
http://answers.unity3d.com/questions/8128/unity
-
project
-
and
-
3rd
-
party
-
apps/8183#8183

-

Code used for networking purposes