Changes

Jump to: navigation, search

Apex Page

4,063 bytes added, 00:47, 14 December 2015
Work Breakdown and Progress
# [mailto:ebi@myseneca.ca?subject=GAM531 Erquan Bi]
# [mailto:ejhan4@myseneca.ca?subject=GAM531 Eunju Han]
<s># [mailto:flbotos4@myseneca.ca?subject=GAM531 <s>Ferenc Botos]</s>]
# [mailto:ebi@myseneca.ca;ejhan4@myseneca.ca;flbotos4@myseneca.ca?subject=GAM531 eMail All]
== Enhancement ==
assignment enhancement option<br/>'''Title: Multi-threaded Node Absolute Calculator'''
Multi-threaded Node Absolute Calculator
'''Enhancement Result'''
<Multi-Thread Resources>* 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.
[https://scs.senecac* The program runs significantly faster.To show improved performance of the Emperor Engine, we used Performance and Diagnostic tool in Visual Studio ona lab computer.ca/~oop345/pages/content/multiIt shows that by using multiple threads, performance has improved 10 times.html Multi-Threading of OOP345]
[https[File://solarianprogrammerNode Absolute Calculator Result.com/2011/12/16/cpp-11-thread-tutorial/ C++ Multithreading Tutorialjpg]]
[http:<br//www.cplusplus.com/reference/thread/thread/ std::thread]>'''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'''<sbr/>Sphere CollisionorMulti-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/>View Frustum Culling<br/s>
'''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'''<s><Sphere Collision Resourcesbr/>[https://bitbucket.org/Apex_Page/scs_emperor https://bitbucket.org/Apex_Page/scs_emperor]
<br/>
 
'''References'''
* Multi-Thread Resources
 
[https://scs.senecac.on.ca/~oop345/pages/content/multi.html Multi-Threading of OOP345]
 
[https://solarianprogrammer.com/2011/12/16/cpp-11-thread-tutorial/ C++ Multithreading Tutorial]
 
[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 Resources> <br/>
[https://studiofreya.com/3d-math-and-physics/simple-sphere-sphere-collision-detection-and-collision-response/ SIMPLE SPHERE-SPHERE COLLISION DETECTION AND COLLISION RESPONSE]
[http://www.miguelcasillas.com/?mcportfolio=collision-detection-c 3D Collision detection (C++) - Miguel Casillas]
 
[http://www.gamasutra.com/view/feature/131424/pool_hall_lessons_fast_accurate_.php Pool Hall Lessons: Fast, Accurate Collision Detection Between Circles or Spheres]
== Work Breakdown and Progress ==
<br/>
BitBucket Fetching a remote reference'''Project completed'''<br/>httpsOur 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/help>Our team Apex has submit Engine Enhancement assignment with the tag "EngineEnhancement" on the group repository on Nov 27th, 2015.github<br/>Please look at the section above in details.com/articles/fetching-a-remote/
 '''Lab completed'''*Ashley: Lab2, 4, 5, 7, 10, OpenGL lab8 and 9<Lab workloadbr/>*Eunju: Lab1, 3, 6, 8, 9, OpenGL lab7 and 10<br/> <br/>'''Lab Workload Plan'''
*Anybody: lab1(Eunju)<br/>
*Ashley: lab2,5,8<br/>
*Eunju: lab3,6,9<br/>
*<s>Frank: lab4,7,10</s><br/><br/>
{| class="wikitable sortable" border="1" cellpadding="5"
| Lab 3 || Eunju || Yes 2015-10-17 || 2015-10-09
|-
| Submit Proposal / Research Document || Group|| NO YES ||Friday October 16th, 2015
|-
| Lab 4 || <s>Frank</s> 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 7 8 || FrankEunju || NO Yes 2015-11-20 || 2015-11-1320
|-
| Lab 8 9 || Ashley Eunju || NO Yes 2015-11-26 || 2015-11-2027
|-
| Lab 9 10 || Eunju Ashley || NO Yes 2015-12-04 || 2015-1112-2704
|-
| Lab 10 OpenGL Lab7 || FrankEunju || NO Yes Code 2015-12-13 ||2015-1211-0413
|-
| OpenGl Lab1 OpenGL Lab8 || none Ashley || NO Yes Code 2015-12-13 ||Week 132015-11-20
|-
| OpenGL Lab2 Lab9 || none Ashley || NO Yes Code 2015-12-13 ||Week 132015-11-27
|-
| OpenGL Lab3 Lab10 || none Eunju|| NO Yes Code 2015-12-13 ||Week 132015-12-04
|-
| Submit Engine Enhancement|| Group|| NO YES ||Friday November 27thDecember 4th, 2015
|-
| Submit Project (completed engine) || Group|| NO YES ||Thursday Sunday December 10th13th, 2015
|-
108
edits

Navigation menu