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 size max is 2) of player mouse clicks. It stores the player's ray at the time of the click. If the stack is greater than two, then the stack empties.

Comments

Popular posts from this blog

Core Engine Part 2

First Post