Difference between revisions of "Apex Page"

From CDOT Wiki
Jump to: navigation, search
(Work Breakdown and Progress)
(Work Breakdown and Progress)
 
(8 intermediate revisions by the same user not shown)
Line 14: Line 14:
  
 
== Enhancement ==  
 
== Enhancement ==  
 
+
<br/>
 
 
 
'''Title: Multi-threaded Node Absolute Calculator'''
 
'''Title: Multi-threaded Node Absolute Calculator'''
  
Line 27: Line 26:
 
[[File:Node Absolute Calculator Result.jpg]]
 
[[File:Node Absolute Calculator Result.jpg]]
  
 +
<br/>
 
'''Enhancement Process'''
 
'''Enhancement Process'''
  
Line 42: Line 42:
 
** Before the function ''updateValues'' ends, threads are terminated through the ShutDown function of ''ThreadPool''.
 
** Before the function ''updateValues'' ends, threads are terminated through the ShutDown function of ''ThreadPool''.
  
 +
 +
'''Enhancement Description'''
 +
<br/>
 +
Multi-threading technology is used for calculating node absolute transformation in Emperor Engine which gives a performance enhancement. Every time the engine renders a scene with the nodes (which happens in NodeManager) it works through an iteration using a loop to update the absolute matrix sequentially. By using multiple threads, it works much faster and makes engine work in a more efficient way.
 +
<br/>
 +
<br/>
  
 
'''Work Load Division'''
 
'''Work Load Division'''
Line 52: Line 58:
  
  
'''Source Code Repository
+
'''Source Code Repository'''
'''[https://bitbucket.org/Apex_Page/scs_emperor https://bitbucket.org/Apex_Page/scs_emperor]
+
<br/>
 +
[https://bitbucket.org/Apex_Page/scs_emperor https://bitbucket.org/Apex_Page/scs_emperor]
 +
 
 +
<br/>
 +
 
  
<Multi-Thread Resources>
+
'''References'''
 +
* Multi-Thread Resources
  
 
[https://scs.senecac.on.ca/~oop345/pages/content/multi.html Multi-Threading of OOP345]
 
[https://scs.senecac.on.ca/~oop345/pages/content/multi.html Multi-Threading of OOP345]
Line 63: Line 74:
 
[http://www.cplusplus.com/reference/thread/thread/ std::thread]
 
[http://www.cplusplus.com/reference/thread/thread/ std::thread]
  
 
+
<br/>
 
+
* BitBucket Fetching a remote reference<br/>
 
+
https://help.github.com/articles/fetching-a-remote/<br/>
 +
<br/><br/>
 
<s>Sphere Collision or View Frustum Culling</s><br/>
 
<s>Sphere Collision or View Frustum Culling</s><br/>
 
<s><Sphere Collision Resources> <br/>
 
<s><Sphere Collision Resources> <br/>
Line 78: Line 90:
 
== Work Breakdown and Progress ==
 
== Work Breakdown and Progress ==
 
<br/>
 
<br/>
BitBucket Fetching a remote reference<br/>
+
'''Project completed'''<br/>
https://help.github.com/articles/fetching-a-remote/
+
Our team Apex, has finished Emperor_Engine Version 1.0. We completed testing it with Directx11 in release mode. There are also all four OpenGL lab codes filled in, and we have tried to re-implement all part OpenGL we need. However, due to the lack of time and some reasons related to materials and textures, this game engine with OpenGL does not work properly.
 +
 
 +
[[File:apex_version1.png]]
 +
 
 +
<br/>
 +
'''Engine enhancement completed'''<br/>
 +
Our team Apex has submit Engine Enhancement assignment with the tag "EngineEnhancement" on the group repository on Nov 27th, 2015.<br/>
 +
Please look at the section above in details.
  
  
 +
'''Lab completed'''
 +
*Ashley: Lab2, 4, 5, 7, 10, OpenGL lab8 and 9<br/>
 +
*Eunju:  Lab1, 3, 6, 8, 9, OpenGL lab7 and 10<br/>
 +
<br/>
 
'''Lab Workload Plan'''
 
'''Lab Workload Plan'''
 
*Anybody: lab1(Eunju)<br/>
 
*Anybody: lab1(Eunju)<br/>
Line 87: Line 110:
 
*Eunju: lab3,6,9<br/>
 
*Eunju: lab3,6,9<br/>
 
*<s>Frank: lab4,7,10</s><br/>
 
*<s>Frank: lab4,7,10</s><br/>
 
+
<br/>
'''Lab completed'''
 
*Ashley: Lab2, 4, 5, 7, 10<br/>
 
*Eunju: Lab1, 3, 6, 8, 9<br/>
 
 
 
  
 
{| class="wikitable sortable" border="1" cellpadding="5"
 
{| class="wikitable sortable" border="1" cellpadding="5"
Line 105: Line 124:
 
| Submit Proposal / Research Document || Group||  YES ||Friday October 16th, 2015
 
| Submit Proposal / Research Document || Group||  YES ||Friday October 16th, 2015
 
|-
 
|-
| Lab 4 || Ashley ||  Yes 2015-11-03 || 2015-10-16
+
| Lab 4 || Ashley ||  Yes 2015-11-03(late because of team member set back) || 2015-10-16
 
|-
 
|-
 
| Lab 5 || Ashley ||  Yes 2015-11-03 || 2015-11-03
 
| Lab 5 || Ashley ||  Yes 2015-11-03 || 2015-11-03
Line 117: Line 136:
 
| Lab 9 || Eunju ||  Yes 2015-11-26 || 2015-11-27
 
| Lab 9 || Eunju ||  Yes 2015-11-26 || 2015-11-27
 
|-
 
|-
| Lab 10 || Ashley || 2015-12-04 ||2015-12-04
+
| Lab 10 || Ashley || Yes 2015-12-04 ||2015-12-04
 
|-
 
|-
| OpenGL Lab7 || Ashley|| 2015-12-04 ||2015-11-13
+
| OpenGL Lab7 || Eunju || Yes Code 2015-12-13 ||2015-11-13
 
|-
 
|-
| OpenGL Lab8 || Eunju || 2015-12-04 ||2015-11-20
+
| OpenGL Lab8 || Ashley || Yes Code 2015-12-13 ||2015-11-20
 
|-
 
|-
| OpenGL Lab9 || Eunju || 2015-12-04 ||2015-11-27
+
| OpenGL Lab9 || Ashley || Yes Code 2015-12-13 ||2015-11-27
 
|-
 
|-
| OpenGL Lab10 || Ashley|| on final testing ||2015-12-04
+
| OpenGL Lab10 || Eunju|| Yes Code 2015-12-13 ||2015-12-04
 
|-
 
|-
| Submit Engine Enhancement|| Group||  YES ||Friday November 27th, 2015
+
| Submit Engine Enhancement|| Group||  YES ||Friday December 4th, 2015
 
|-
 
|-
| Submit Project (completed engine) || Group||  On final testing ||Sunday December 13th, 2015
+
| Submit Project (completed engine) || Group ||  YES ||Sunday December 13th, 2015
 
|-
 
|-

Latest revision as of 23:47, 13 December 2015

GAM531 Engine Assignment

Game Engine Apex

Repository

https://bitbucket.org/Apex_Page/

Team Members

  1. Erquan Bi
  2. Eunju Han
  3. Ferenc Botos
  4. eMail All

Enhancement


Title: Multi-threaded Node Absolute Calculator


Enhancement Result

  • The frame flow is very smooth due to the transformation of the node chains which are updated concurrently and efficiently during rendering instead of being done sequentially.
  • The program runs significantly faster. To show improved performance of the Emperor Engine, we used Performance and Diagnostic tool in Visual Studio on a lab computer. It shows that by using multiple threads, performance has improved 10 times.

Node Absolute Calculator Result.jpg


Enhancement Process

  • Class ThreadPool
    • An object of ThreadPool class is created at its initialization to accept threads in a vector called threads.
    • The number of threads depends on the number of the computer core systems, it can be obtained at the run time through std::thread::hardware_concurrency() in ThreadPool constructor.
    • The threadPool is a queue holding jobs which are defined as std::function, and a job is added into threadPool in AddJob function.
    • std::mutex and std::condition_variable is used to lock and unlock threads status and to wake threads respectively. In addition to, two bool type variables (quit and stopped) are flags to decline a new job while the thread pool is shutting down.
    • In Run function, the threadPool dispatches a job to each thread to be finished one by one until all jobs are done or the program is terminated.
    • The ShutDown function wakes all threads up and makes them join to be terminated.
  • To Use the Threads
    • When the NodeManager performs the function updateValues for each active object from the vector activeObjects, jobs(active objects(Node)’ _updateAbs function) are added to the queue threadPool waiting to calculate node’s absolute transformation.
    • While adding jobs, one slept thread from the thread pool wakes up, and performs the Run function subsequently.
    • Before the function updateValues ends, threads are terminated through the ShutDown function of ThreadPool.


Enhancement Description
Multi-threading technology is used for calculating node absolute transformation in Emperor Engine which gives a performance enhancement. Every time the engine renders a scene with the nodes (which happens in NodeManager) it works through an iteration using a loop to update the absolute matrix sequentially. By using multiple threads, it works much faster and makes engine work in a more efficient way.

Work Load Division

  • Member 1(Erquan (Ashley) Bi)
    • Worked on how many threads are needed and how they are being divided and dispatched form the thread pool to a vector of threads for each core to calculate node absolute transformation.
  • Member 2 (Eunju Han)
    • Managed threads’ running and termination with determined threads and Merged code with Ashley’s work and tested with the client program (Lab8).


Source Code Repository
https://bitbucket.org/Apex_Page/scs_emperor



References

  • Multi-Thread Resources

Multi-Threading of OOP345

C++ Multithreading Tutorial

std::thread


  • BitBucket Fetching a remote reference

https://help.github.com/articles/fetching-a-remote/


Sphere Collision or View Frustum Culling
<Sphere Collision Resources>
SIMPLE SPHERE-SPHERE COLLISION DETECTION AND COLLISION RESPONSE

3D Collision detection (C++) - Miguel Casillas

Pool Hall Lessons: Fast, Accurate Collision Detection Between Circles or Spheres

What is a good algorithm to detect collision between moving spheres?

Work Breakdown and Progress


Project completed
Our team Apex, has finished Emperor_Engine Version 1.0. We completed testing it with Directx11 in release mode. There are also all four OpenGL lab codes filled in, and we have tried to re-implement all part OpenGL we need. However, due to the lack of time and some reasons related to materials and textures, this game engine with OpenGL does not work properly.

Apex version1.png


Engine enhancement completed
Our team Apex has submit Engine Enhancement assignment with the tag "EngineEnhancement" on the group repository on Nov 27th, 2015.
Please look at the section above in details.


Lab completed

  • Ashley: Lab2, 4, 5, 7, 10, OpenGL lab8 and 9
  • Eunju: Lab1, 3, 6, 8, 9, OpenGL lab7 and 10


Lab Workload Plan

  • Anybody: lab1(Eunju)
  • Ashley: lab2,5,8
  • Eunju: lab3,6,9
  • Frank: lab4,7,10


Tasks Assigned Completed Status Due date
Lab 1 Eunju Yes 2015-09-25 2015-09-25
Lab 2 Ashley Yes 2015-10-02 2015-10-02
Lab 3 Eunju Yes 2015-10-17 2015-10-09
Submit Proposal / Research Document Group YES Friday October 16th, 2015
Lab 4 Ashley Yes 2015-11-03(late because of team member set back) 2015-10-16
Lab 5 Ashley Yes 2015-11-03 2015-11-03
Lab 6 Eunju Yes 2015-11-07(1 min late because of merging issue) 2015-11-06
Lab 7 Ashley Yes 2015-11-13 2015-11-13
Lab 8 Eunju Yes 2015-11-20 2015-11-20
Lab 9 Eunju Yes 2015-11-26 2015-11-27
Lab 10 Ashley Yes 2015-12-04 2015-12-04
OpenGL Lab7 Eunju Yes Code 2015-12-13 2015-11-13
OpenGL Lab8 Ashley Yes Code 2015-12-13 2015-11-20
OpenGL Lab9 Ashley Yes Code 2015-12-13 2015-11-27
OpenGL Lab10 Eunju Yes Code 2015-12-13 2015-12-04
Submit Engine Enhancement Group YES Friday December 4th, 2015
Submit Project (completed engine) Group YES Sunday December 13th, 2015