220 likes | 336 Views
An Exploration into Modular Core Game Systems : Improving Code Quality. by Stephen Phillips #0710108. The Aim. To improve quality of code by engineering low level communication between common game modules in an extensible manner.
E N D
An Exploration into ModularCore Game Systems:Improving Code Quality by Stephen Phillips #0710108
The Aim • To improve quality of code by engineering low level communication between common game modules in an extensible manner. • To create a streamlined and uniform interface for accessing and using these game modules. • To enable the seamless exchange of different middleware engines with minimal impact upon code reusability. by Stephen Phillips #0710108
The Objective • To produce a report on research pertaining to software metrics designed for complex object-oriented systems, and to software engineering patterns that are most applicable in the proposed solution of this project. • To support the efficacy and relevance of this research through a programming artefact which demonstrates the proposed architecture at a small scale. by Stephen Phillips #0710108
The Intent What problems do I seek to address by Stephen Phillips #0710108
The Intent The new game being developed Game by Stephen Phillips #0710108
The Intent Introduction of external middleware GUI Input Physics Game Rendering Audio by Stephen Phillips #0710108
The Intent Problem #1: Incompatibility at the data level Ogre Irrlicht Bullet Vector3 + float x + float y + float z vector3d<Type> + Type X + Type Y + Type Z btVector3 + getX() : float + getY() : float + getZ() : float - float[4] m_floats btVector3 pos(5.0f, 10.0f, 15.0f); Ogre::Vector3 meshPos(pos.getX(), pos.getY(), pos.getZ()); by Stephen Phillips #0710108
The Intent A further example of incompatibility Irrlicht IrrKlang vector3d<Type> + Type X + Type Y + Type Z vec3<Type> + Type X + Type Y + Type Z irr::core::vector3d<f32> pos(5.0f, 10.0f, 15.0f); irrklang::vec3d<f32> soundPos(pos.X, pos.Y, pos.Z); by Stephen Phillips #0710108
The Intent Problem #2: Complexity for the developer GUI Input Physics Game Rendering Audio by Stephen Phillips #0710108
The Intent Problem #3: Wasting and rewriting code Rendering (with GUI) Input Physics Game GUI Audio Rendering by Stephen Phillips #0710108
The Intent: Summary • There is no predefined method of transferring different data types between game modules, despite the similarities in their structure. • Using multiple external engines results in a complex set of interfaces for the developer. • Replacing a module with a similar one wastes any interface code written by the developer, despite the similarities in their functionality. by Stephen Phillips #0710108
The Proposal What does this project suggest as a solution by Stephen Phillips #0710108
The Proposal Modular abstraction of grouped middleware Game Game Core by Stephen Phillips #0710108
The Proposal Interactions made through Game Core module Game Game Core by Stephen Phillips #0710108
The Structure The lowest level interactions Irrlicht Havok Convert vector3d<float> hkVector4 Vector3 CMatrix4<float> hkMatrix4 Matrix4 quaternion hkQuaternion Quaternion by Stephen Phillips #0710108
The Structure The lowest level interactions Irrlicht Bullet Convert vector3d<float> btVector3 Vector3 CMatrix4<float> btMatrix4 Matrix4 quaternion btQuaternion Quaternion by Stephen Phillips #0710108
The Structure Swapping out different libraries //developer code #include <OgreModule.h> #include <HavokModule.h> #include<GameCore.h> int main(intargc, char *argv[]) { //external code return 0; } //Ogre module example #ifndef _OGREMODULE_H #define _OGREMODULE_H //Ogre-specific code... #endif //Havok module example #ifndef_HAVOKMODULE_H #define_HAVOKMODULE_H //Havok-specific code... #endif by Stephen Phillips #0710108
The Structure • Game Core Module header layout //Game Core module #ifdef _OGREMODULE_H #include “OgreInterface.h” #elif _IRRLICHT_H #include“IrrlichtInterface.h” #endif #ifdef_HAVOKMODULE_H #include“HavokInterface.h” #elif_BULLET_H #include“BulletInterface.h” #endif //Game Core code... by Stephen Phillips #0710108
The Theory Is there research to support this project Ali Mili, SherifYacoub, Edward Addy and HafedhMili Toward an Engineering Discipline of Software Reuse Concern for practice is no excuse for poor theory Empirical methods are no excuse for dispensing with analytical methods Scientific research ultimately affects and enhances practice by Stephen Phillips #0710108
The Limitations What feasibility issues restrict this project • Cannot predict additional requirements; must code in a way that can be iteratively improved • Scope must be defined; this project is not a self-contained engine like Unity • Middleware engines have similarities, but are all unique; developer must have some access by Stephen Phillips #0710108
The Test How can this project’s effectiveness be measured Chandrashekar Rajaraman and Michael R. Lyu Reliability and Maintainability Related Software Coupling Metrics in C++ Programs (1) Class Inheritance-related Coupling (CIC) (2) Class Non-Inheritance-related Coupling (CNIC) (3) Class Coupling (CC) (4) Average Method Coupling (AMC) by Stephen Phillips #0710108
Baker, Albert L., Bieman, James M., Fenton, Norman, Gustafson, David A., Melton, Austin and Whitty, Robin (1990) 'A Philosophy for Software Measurement' Iowa State University, Colorado State University, The City University (London), Kansas State University and Polytechnic of the South Bank (London) http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.73.4431&rep=rep1&type=pdf [16 February 2011] Bridger, Paul (2011) 'C++ Multithreading Tutorial' http://www.paulbridger.com/ [18 February 2011] Bruegge, Bernd and Dutoit, Allen H. (2003) Object-Oriented Software Engineering Using UML, Patterns and Java. USA: Prentice Hall http://books.google.co.uk/books?id=VYdf2ONuRZIC [7 November 2010] Grudin, Jonathan (1989) 'The Computer Reaches Out: The Historical Continuity of Interface Design' Department of Computer Science, Aarhus University http://www.ist-palcom.org/publications/PB/299/PB-299.pdf [2 November 2010] Hoffman, Douglas (2000) 'The Darker Side of Metrics' Software Quality Methods, LLC http://www.softwarequalitymethods.com/Papers/DarkMets%20Paper.pdf [8 November 2010] Huston, Vince (2010) 'Design Patterns' http://www.vincehuston.org/dp/ [7 November 2010] Kaner, Cem and Bond, Walter P. (2004) 'Software Engineering Metrics: What Do They Measure and How Do We Know?' IEEE. http://www.kaner.com/pdfs/metrics2004.pdf [8th November 2010] Liskov, Barbara and Zilles, Stephen (2000) 'Programming with Abstract Data Types‘ Massachusetts Institute of Technology and IBM Systems Development Division http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.136.3043&rep=rep1&type=pdf [5 November 2010] Martin, Robert C. (2002) Agile Software Development: Principles, Patterns, and Practices. USA: Prentice Hall [9 November 2010] Mili, Ali, Yacoub, Sherif, Addy, Edward and Mili, Hafedh (1999) 'Toward an Engineering Discipline of Software Reuse' Institute for Software Research, NASA Software Independent Verification and Validation Facility and University of Quebec http://www.raminsoftworx.com/elec443/lectures/reuse-3.pdf [16 February 2011] Nesnas, Issa A.D., Wright, Anne, Bajracharya, Max, Simmons, Reid, Estlin, Tara and Won Soo Kim (2004) 'CLARAty: An Architecture for Reusable Robotic Software‘ http://trs-new.jpl.nasa.gov/dspace/bitstream/2014/7235/1/03-0921.pdf [4 November 2010] Rajaraman, Chandrashekar and Lyu, Michael R. (2007) 'Reliability and Maintainability Related Software Coupling Metrics in C++ Programs' CS Department, The University of Iowa and Information Sciences and Technologies Research Lab, Bellcore http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.46.3055&rep=rep1&type=pdf [14 December 2010] Sallis, Philip, Tate, Graham and MacDonell, Stephen (1995) Software Engineering. England: Addison-Wesley [9 November 2010] Sametinger, Johannes (1997) 'Software Engineering with Reusable Components‘ Johannes Kepler University of Linz http://www.swe.uni-linz.ac.at/publications/pdf/TR-SE-97.04.pdf [7 November 2010] Shalloway, Alan and Trott, James (2005) Design Patterns Explained, Second Edition. USA: Pearson Education [16 February 2011] Shalloway, Alan (2010) 'The Net Objectives Design Patterns Repository' http://www.netobjectives.com/ [17 February 2011] Shaw, Mary, DeLine, Robert, Klein, Daniel V., Ross, Theodore L., Young, David M. and Zelesnik, Gregory (1995) 'Abstractions for software architecture and tools to support them‘ Computer Science Department, Carnegie Mellon University and affiliations http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.92.9998&rep=rep1&type=pdf [5 November 2010] Sommerville, Ian (2007) Software Engineering 8. England: Addison-Wesley [9 November 2010] by Stephen Phillips #0710108