some architecture design thoughts i guess

This commit is contained in:
LunarAkai 2025-07-28 07:39:41 +02:00
commit 99162d8ab6
18 changed files with 49 additions and 6 deletions

View file

@ -1 +1,42 @@
# Moonhare Engine # Moonhare Engine
Game Engine written in Rust
(Currently this is just a fun side project, sooo if this engine works eventually, use it at your own risk :D)
## Architecture:
### Classes/Structs
#### Core
- [Core/Game](/docs/structs/core/Game.md)
- [Core/GameTime](/docs/structs/core/GameTime.md)
#### Graphics
-
#### Logger
-
#### Math
-
#### Window
- [Window/GameWindow](/docs/structs/window/GameWindow.md)
### Modules
- core
- graphics
- logger
- math
- Window
### Game Loop:
- Start Run
- (enter loop) ... -> Update -> Render -> Update ...
- Cleanup

0
docs/modules/core.md Normal file
View file

0
docs/modules/graphics.md Normal file
View file

0
docs/modules/logger.md Normal file
View file

0
docs/modules/math.md Normal file
View file

0
docs/modules/winit.md Normal file
View file

View file

View file

View file

View file

@ -2,7 +2,7 @@ use std::{ops::{ControlFlow, DerefMut}, sync::Mutex};
use glium::{glutin::surface::WindowSurface, winit::{self, event::{self, WindowEvent}, event_loop::{self, EventLoop}, window::Window}}; use glium::{glutin::surface::WindowSurface, winit::{self, event::{self, WindowEvent}, event_loop::{self, EventLoop}, window::Window}};
use crate::{game, game_plugin::GamePlugin, winit::winit_window::WinitWindow, ENGINE_NAME}; use crate::{game_plugin::GamePlugin, window::winit_window::WinitWindow, ENGINE_NAME};
pub struct Game { pub struct Game {

View file

@ -0,0 +1 @@
pub mod game;

View file

View file

@ -1,11 +1,12 @@
pub mod vertex; pub mod vertex;
pub mod game; pub mod core;
pub mod game_plugin; pub mod game_plugin;
pub mod winit; pub mod window;
pub mod logger; pub mod logger;
const ENGINE_NAME: &str = "Moonhare Engine"; const ENGINE_NAME: &str = "Moonhare Engine";
pub struct CPointer<T>(T); pub struct CPointer<T>(T);
impl<T> Drop for CPointer<T> { impl<T> Drop for CPointer<T> {

View file

View file

@ -1,7 +1,7 @@
use glium::{backend::glutin::SimpleWindowBuilder, glutin::{display::GetGlDisplay, surface::WindowSurface}, winit::{self, dpi::LogicalSize, event_loop::{ActiveEventLoop, EventLoop}, raw_window_handle::HasDisplayHandle, window::{Window, WindowAttributes}}, Display}; use glium::{backend::glutin::SimpleWindowBuilder, glutin::{display::GetGlDisplay, surface::WindowSurface}, winit::{self, dpi::LogicalSize, event_loop::{ActiveEventLoop, EventLoop}, raw_window_handle::HasDisplayHandle, window::{Window, WindowAttributes}}, Display};
use crate::winit::window_config::WindowConfig; use crate::window::window_config::WindowConfig;
use crate::ENGINE_NAME; use crate::ENGINE_NAME;

View file

@ -2,7 +2,7 @@ use std::fs::read_to_string;
use glium::{index::NoIndices, Frame, Program, VertexBuffer}; use glium::{index::NoIndices, Frame, Program, VertexBuffer};
use glium::{uniform, Surface}; use glium::{uniform, Surface};
use moonhare_engine::{game::Game, game_plugin::GamePlugin, vertex::Vertex}; use moonhare_engine::{core::game::Game, game_plugin::GamePlugin, vertex::Vertex};
struct PlaygroundGame { struct PlaygroundGame {
t: f32, t: f32,