During the project a general framework for building games/simulations was developed, using C++11 template programming to provide an easily used Entity System-architecture to manage in-game objects. A rendering system capable of handling large amount of objects without any direct optimizations was also developed alongside the Entity System. The rendering system can manage rendering of large numbers of objects, as well as high quality real-time shadows cast by objects and terrain. A rudimentary world generator based on simplex noise for the terrain generation, and rejection sampling based growth placement.
The project was performed as a part of the course TSBK03 - Techniques for advanced computer games. The code is written in C++11 and GLSL version 150. We use Qt 5.1 as OpenGL wrapper and context provider and OpenCV for some mathematical operations and Filtering.
https://github.com/Epipolarna/ExtrapolateAndConquer
6. OUR ENTITY SYSTEM
• Compile time verification
• Component dependencies
• Code generation
• Reference based access everywhere
• All components are allocated continous in memory
7. ENTITY SYSTEM
COMPILE TIME VERIFICATION
• Components used as part of the Entity System in the code must have been added to the
Entity System.
• Example of usage
8. ENTITY SYSTEM
EXAMPLE
• Component (part of SpherePhysics component)
• Example System (not actually used...)
9. ENTITY SYSTEM
FEATURES
• Component dependencies
• Used to gurantee run-time integrity of systems.
• Code generation based on component dependencies
• Template Meta Programming used to only generate the code necessary.
• Which other components should be checked and added.
• Which other components should be checked and removed.
• If a removed component was required by another component, then this
component should also be removed, recursively...
14. MÅNGA OBJEKT & PARTIKELFYSIK
• De flesta objekt rör sig inte (vegetation), transformationerna beräknas bara en gång.
• Entity systemet tillåter snabb batchning av fysiken med maximal cache-användning
• Fysikkomponenterna ligger kontinuerligt i minnet
• Endast en få-instruktions branchning.
• i5 med Radeon HD 6800, ~60fps
• 500 lavabollar
• 3000 träd
• 13000 Buskar