@@ -18,7 +18,17 @@ the engine's internals.
1818
1919The engine is composed of many subsystems like ` Window ` , ` Input ` ,
2020` Audio ` , ` Engine ` , ` Logger ` , ` Ecs ` as well as custom opengl RAII
21- objects and a scene-graph.
21+ objects and a scene-graph. It also supports:
22+
23+ - hot reloading
24+ - GPU particles
25+ - loading TrueType fonts, textures, audio and .obj meshes
26+ - central asset management
27+ - scene graph
28+ - lua node scripting
29+ - GUI using ImGui
30+ - signals
31+ - point and directional lights
2232
2333To get a detailed look at the engine, please visit the
2434[ website] ( https://san7o.github.io/Brenta-Engine/ ) and code
@@ -33,140 +43,12 @@ The engine also features the following sub projects:
3343- [ san7o.github.io/Brenta-Engine/] ( https://san7o.github.io/Brenta-Engine/ ) : html website
3444
3545
36- ### Modular APIs
37-
38- ``` c++
39- auto engine = Engine::Builder()
40- .with(Logger::Builder()
41- .level(Logger::Level::debug)
42- .file(" /tmp/brenta-logs" ))
43- .with(Window::Builder()
44- .title(" brenta demo" )
45- .width(800 )
46- .height(600 )
47- .vsync()
48- .msaa())
49- .with(Gl::Builder()
50- .blending()
51- .cull_face()
52- .multisample()
53- .depth_test())
54- .build();
55- ```
56-
57- ### Model Loading
58-
59- ``` c++
60- auto model = Model::Builder()
61- .path(" assets/models/backpack/backpack.obj" )
62- .transform(Transform()
63- .translate(glm::vec3(1 .0f , 5 .0f , 2 .0f ))
64- .scale(glm::vec3(2 .0f , 1 .0f , 1 .0f )))
65- .build();
66- ```
67-
68- ![ image] ( https://github.com/user-attachments/assets/e4facf89-4256-4ecb-ae0e-9340aaf7b372 )
69-
70-
71- ### GPU Particles
72-
73- ``` c++
74- auto emitter = ParticleEmitter::Builder()
75- .with_camera(&camera)
76- .starting_position(glm::vec3(0 .0f , 0 .0f , 0 .0f ))
77- .starting_velocity(glm::vec3(0 .0f , 5 .0f , 0 .0f ))
78- .starting_spread(glm::vec3(3 .0f , 10 .0f , 3 .0f ))
79- .starting_time_to_live(0 .5f )
80- .num_particles(1000 )
81- .spawn_rate(0 .01f )
82- .scale(1 .0f )
83- .atlas_path(" assets/textures/particle_atlas.png" )
84- .atlas_width(8 )
85- .atlas_height(8 )
86- .atlas_index(3 )
87- .build();
88- ```
89-
90- ![ particles_short] ( https://github.com/user-attachments/assets/27d5ac09-00ce-4379-bf47-d16c24de9508 )
91-
92- ### Texture Animation using an Atlas
93-
94- ![ texture_atlas_short] ( https://github.com/user-attachments/assets/1a379fa5-741b-4087-a078-68a86a1fea98 )
95-
96- ### 3D Camera
97-
98- ``` cpp
99- auto camera = Camera::Builder()
100- .projection_type(Camera::ProjectionType::Perspective)
101- .position(Camera::Spherical::Builder()
102- .center({0.0f, 2.0f, 0.0f})
103- .phi(1.25f)
104- .theta(1.25f)
105- .radius(30.0f)
106- .build())
107- .fov(45.0f)
108- .build();
109- ```
110-
111- https://github.com/user-attachments/assets/f0ea502c-dc9e-4609-8322-641eb7d65a77
112-
113- Also collisions, lighting, text and audio!
114-
115- <h1 align=center> ECS </h1>
116-
117- Brenta Engine features an Entity Component System architecture. The
118- ECS is a design pattern that allows you to structure your code in a
119- way that is more modular and scalable.
120-
121- ### Entities
122-
123- Entities are objects in the game, it's just an ID. The `entity` class
124- helps you manage the entity, for example by attaching a component to
125- that entity, or removing the entity from the world.
126-
127- ```c++
128- Entity e = World::new_entity();
129- ```
130-
131- ### Components
132-
133- Components are pieces of data that are attached to an entity:
134-
135- ``` c++
136- struct PhysicsComponent : Component {
137- float mass;
138- float density;
139- glm::vec3 velocity;
140- glm::vec3 acceleration;
141-
142- PhysicsComponent() = default;
143- };
144-
145- // Somewhere
146- e.add_component<PhysicsComponent >(10.0f);
147- ```
148-
149- ### Systems
150-
151- Systems are functions that operate on entities with specific components. They
152- are called at each game tick by the `World`:
153-
154- ```c++
155- struct FPSSystem : System<None>
156- {
157- void run(std::vector<EntityId> _) const override
158- {
159- auto font = AssetManager::get_font("TextFont");
160- auto fps = std::to_string(Window::get_time().get_fps());
161- brenta::Text::render("FPS: " + fps,
162- 25.0f, 25.0f, 0.35f,
163- Color::yellow(), font);
164- }
165- };
166-
167- // To register the system
168- World::register_systems<FpsSystem>();
169- ```
46+ <h1 align =center > Screenshots </h1 >
47+
48+ <div align =" center " >
49+ <img src =" docs/screenshot1.png " />
50+ <img src =" docs/screenshot2.png " />
51+ </div >
17052
17153<h1 align =center > Building </h1 >
17254
0 commit comments