After playing numerous games for so many years, and after coding for so many years, I finally decided to look under the hood, and started learning Graphics APIs.

I’ve used both Unity and Unreal, and Apple’s SceneKit (yes, it’s a game engine. LOL), then I thought, why not create my own in-house engine from scratch? It can be a good learning process as I will use 2 different Graphics APIs (OpenGL/DX12 and Metal) on 2 different platforms using 2 different languages (C++ for OpenGL/DX12 and Swift for Metal).

This series is not intended to be a tutorial, but a note about my progress, problems and advices.

To begin with, I started this project during WWDC 2018, and it’s been a week since then. I’ve already coded the very basics: Shaders, 3D shapes and stuff. Here’s a sneak peek of my engine and Xcode 10 in MacOS Mojave:

Screenshot 2018-06-13 at 10.44.53 PM.png

Some major problems I encountered during this week:

  • Refactoring the engine into Framework: When I was creating the metalLibrary, the function will look for the metallib inside the bundle which runs the game, not the framework, so I need to change the search path to the bundle that contains the engine framework.

To be honest, this was the only issue I had, then again, I didn’t really do much since I was busy with WWDC and my summer school just started this week. I will continue to update this blog in the future after I’ve done something noticeable on my engine.

My future plan on this series is that I will finish the Metal engine first, hopefully to a presentable level, and make a Minecraft clone with it. Not because I like Minecraft, I don’t, it’s because Minecraft has really simple textures, and everything is block, so I don’t have to deal with Blender or Maya, AutoCAD.

After the Metal series, I will move on to either DX12 or OpenGL, which will be done on Windows. I’ll think about it when the time comes, right now let’s just focus on Metal.

See you soon.