Origin Engine banner

Origin Engine

15 devlogs
80h 58m 41s

https://origin.aloyak.dev
Origin is a true-3D-pixelart Game Engine written from scratch in beautiful C++. As it uses OpenGL, it supports Windows, Mac and Linux as well as Web (yes!, it can be also compiled to WebAssembly thanks to emscripten). Us…

https://origin.aloyak.dev
Origin is a true-3D-pixelart Game Engine written from scratch in beautiful C++. As it uses OpenGL, it supports Windows, Mac and Linux as well as Web (yes!, it can be also compiled to WebAssembly thanks to emscripten). Uses SDL2, GLM, stb_image and assimp (and many other libs)

This project uses AI

Used Claude to help me with fancy C++20 slop like smart pointers, templates, and similar stuff. Also used gh copilot for in-line completions

Demo Repository

Loading README...

Eric

Tagged your project as well cooked!

🔥 Eric marked your project as well cooked! As a prize for your nicely cooked project, look out for a bonus prize in the mail :)

aloyak

Shipped this project!

Hours: 84.52
Cookies: 🍪 1702
Multiplier: 20.14 cookies/hr

https://origin.aloyak.dev/game

Hello,
This project has been so much fun to build and I’ve learnt a lot in the process, you can download the game and the sandbox from the github page but its also possible to play a web version of the game in the given link.
Hope you like my project!!!
Thank you

4loyak!

aloyak

Origin Engine

https://origin.aloyak.dev

This is probably gonna be the last devlog to the first ship! I’ve been working on refinements and small improvements to have a nice little release version, the development is of course not still over, I still got a lot of ideas and work to do, I’ll explain that a bit further down.
I’ve also made some good progress to the physics system but its still a bit broken, I’ll need to investigate that later on

full changelog:

  • Added Windows Support! after a few changes that prevented the windows api from working, origin engine is officially supported! (this time was not logged unfortunately)
  • Added the Mesh Collider on the rigidbody component, although not very optimized currently
  • Added a status bar to the sandbox and moved all logging to an in-house logging class instead of using spdlog
  • Added OpenLastScene option to the sandbox

These are the last changes to the first shipped version (0.12.1), after this first ship I’d like to improve the physics system a lot and make some collision callbaks. Also I’ve been reading a bit on how to implement a simple audio system.
Thank you!

Attachment
0
aloyak

Origin Engine

https://origin.aloyak.dev

It’s been a frustrating headache to add something as simple as icons to the sandbox editor but I finally got it working, the bug was that the default icon pack was being merged with the icon pack and so half of the icons wouldn’t work because they would be displayed as the normal font.
I’ve also fixed some small things in the physics system, more info in the changelog.

full changelog:

  • Added Icons to the Sandbox Editor, using lucide static ttf file
  • Fixed Syncronization between physics-space rotation and the objects rotation, now simulations look more natural overall, there’s still some small problems tho.
  • Added More ShortCuts like Editor Camera Speed Control with the Mouse’s scrollwheel (had to update the input class)
  • Updated the Demo Game to showcase physics, you should try it out! (in the new physics-demo branch)

I’m working in an efficient system to add a mesh collider and to maybe start a sound system but I don’t want to leave stuff mid development!!
This is officially Origin 0.12.0 btw.

Attachment
0
aloyak

Origin Engine

https://origin.aloyak.dev

Today’s devlog is split into two parts, because I’ve been working on two different things. The sandbox is becoming something pretty exciting and fairly easy to use but powerful, and its quite easy to work with it at it literally is just like any other game, only a bit more special. On the other side, I’ve been working on a physics system based on Bullet3 Physics simulations, its not finished tho

full changelog:

Sandbox

  • Added user settings, stored in a simple json file that tracks your recently open scenes and other preferences
  • Added a search bar to Scene Hierarchy
  • Added Entity Duplication
  • Added Physics simulation settings, toggle/reset/keep…
  • Added Collider Debug Gizmos
  • Fixed Component Names

Engine

  • Added the Rigidbody Component!
  • Included Basic Physics System based on Bullet3, including simple collisions (basic Colliders), gravity and different body types (dynamic, static and kinematic)
  • Added ‘Rotation’ Property to the Skybox Component
  • Added Metallic Map to Materials
  • Fixed Keycodes

Overall its being really difficult getting the math right so that the bullet3 API would understand what I want it to do, and its not perfect yet (you can see that in the video), but im happy with the current solution. I’ll continue working on this right after I publish this devlog. Also I want to add Shader precompiling now.

Thanks for reading, Cya!

0
aloyak

Origin Engine

https://origin.aloyak.dev

I’ve been stuck for a couple days because adding shadows seemed to be a lot harder than what I thought, so I don’t really think they’re gonna be implemented in a while. I’ve focused on refining and improving some systems and adding small features after trying to add shadow maps for the third time…

Even though this was frustrating I at least now know where to continue progressing the engine.

full changelog:

  • Fixed Web Builds as shaders weren’t compiling properly
  • Updated the demo game to showcase lighting (https://origin.aloyak.dev/game/)
  • Improved the Sandbox’s Action System, unified shortcuts and menu actions (and added a light theme)
  • Added a lot of options to the material settings of the renderer component, so UV editing, Base Color, Shininess…
  • Added normal map support (basic) to materials
  • Added Gamma Correction, enabled by default
  • Incorporated Bullet3 to the engine, this will be the future Phyisics API.
  • Added a simple raycast feature that works half of the time, used in the sandbox to click on the entities you want to use.

I’m currently going through the Bullet3 API and considering adding proper physics to the engine, hopefully it isn’t as hard as with the shadows :)))

Attachment
0
aloyak

Origin Engine

https://origin.aloyak.dev

It was very painful, but I got a basic website up and running to give some small information about the engine, the plan is to expand it later but for now its good enough.
I used vite + tailwind to make the workflow as easy for my as possible and I also went for nes-css to match the pixelart style of the engine itself.

I haven’t changed the demo game but that will probably come shortly after this, I think the web build is broken currently but it should be too hard to fix (please)

Attachment
2

Comments

tunnor
tunnor about 1 month ago

Looks great! I really love the asthetic of the engine as well!

aloyak
aloyak about 1 month ago

thank you!!

aloyak

Origin Engine

https://origin.aloyak.dev/game

I’ve been cooking some great shaders and after reading a lot of other people’s implementation (and learnopengl.com ofc) so I can say I managed to add simple lighting to the Origin Engine (Blinn-Phong implementation), currently there arent any kind of shadows or spotlights but I’ll try to add them later on.
I’ve also made a huge amount of progress on the sandbox editor!

full changelog:

  • Added Sandbox Styling + Fonts
  • Added Sandbox File Dialogs, to open/save/saveas your scene files cross-platform (web isnt supported by the sandbox, yet)
  • Added Sandbox Options & Shortcuts, like vsync, camera speed, entity options, about panel…
  • Added Point Lights!
  • Added Directional Lights!
  • Small improvements to the scene system

I normally say what I’m gonna be working on next here but I have no honest idea of what will be the next step, I’ll see if shadows viable or if I could maybe focus on something else for the next updates.
PS: I’m in love with how the sandbox editor ended up like lol

Attachment
Attachment
Attachment
2

Comments

Michelle
Michelle about 1 month ago

so cool

aloyak
aloyak about 1 month ago

ty!

aloyak

Origin Engine

https://origin.aloyak.dev/game

I’ve been working on structuring and organizing the project before going to more complex tasks (like lighting), a lot of problems I was able to spot (also thanks to Claude ofc) were fixed.

full changelog:

  • Added a simple Resource Manager that allows the engine to cache assets so loading is generally much faster
  • Splitted the engine class with a new renderer class, so that the engine class doesnt have any kind of opengl code at all and makes everything a bit easier to work with
  • Added the material class so the renderer doesn’t need the shaders themselves but now it just works with the materials
  • Made the scene system a lot more memory safe, and created some methods to find entities in the scenes by name or index
  • Fixed the offscreen buffer not rendering to the screen when pixelart was disabled
  • Added some details to the sandbox’s properties window
  • Made the render order deterministic, so its always the same per frame
  • Organized the project in different dirs like core/ render/ debug/ input/ and renamed the component files

I know I said I wanted to update pixelart to make it the right way I think thats probably gonna be one of the last things I’m gonna do. Right now I’ve started making some custom shaders to explore lighting and I’m thinking about how to implement it properly
Also I need to study a bit my own code lol, I’m forgeting some stuff I wrote weeks ago

Attachment
0
aloyak

Origin Engine

https://origin.aloyak.dev/game

Its been a week of trying to upload a demo game to the internet and finally there is a working link! After trying many services and applying some interesting solutions (like creating a gh pages website with forced LFS support) i managed to get this “game” up and running. Currently it takes a little bit to download the game assets/shaders/etc and a lot more to load them into the engine, but overall, it works!

Full changelog:

  • Uploaded demo website (please check it out!!)
  • Moved SDL2 logic to its own window class, good organization improvement.
  • Improved Sandbox with scene movement and component inspector
  • Fixed Pathing, it now supports cross-platform paths and binary relative assets, this also helped a lot when working with the sandbox.

There are a lot of challenges yet to come, but probably the next step will be to put the sandbox aside to add simple lighting and true pixel art (the right way).

Attachment
Attachment
0
aloyak

Origin Engine

Added TRUE 3D PIXEL ART!!!!!

This is not an effect, but real 3D pixel art! The engine renders everything to an offscreen buffer with very low resolution which is then stretched to cover the whole window (or you can use that buffer for whatever you want, like for example, a viewport window for the sandbox module im now working on).

Full changelog:

  • 3D pixel art rendering.
  • Simple color depth function which allows you to limit the number of colors rendered (to choose from 4, 8, 16, or 32-bit colors, the screenshot is at 8-bit).
  • I’ve also been working on a simple wobly effect like the ps1 models have but I don’t really like the result right now.

Adding the offscreen buffer is going to make the sandbox a lot easier to create, but I first need to fix some problems with relative paths and stuff (and make loading assets quicker)

Attachment
0
aloyak

Origin Engine

I added a very simple scene system based on json serialization. The engine now supports loading/unloading/saving scene files fairly quickly. This will also make the sandbox module a lot easier to create as it would just really be a json modifier with a nice UI. This system allows you to create entities inside scenes but also off-scene entities that are not linked to any scene in particular, so if a scene is unloaded your player entity (for example) won’t get unloaded with it.

Next I would like to add a “skybox” component so my scenes don’t look so empty and sad :((
Also I need to check for Windows Support, which should be working nicely but I don’t I need to borrow a windows computer. I need help testing for MacOS support!!!

Attachment
0
aloyak

Origin Engine

Finally Added Web Support, switching to SDL2 was such a good decision. It now uses OpenGL ES strictly for web and OpenGL 4.1 for desktop.

  • Firefox works well, Input seems to be broken on Brave

  • Chrome and Safari are not yet tested!

  • I also added some more test assets and fixed some bugs.

  • Added some window settings like VSync and Fullscreen options. Performance seems nice but it will probably need optimization (mostly with assimp)

I’m now trying to upload a simple game to my website but I’m kinda struggling…
I want to add skyboxes and other stuff but I think it would be better to add a scene system first. And of course I need to start making the pixel art stuff at some point.

1

Comments

aloyak
aloyak about 2 months ago

For any future web demos -> https://origin.aloyak.dev

aloyak

Origin Engine

There’s a video next to the screenshot!!

I made quite a lot of progress! In order to make web support easier.

  • I had to drop GLFW and instead work with SDL2, it makes everything so much easier and it was relatively ez to port, and no game changes needed!
  • Made Compiling + Cmake a lot faster by removing Tests and Docs from all the libraries
  • Made the Model class now use the Texture class and implemented a simple cache system so a texture can’t be used twice, which saves time. Claude helped me out because this took many smart pointers
  • Very important: Created an Entity/Component system which uses templates so its very easy to add new components, right now only the Render, Camera and Transform components exist, but its enough to make the demo on the video work

After this I will try to make emscriptem work now that SDL2 is here…

Attachment
0
aloyak

Origin Engine

It took a long while to learn how to use assimp, but know my engine supports reading directly .obj files and rendering them, although it takes some time to load them (way too long). After this I want to “standardize” everything into an entity/component system.
This model was made by crytek and the video is my engine rendering that model. May cause dizziness (sorry)
In a bit I’ll try to make the WebGL support to make a sort of demo public, we’ll see tho, stay tuned!

3

Comments

aloyak
aloyak about 2 months ago

PS: I also created a nice logo using Gimp!!

sl4shed
sl4shed about 2 months ago

yo this project is really cool

aloyak
aloyak about 2 months ago

Thank you!

aloyak

Origin Engine

Hello!, After a few days of reading documentations (ty! learnopengl.com) I have this basic demo working. Simple but cool and I’ve learnt a lot over these last few days (mostly perspective matrices math and shader programming)

I’m making a super basic true-3D-pixelart game engine. It supports OpenGL but will possibly add WebGL support in the future, the project is currently divided into a ‘game’ module and an ‘engine’ module, but I think it would also be cool to add a sandbox…

This is a very simple demo using the engine to make a hardcoded cube rotate in from of a camera. After this I will probably add a texture class and keep going!

0