Skip to content

drecuk/ABM-Basics-OpenGL

Repository files navigation

ABM-Basics-OpenGL

Agent-Based Modelling Chapter One: C++ integration with OpenGL and SDL

Topic: Object-Oriented C++ integration with SDL and OpenGL for Agent-Based Modelling (ABM)

Author: Eugene Ch'ng Academic Blog

Purpose: Prepared for the ERC Advanced Research Grant 'Lost Frontiers' Scalable Agent-Based Modelling Team Training.

Audience: For students and researchers needing a quick approach to learning agent-based modelling foundation for C++ and OpenGL

INTRODUCTION

The series of C++ code in this repository was created as a result of a need to equip team members working in the ERC 'Lost Frontiers' Advanced Research Grant with the basics of working with C++ codes, integrating both OpenGL 3.0 and SDL 2.0. As such, the code posited within each folder is designed to lead any developer with a basic understanding of C++ syntax towards the foundational knowledge of designing agent-based modelling codes, using SDL at first, continuing with the basic of OpenGL, and ending with the integration of OpenGL, SDL and Object-Oriented Programming in C++.

The series of code will also be useful for developers and students intending to understand how to developed agent-based simulation, games, and etc with C++, SDL and OpenGL.

The series of code blocks within each folder are listed below. I suggest that beginners go through the sequence of code and avoid skipping folders for a more thorough understanding of how everything comes together into an ABM system.

  1. Installing Basic Libraries and tools: g++ Compiler, SDL2 and OpenGL
    1. SDL: Setting up and compiling your first SDL application
    1. SDL: Keyboard Events
    1. SDL: Mouse Events
    1. SDL: Loading a basic bitmap
    1. SDL: Combining image and event
    1. SDL: Displaying Text (Loading Other SDL Libraries)
    1. SDL: Using the Timer Function
    1. OpenGL: Your first OpenGL application with GLUT
    1. OpenGL: Drawing a rectangle with GLU
    1. OpenGL: Coordinate Systems, Matrix and Vectors (code view)
    1. OpenGL: Matrix transform (Positional)
    1. OpenGL: Matrix transform (Position + Rotational)
    1. OpenGL: Drawing a 3D Cube and Spinning It
    1. OpenGL: Pattern of a Simulation Loop
    1. OpenGL: Moving an OpenGL Square with SDL Events
    1. OpenGL: Moving and Rotating an OpenGL Square with SDL Events
    1. OpenGL: Realistic Movements with the Keyboard
    1. C++ OOP: Class Instantiation and Functions
    1. C++ OOP: Inheritance
    1. C++ OOP: Integration with OpenGL and SDL (with grid boundary)
    1. C++ OOP: Simple Autonomous Agents (with grid boundary)
    1. C++ OOP: Multiple Autonomous Agents (with array)
    1. C++ OOP: Debug View for Agent Field Of View and Steering System
    1. C++ OOP: Simple Predator-Prey Seek and Chasing Algorithm
    1. C++ OOP: Predator eats prey eats snacks
    1. C++ OOP: Implementing a Crude Camera Class
    1. C++ OOP: 3D Plane Test and Normals - Agents on Terrain Basics
    1. C++ OOP: Simple Terrain
    1. C++ OOP: Simple Terrain with predator-prey-snacks

SYSTEMS INTEGRATION AND SCALABILITY

ACKWNOWLEDGEMENTS

“This project has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme ( ERC funded project No. 670518 LOST FRONTIERS)”

About

Agent-Based Modelling Chapter Two: C++ integration with OpenGL and SDL

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages