Posts

Core Engine Part 2

Yesterday I got the View class up and running, and replaced any an all vector transformations in my rendering engine to an object's world-coordinate matrix. Now the job is to figure out how to communicate said transformations at the lower level, where things like object picking can be possible. The logic can be summarized at the moment into this: if(raycast intersects an interactive entity){     if(stack is empty)           -> Push start point and endpoint of ray to stack FIRST_CLICK     else if(stack == 1 && stack != 2)           -> Push start point and endpoint of ray to stack SECOND_CLICK     else           -> empty stack} else     ->empty stack The problem is, that the first if() condition make this method not really belong in the View class, which should only be responsible for input, not specific information about how to interpret the...

Core Engine Part 1

Part 1 of development of a core engine for the engine for Project Aigis. The role of the core engine is to receive player input, and any changes to send to the rendering engine. The core engine currently consists of two classes: View: Receives player input (key, mouse, scroll, clicks) and constructs a Camera object. It will maintain user options such as mouse sensitivity. It also maintains a stack of player mouse clicks, and stores the ray from the mouse at the first and second clicks. The game logic can do what it needs to (calculate for ray intersections, etc). The rendering engine will inherit the core engine. This will let the rendering engine handle nothing but drawing and rendering a scene, while the core engine handles the view and projection matrix. class View has: cursor_callback: Maintains a ray from the current mouse position. mouse_callback: Lets Camera process movement from mouse position. By default, it does nothing. DoClick: Maintains a boolean stack (stack ...

First Post

Image
Hello World, today is day 45 of development of the engine for Project Aigis. I decided to start this blog to organize my thoughts, and dump some pseudocode. The engine for Project Aigis currently supports: 2D Sprites Raycasting for sprites Loading models via ASSIMP GUI and True Type via NanoGUI A rendering engine A core engine The rendering engine is composed of the following: Scene: Batches all vertex and matrix information, calls relevant methods for binding and rendering. Shader: Loads and compiles a GLSL file. Model: Loads a wavefront model, loads its texture, indices, and processes their nodes. Mesh: Draws and renders the model TextureManager: Loads and binds a texture using Sean Barrett's stb_image.h VertexBuffer: Generates and binds VAOs, VBOs, EBOs, respective attributes (including instancing). RenderingPipeline: Renders all objects. The rendering engine's UML diagram is as follows: The black arrows depict composition. Currently, the rendering ...