1
0
Fork
You've already forked Buildo
0
Game engine that is currently being built with c using OpenGL + SDL2 for the renderer.
  • C 98%
  • GLSL 1.8%
  • Makefile 0.2%
Petros Katiforis f0a10c2c4b Polishing work
2025年12月25日 19:41:21 +02:00
documentation Tilemap Improvemens. Editor Work. More Docs 2025年09月07日 19:16:28 +03:00
images Polishing work 2025年12月25日 19:41:21 +02:00
res ECS System Redesign + Particle System 2025年09月14日 17:41:42 +03:00
src Polishing work 2025年12月25日 19:41:21 +02:00
.gitignore Updated .gitignore 2025年08月07日 09:48:35 +03:00
Makefile Now you can change scenes in editor 2025年08月14日 14:53:39 +03:00
README.md Polishing work 2025年12月25日 19:41:21 +02:00
themap.dat Polishing work 2025年12月25日 19:41:21 +02:00

Buildo Engine

About

Buildo is an ECS-based engine written in C.

OpenGL is used for the renderer, while SDL2 captures user input and is reponsible for window managment.

Feautures

Speed

Buildo is based on a few carefully selected libraries while everything else is written in plain C.

A custom made decoder/encoder has been made for QOI images (buildo only supports QOI image assets), freetype for text rendering and box2d for complex physics. Nevertheless, buildo works with its own "physics engine" even if it's still barebones.

Simplicity

As the engine is ECS-based, the interface is as simple as it gets. An nuklear-powered editor is also present, yet it is still under construction. In the future it will be much more useful (now only a tilemap can be made with it, while everything else still hasn't been implemented in its entirely)

A Ton of Abstractions

Here is a list fo things Buildo supports:

  • Custom Input Management System
  • Custom Event Handling System
  • Custom Scene Management System
  • Custom Physics
  • Custom Renderer
  • Custom Resource Manager
  • Custom Particle Generator / Tilemap Creator

Code Examples

  • Creating a Window
 bld_init_app(&app, "Buildo Core Demo", 600, 400);
  • Registering Keyboard Events
 bld_input_register(&app.input_mng, "moveR",
		 BLD_KEYBOARD_DEVICE, BLD_KEY_D,
		 NULL);

"NULL" refers to the modifier key. See the documentation for more information.

  • Making an entity
 ctx->back = bld_augeas_create_entity(aug->augeas, 0);
 bld_transform_component_t background_transform = {
	.position = {0, 0},
	.dimensions = {background_t->width, background_t->height},
	.scale = {1, 1},
 };
 bld_augeas_add_component(aug->augeas, ctx->back,
		"transform", &background_transform);
  • Adding Material to an Entity
 bld_material_component_t background_material = {
	.vao = base_vao,
	.texture = *background_t,
	.shader = shader,
 };
 bld_augeas_add_component(aug->augeas, ctx->back,
	 "material", &background_material);
  • Creating a System (ECS Architecture)
void bld_pipe_system_update(void *app_par, float dt, void *data)
{
 bld_augeas_context_t *aug_ctx = (bld_augeas_context_t *)app_par;
 bld_pipe_system_data_t *ctx = (bld_pipe_system_data_t *)data;
 size_t total_entities = bld_system_get_entities_length(ctx->system);
 for (size_t i = 0; i < total_entities; i++)
 {
 bld_entity id = ctx->system->entities[i];
 bld_transform_component_t *trans = bld_augeas_get_component_data(aug_ctx->augeas, id, 
 "transform");
 trans->angle += 1.0f;
 }
}

Demo Included

The repisitory provides a demo game that uses most of the engine's features.

Demo Game

Any Questions?

Take a look at the documentation folder in the root of the project.

Are there still questions? Send me an email at pioyi [at] mail [dot] com! I am always happy to answer.