Languages required to develop a game engine

A while ago I responded to a question on Quora regarding which languages are required to develop a game engine. In this post, I want to expand on my answer.

The one thing to keep in mind while developing a game engine is EFFICIENCY. And it was the closeness of C++ to the bare metal that finalized my decision to use it as the primary language of Untold Engine. The other motive was my desires to learn C++ at a deeper level.

Collision Detection is the most expensive operation in a game engine. A proper Collision Detection System must detect a collision, compute the where the collision occurred between two convex entities and compute the collision responses. Furthermore, to efficiently detect collision among several entities, a game engine should parse the scene and divided the detection between two stages: Broad and Narrow Phase stages.

 
collisiondetectionphase.png
 

Such operations require the implementations of a Boundary Volume Hierarchy algorithm and a GJK algorithm. These are expensive operations, and they must be computed within a fraction of a game-tick.

Therefore, whatever primary language you decide to use in your engine, make sure that it is a fast and efficient language. The last thing you want is for your game engine to waste valuable time in the collision detection due to the inefficiency of the language.

Aside from the game engine, you must also develop an application that acts as a bridge between your engine and 3D modeling software, such as Blender 3D. The primary purpose of this application is to export rendering data of a 3D model from Blender and make it accessible for the engine to use. To develop such an application, you need to learn Python-Blender scripting.

castledae.png

During the development of the Untold Engine, I had to develop this application, which I call Digital Asset Exporter (DAE). The DAE not only exports rendering information but also 3D animation data which the engine can use.

daedata.png

Depending on the 3D Modeling tool which you decide to use, you may have to learn a different second language such as javascript. For example, if you choose to use Cheetah3D, you will need to develop the DAE using Javascript.

Well, I hope this helps.

Managing your schedule to develop a game engine

A while back I received an email from a reader asking me how did I manage my schedule to develop a game engine. I feel that his question is a common question among most of us.

So how did I do it?

The development of my game engine can be divided into two periods: "Prior the development of the Basic Framework' and "After the development of the Basic Framework" of the engine. By "Basic Framework," I'm referring to a game engine that has the four primary components implemented. Such as Math Engine, Rendering Engine, Physics Engine, and Collision Detection System.

Time Management Prior the Basic Framework

When I started the development of the engine, not a single free hour was wasted. I had only one goal in mind, and nobody or nothing was going to stop me. My schedule was very extreme:

  • Wake up early in the morning, usually at 5 am and work until 7:00 am or so.
  • Head to work
  • I tried to eat lunch at my cubicle as I worked, and used my lunch hour to go to Starbucks (or Coffee Bean) and worked on the engine
  • Go back to work
  • At around 6 pm, I would head to the Gym or play soccer for about an hour and come back home
  • Work on the engine from 7 pm to 1 am or so
  • Repeat

During the weekends, I would work on the engine for about eight hours each day.

Looking back, I think that I was taking my desires to develop a game engine a bit to the extreme. I should have relaxed a bit more. However, back then I felt that it was the cost of doing what I wanted to do.

Time Management After the Basic Framework

There is something about Game Engine Development that you should know. Once you implement the Basic Framework of the engine, everything gets easier. Developing the Basic Framework is the hardest part of a game engine. Trust me.

My schedule during this period is more relaxed. I no longer put an inordinate number of hours on the engine. I work on the game engine for about 2-3 hours each weekday. During the weekends, I may work 5-6 hours total.

Looking back, I realize that I was able to do all this because I have no other obligations aside from my full-time job (I work as an engineer). I am not married, I have no kids, and I'm out of college. So, I have a lot of free time. I understand that many of you may not be in my same situation.

So, back to the original question: "How can you manage your time to develop a game engine?"

I can't tell you how to manage your schedule. My situation is different than yours. However, the one tip I can share with you to make the best use of your time is this:

Do not code right away. I have realized that after I learned a new concept, and try to implement it in code right away, I would end up wasting a lot of time fixing bugs. Instead, try to internalize the newly learned concept. Visualize the implementation as you are heading to work or school, while watching Netflix, while eating, etc. Think about it as long as is necessary. Think about how it will affect the architecture as a whole. Try to foresee what bugs will arise and how other components in the engine will be affected. Once you have a clear idea of how to implement the new feature, then open up your laptop and start coding.

You will realize that the time spent visualizing the implementation leads to less time being wasted fixing bugs.

So, do not code right away, instead try to visualize it first.

Hope this tip helps.

The Art of Game Engine Development

I've written several articles explaining how a game engine works. However, I feel that I left out an important concept.

Over the years, my view on Game Engine development has evolved. It has changed from "This is how you develop a game engine" to "There is no one way to develop a game engine."

When I started, I spent hundreds and hundreds of hours pouring over technical books; learning, deciphering code snippets and trying to implement the same ideas I learned on my game engine.

There is nothing wrong with the approach mentioned above. But over the years, I realized that Game Engine development is not only science, but it is also an ART.

There was a point in the development of the engine when I stopped treating the implementations provided in technical books as "Gospel." Instead, I would make an effort to truly understand the "concept" and then go on and implement it my way.

When I did this, I started to fall in love with Game Engine Development. That was the moment that I felt that I was genuinely doing Engineering.

To develop a game engine, focus on understanding the primary role of each component, but implement the internals of each component, not as mentioned in a book, but as YOU think is the best way.

In other words, let your creativity flow through your game engine. Game Engine Development is science mixed with "technical" art.

Documenting the Untold Engine

Here is a tip I would like to share:

Approach documenting your project, as a project itself.

I started documenting the engine months before I released it. I was hoping to have the documentation ready by the Release Date. However, that never happened. Documenting a project is a lot, a lot of work and you should treat it as a project itself. Overall, it has taken me over eight months to document the Untold Engine.

 
In version beta v0.0.11, I implemented several camera behaviors such as First Person Camera and Third Person Camera. The particle system was also improved. Moreover, the camera culling was also improved.
 

Trust me; I've been working on the documentation daily.

So what type of documentation is currently available in the engine. Well here is what I have done.

The Documentation is divided into the following sections:

  • Labs & Tutorials
  • API Usage
  • Digital Asset Exporter
  • Architecture
  • Modules

The Labs & Tutorials section provides several labs that will help you get started with the engine. You will have a chance to learn how to render a game character, how to add collision detection, etc. It is an excellent way to get started using the engine.

The API Usage section helps you understand how to use the Untold Engine's API. This section is geared to users who have gone through the Labs & Tutorials section and are ready to start playing around developing their games. You will learn how to render 3D objects, skyboxes, text, etc. using the engine's API. You will also learn how to use the Physics Engine, Callbacks, etc.

The Digitial Asset Exported section is a critical section to read. This section will explain how to import a 3D object/animation from Blender and use it in the Untold Engine.

The Architecture section is not complete yet. This is the section that requires a lot more work. My goal is to provide dozens of articles explaining the entire architecture of the Untold Engine. This will be massive work, and I hope to complete it in about six months or so.

When I released the engine, I was fully aware that the Documentation was lacking and I have put a lot of work on writing these articles. I hope you find them useful.

Thanks for reading.

Progress Update: Game Engine Beta v0.0.11

It feels like a long time since I updated the engine. The last version was released on Feb 2017. However, throughout this whole, I released the engine as an open source. I also spent a considerable amount of my free time writing documentation for the engine and fixed several issues that I encountered along the way.

Today I'm happy to say that I have released Beta version 0.0.11 of the Untold Engine.

The main updates to the engine are the following:

  • Implemented a Camera System that can handle a First Person Camera, Third Person Camera, and a Basic Follow Camera.
  • Improved the camera culling computation. If you recall, the previous version had problems with the Camera Culling. In this version, the engine allows the developer to set the desired time interval to compute the culling. However, there is a bug that I found out a bit too late. Shadow rendering is slowing down the culling computation. I will fix this in the next version.
  • Implemented an actual 3D particle system. The previous version was able to produce 2D particle systems. This is no longer the case.

Here is a video showcasing v0.0.11. As you can see in the video, the engine allows you to switch between Basic Follow Camera to First Person and the Third Person Camera. The video also shows a 3D particle system.

 
 

You can download the engine from Untold Engine

Thanks for reading.