Nearing the Finish Line: Rewriting the Untold Engine

I’ve been knee-deep in rewriting the Untold Engine, transitioning it from C++ to Swift. After months of coding, tweaking, and testing, I’m thrilled to share that the rewrite is almost done. Moving to Swift has been a game-changer, making the engine not only faster and more modern but much easier to work with.


Built on ECS Architecture

The Untold Engine is powered by Entity-Component-System (ECS) architecture. This design keeps the engine modular and scalable, separating the game logic into three straightforward parts:

Entities: These are the game objects (think players, cars, obstacles). Components: The data attached to entities, like meshes, physics, or animations. Systems: These handle the logic, such as rendering, animations, or physics calculations. This modular approach keeps everything clean and efficient, allowing developers to focus on their game logic instead of wrestling with tangled code.


Simplicity is Key: The API

When I started this rewrite, one of my biggest goals was to make the API as easy as possible to use. I’ve always believed that developers shouldn’t have to fight with the tools—they should just work.

With the new API, everything is intuitive and consistent. If you can remember createEntity() and setEntityMesh(), you can pretty much guess how the rest of the API works.

Here’s how you might set up a playable character:

// Step 1: Create the entity
let player = createEntity()

// Step 2: Add a mesh for the player
setEntityMesh(entityId: player, filename: "playerModel", withExtension: "usdc")

// Step 3: Enable physics for movement and gravity
setEntityKinetics(entityId: player)

// Step 4: Add collision detection
setEntityCollision(entityId: player)

// Step 5: Add animations for walking and running
setEntityAnimations(entityId: player, filename: "walkAnimation", withExtension: "usdc", name: "walking")
setEntityAnimations(entityId: player, filename: "runAnimation", withExtension: "usdc", name: "running")

The API is intentionally predictable. Want to add physics? setEntityKinetics(). Want collision? setEntityCollision(). It’s all designed to make game development as smooth as possible.


One Last Piece: The Collision System

With almost every system in place, I’m now working on the Collision System—the last big piece of this rewrite. This system will handle detecting interactions between entities, like when a player hits an obstacle or collides with another object.

Once the Collision System is complete, the engine will have everything it needs to handle realistic interactions, complementing the existing Physics System seamlessly.


What’s Next?

After wrapping up the Collision System, my focus will shift to finalizing the documentation and writing tutorials. I want to ensure that anyone—even those new to game development—can pick up the Untold Engine and start creating right away.

Rewriting this engine has been a long, challenging process, but it’s been worth every line of code. Moving to Swift has made the engine simpler, faster, and a joy to work with. I can’t wait to see what developers will create with it.

Stay tuned—big things are coming!

Check out the Untold Engine

Thanks for reading

Harold Serrano

Computer Graphics Enthusiast. Currently developing a 3D Game Engine.