Month of Progress

I've worked incredibly hard on TEE over the past 30 or so days. Rather than get into too much detail, here's some brief explanations and pictures:

Click & Drag Selections

I completed the ability to both click 3D objects to select them and drag the mouse to select more than one object. Lots of work was needed to give this an immediate and responsive feel with no slowdown. This was achieved by caching the results of intensive operations such as calculating object and chunk bounding box data and re-calculating when changed instead of re-calculating every frame.

Debug Visualizations

There are various debug displays built into the engine. Everything from coordinates to chunk borders to shadowmap displays

Texture Streaming

Not only did I implement textures (and Graphics Materials), but I did so using multithreading. This means that textures can load while new parts of the scene (level) load with no frame drops. Instead of dealing with an entire texture at once, it instead loads in chunks. Not only that, but a system is in place to allow for multiple texture qualities, giving gamers the ability to adjust their texture quality. Textures will also load a lower quality version before loading the higher quality ones to minimize the time that no texture is displayed.

Completion of Light Components

Light support (Spot, Directional, Omni) is now more polished and contains all sorts of properties and adjustable functionality.

Frustum Culling Optimization

A system is now in place that only renders visible chunks (which contain meshes). Soon, the engine will also have adjustments for renderable distance.

Resource Manager Improvements

Images, Textures, Sounds, Music and Meshes now get recognized within the game data and mod data directories and are registered as resources automatically by the engine upon startup. This saves time in not needing to also create a resource, select the file, etc. within the editor.

What's next?

Work will continue on completing the TEE 3D features as well as the editor itself. Currently I'm looking at:

  • Engine: Implementing mesh streaming, which will work similar to texture streaming in that extremely large models could be loaded during gameplay with no slowdown.

  • Engine: Implementing render distance, and also include an option to initialize and unload based on visibility and distance (which would be useful in large, open world games)

  • Editor: Add the mouse-based transformation tools (scale, rotate, position)

  • Engine & Editor: Particles, which I plan to implement via GPU shaders to keep the main thread clean and optimized.

  • Engine & Editor: Sound and music, which will also need to be streamed in (similar to textures and meshes)

We're not too far away from getting to the fun stuff like physics, scripting and multiplayer networking. The good news is that what I'm working on now is what I consider to be "the hard part", and I'm just about there. What it all boils down to is; I can't wait to begin making fun games with this toolset :)

Textures, Lighting and Shadows

Textures, Lighting and Shadows

Lighting and reflections

Lighting and reflections

An example of the various debug displays, and the underlying chunks within the scene

An example of the various debug displays, and the underlying chunks within the scene

3D Progress

Well... if you read the last post, that was a long week or two!

Though I was able to render 3D objects without any issue, I was not satisfied with the shadows and lighting. It took a fair amount of time, but eventually new shaders were completed that seem to do the job much better than any previous renditions of the engine! Take a look:

Demonstration of 3D lighting and shadows in the Third Eye Engine

Demonstration of 3D lighting and shadows in the Third Eye Engine

It doesn't look like much, but this lighting and shadow setup is much more natural than previous TEE projects, and does not have a number of issues that the previous engines and demos had. It currently supports unlimited lights, each of which can be configured as to whether they produce shadows or not. The lights themselves have many properties and work alongside the materials system which allows for a very high degree of customizability (which is not completely shown in the screenshot because the properties are not yet integrated into the editor).

This system means two things; on one hand, there is full control over 3D rendering at a low level, which will be advantageous if one wants things to look a very specific way. On the other, a customized low level framework is a major responsibility and really takes an additional leap towards the engine's independence of major libraries, for better or worse. I was prepared for this and decided early on that this was a potential outcome.

Here's what has been done on the 3D side of things:

  • Created a "chunk" based system that works behind the scenes to both render and otherwise manage objects, similar to what you would see on a never-ending, procedurally generated game such as Minecraft. I wanted to make this decision early so as to not limit the size of the worlds that will be supported with this engine. This allows for more efficient object rendering, querying and other functionality by only involving objects within a certain space instead of looping through every object in a scene. In the near future, there will be options for having all chunks loaded at once for smaller games, or loading/unloading based on proximity. One example of a use of this system is within the editor yourself. When you select a 3D object, it doesn't loop through every object in a scene to see if it was clicked, it instead finds which chunk was clicked within the scene and loops through only objects within that chunk. In an average scene with 20+ chunks loaded at once, this greatly reduces the CPU usage needed to figure out which object was in fact clicked.

    • Created a basic rendering system, which was eventually replaced with a more complex, shader based system (which I worked with outside help on). The engine now supports multiple shaders and you can select them on a per-object basis (for example, you could have an object drawn with no shadows, or vice versa). There are two default 3D shaders; "default" (which supports drawing 3D objects with lighting) and shadows (which calculates and applies shadows to the scene). This means that in the future it will be possible add other neat effects such as glowing, screen distortion, motion blur, bloom, rain, etc. There is also high potential for allowing custom shaders to be loaded in for mods.

    • Completed selections. Not much else to say about this outside of the fact that it's more precise than the previous, Irrlicht-based engine.

Here's what's left on the 3D agenda:

  • Dragging selections
  • Add all of the various properties to lights within the editor (there's a ton of control possible here)
  • Complete chunk based system (mostly cleanup, eg. remove chunks that no longer have objects, etc.)
  • Add camera culling so that chunks off-screen are not drawn
  • Add the mouse-based transformation tools (scale, rotate, position)
  • Complete "materials" that take advantage of all of the (already completed) shader features, and allow for texture application. Then add material selection to the existing Shape3D objects.
  • Add a mesh component that renders 3D meshes (eg. .obj files, etc.)
  • Particles

This may seem like a long list, but this is quite a bit easier than the rendering itself was. I look forward to seeing the 3D graphics in action, when we move on to physics. I'll likely update as this work gets done. 3D rendering and shaders were a serious battle. I'm glad we're on this end of it.

2D Fin

Just a short update before the meatier, 3d/physics/scripting/multiplayer updates begin to roll out. Over the past week I have thoroughly gone through the features needed for 2D (amongst several other things). Here's what was accomplished:

  • Ability to add/remove/delete game objects and components is complete
  • Overall spent time cleaning up and commenting existing code
  • Implemented visual grid lines to represent the chunk spaces (both 2D and 3D use a chunk based system)
  • Implemented scrolling with the mouse
  • Implemented zoom in/out (this requires reworking of several features)
  • Implemented scene window selections
  • Implemented all transformations for both single objects and multi-object selections (Scale, Rotate, Move)
  • Added custom mouse cursor functionality to themes
  • Re-wrangled the engine and editor to compile and function properly natively on Linux (the goal is to have native Windows and Linux executables)

An example of selected objects with transform controls

An example of selected objects with transform controls

It's just about time to get started on the 3d rendering. Once we get that to the same level as the 2D (rendering / selections / transforms) things will begin get very exciting. I expect a similar week or two to get it to a somewhat reasonable point, and so I'll see you then!

Project continues to take shape

Hey there, it's been a while! Work on both the Third Eye Engine (TEE) and the Third Eye Editor (TEE3Edit) has continued and I feel I'm at a good point to share the latest progress. Here's what I've been working on since the last post:

Editor themes and cleanup

I worked hard on both cleaning up the prototype editor code and implementing a theme system. Themes in TEE3Edit are very detailed and highly customizable. This includes everything from margins and padding to colors and background images. Take a look at these 4 example themes:

Third Eye Theme

Third Eye Theme

dotNet Theme

dotNet Theme

Dark Theme

Dark Theme

Classic Theme

Classic Theme

If those themes don't pique your interest, there's always the new full-featured theme editor:

Theme Editor

Theme Editor

Editor objects and components

Objects and components have been implemented into the editor. One can now create new empty objects and add from the library of components that are available. The system in place for this is far easier to work with than the previous iteration of the Third Eye Engine. Now I can develop a component, and the editor automatically knows how to save, load and produce GUI for it. This saves me literal thousands of lines of code when compared to the previous iteration. Take a look at the object properties window, which is generated automatically:

Object Properties

Object Properties

Other editor/object improvements include:

  • You can now select multiple objects! Though you can't directly modify the properties when selecting multiple objects (yet), this will come in handy for moving/rotating/scaling multiple objects at once
  • You can now drag objects into eachother to set parents/children directly via the list instead of cutting and pasting
  • When a component requires a resource, likewise you can simply drag the resource from the resources screen into the field instead of using the dropdown
  • The styling of Object Properties window has been updated to look and function like the property editors of the Visual Studio line of tools

Object translation

The math for object translation (including relative translation for parents/children) has been completed. You can now create an object composed of multiple objects, and rotating / moving the base object rotates / moves the children accordingly while respecting their relative positioning and rotations. The same goes for scale, where if you scale a base object any children will also be scaled accordingly. The same has been done for 3D, which now internally uses quaternions instead of euler rotations. That will be seen as we move into 3D rendering (which is coming very soon).

Rendering

Lots of improvements to the current chunk-based 2D rendering system. Objects can now be placed onto different layers and will render in the correct order. Improvements were also made to the efficiency of the rendering process.

What's next?

My current list is as follows:

  • Object selection via the mouse
  • Moving, scaling and rotating 2D selected objects with the mouse
  • Ability to delete objects
  • 3D rendering engine beginnings

Things are about to take off as much of the legwork needed to implement new functionality has been completed. When it comes to 3D rendering, and things like Physics integration, I expect that progress will accelerate as much of the work that used to take me a great deal of time (save/load functionality, GUI for modifying new components) is taken care of automatically this time around.

Resources and modding

After a weekend of intent work, the resources and mods systems are well underway and are nearing completion. By making resource classes generic and applying what are internally called "fields" to the class, I've managed to make a system where adding new resource types (including the GUI to modify / manage them) can be done extremely quickly without any upgrades to the editor (which automatically understands how to produce an interface for modifications). I'll explain a little more about that at the end of the post as it is similar to what will be done with game object components.

Work completed this weekend:

  • Brushed up on the editor GUI itself and fully completed docking functionality; windows can be docked on any part of the screen or even docked in other windows. The GUI for TEE3Edit is completely customizable.
  • Implemented field-based data system for resources, so that for each given ResourceType I can describe what data it contains and have the various frontends generated automatically. This is opposed to my previous methods of writing save/load and a custom GUI for each one, saving many, many hours. With this system, the resource itself, the GUI for modifying it, saving, and loading can all be done automatically based on the defined fields. In fact I added a "Spritesheet" resource yesterday that contains an image, frame width and frame height. It took me 10 minutes to add the resource type, after which point it was already saving, loading and showing up in the editor. This saves a ton of time, but will save literal hundreds of hours when we get to game components.
  • Completed saving / loading for resources and a mod based system that allows for multiple mods to be loaded (further extending / changing resources)
  • Completed GUI generation for resources and a basic property editor system that integrates with the "fields" of the resources
  • Completed frontend for 3 field types: text, integer, file (which implements a customizable file open dialog)
  • Completed custom resource browser in editor, which takes mods into consideration. This is a huge improvement over the last editor; allowing you to browse resources via a folder based system. On the previous engine, resources were all just one giant list.
  • Completed basic selection of resources so that they can be modified, duplicated, removed, etc.
  • Implemented Texture, Tilesheet, Spritesheet, Mesh, Sound and Music resources

Screenshot showing the new resource browser and GUI for modification of a resource

Screenshot showing the new resource browser and GUI for modification of a resource

The work completed here will save me well over 100 hours when compared with the previous system. Previously when I had to create a new resource type for some new feature, I'd have to:

  • Make the resource class
  • Make an editor interface (so that you have controls to modify the resource)
  • Saving routine (serialize data to JSON)
  • Loading routine (reserialize data from JSON)
  • Integrate into engine (autoload resource so that it's available, load modded versions of resources, etc.)

Now? I create the resource class (including a field register function that describes the resource data), and with one line of code I can "register" it to the resource manager, and it takes care of the interface, saving, loading and engine integration. This is similar in nature to what will be done with game object components as well, and is a big reason for why this iteration of the engine will develop quickly (many fewer thousands of lines of code and fewer troubleshooting hours).

With multiple scenes at once now being possible, each resource now also keeps track of usage. Later down the line this will evolve into a system that loads/unloads resources as needed. Each resource is effectively two things: the resource "record", which is always loaded and contains the minimal data needed to describe it, and then the resource itself. For example, a Texture resource contains the record (a path to the texture) and the resource (the actual image loaded into memory). The records are always available and the resources themselves will load/unload as needed.

It can't be exciting for many of you to read this, but as a developer I'd say this weekend was a success! I'm looking forward to continuing with this new style of development that sees me doing more of the fun stuff, and far less of the repetitive stuff.

Starting over, again...

You may have wondered what I've been up to all this time. I stopped posting engine updates for the Third Eye Engine some time in August 2022, and from there it has largely been radio silence. Well, a few things have been going on:

  • I came to a realization that two parts of the engine required a major overhaul; the rendering engine and the object translations (which were intertwined with much of the engine itself). Both of these were very significant changes that would require more than a month of dedicated work.

  • Having already worked extremely hard on the engine (and its previous iterations) for a couple of years, and faced with these required changes on top of the pandemic recovery, I burnt myself out. I knew deep in my mind that it may be in my best interest to start over with an altered approach, but I couldn't comprehend getting myself to do it.

Luckily for me was in the position where it wasn't such a big deal; until I actually start developing commercial games, I don't have an obligation to complete anything; this is still just a hobby until that point. With that said, so many of you have stuck around the Discord community, showing continued support, and so I wanted to take this opportunity to apologize for the wait and thank you for the continued interest and support! Now let's get down to business!


Improvement of skills, and TEE3 progress

Since the last engine update, I've been at work improving my skill in areas that previously limited what I was able to do. That includes learning how to handle 3D rendering myself, learning more about complex systems, new C++ features and so on.

I've also been at work in planning how I would "do it all over again". After much planning, improving, relaxing and overall getting myself back to a healthy state of mind, a new iteration of the Third Eye Engine has entered the development phase! Like before, the plan is to develop a robust, multiplayer physics game engine, alongside an editor that allows for high levels of customization and modding. This time however, there's a few new features that take it to the next level:

  • The engine is now being developed using modern C++ standards and builds natively for Windows and Linux. Everything is being developed with the idea of potentially supporting Mac as well, but I am unable to test with it at this time.

  • Both 2D and 3D rendering / scenes will be supported, and they can even be mixed. The new engine and editor allow for not only creating 3D scenes, but have access to a 2D layer as well. This means that things like game UI, character selection screens, menus, etc. can now ALL be made in the editor!

  • A new "chunking" system has been created to split up objects into invisible "chunks" based on positioning. This allows for efficient rendering; only rendering objects that are in visible chunks. This also allows for efficient area-specific operations such as object selections and finding objects within distance of a particular point. In the future, the multiplayer engine may use this to prevent sending object updates for objects that can not be seen by the player.

  • The game engine will be built to be multiplayer-first. Much like popular games such as Minecraft, even single player games will process on a hidden / local multiplayer layer. This will allow for much easier development, as every feature will be multiplayer-ready from day one.

  • Multiple scenes can now be active at once, layered, and even combined. This allows for all sorts of cool tricks that would not have been possible before. Imagine creating an in-game menu once, attaching a script for its functionality, and then using it in multiple other scenes easily. Also by supporting a transparent scene background, scenes can now be layered to create almost any combination you could think of! Another usage of this feature is a server that serves multiple "games" at once, or games with multiple levels that a player can traverse freely. In such cases, multiple scenes would need to be loaded and processed at once by the server. This also allows for loading upcoming scenes in the background for instant initialization later on.

  • A new rendering engine is being developed that supports multiple passes on both the 2D and 3D side, and delegation of specific objects to specific renders. This will allow for shaders to be used and selected per-object as needed, giving access to almost any visual effect out there. As the rendering engine is being developed from bare bones, anything that isn't supported can simply be created. This also allows for very tight use of resources with minimal waste on the engine side because of the amount of control a custom renderer gives you. This also means that there is no longer any overhead between the engine and rendering, because rendering is part of the engine. This was developed with the intention of allowing for higher quality graphics than the previous engine allowed for.

  • The new editor is extremely clean, supports full customization, docking and modification of multiple scenes at once! This allows for great productivity as you'll now be able to work on a level while modifying prefabs used within that level at the same time, seeing the changes in real-time.

  • Better usage of templates will see editor source code drastically reduced in size as components will no longer be "hardcoded" into the editor. In the previous iteration of TEE, adding a component to the engine involved not only updating the engine, but the editor. Now I can create components, and they will automatically integrate with the editor. In fact, this system can be easily upgraded to load custom DLL or script based components in the future!


New editor demonstration images

Example of the new, multi-document, dockable interface

Example of the new, multi-document, dockable interface

Example of how docking controls appear when dragging a window

Example of how docking controls appear when dragging a window

Example showing how all windows can be customized and docked (or not docked) anywhere

Example showing how all windows can be customized and docked (or not docked) anywhere


So where are we at?

We're still early in development, but right around the corner are some very exciting demos and additions (that is why I've chosen to announce this project now). Currently the system's barebones are completed:

  • Scenes and scene management
  • Objects and components
  • Separate 2D and 3D rendering
  • Ability to hijack rendering for scenes (this is how we get the scene drawn inside the editor windows)

Over the upcoming weeks and months, the following will be completed:

  • The resource manager (which holds everything the game "loads", such as textures, meshes and sounds) will be completed alongside the editor integration
  • New shaders will be developed and will show off 3D rendering and shadow rendering that looks much better than previous iterations of the engine (if you like the new Unity-based first person hockey, you'll love this)
  • New object components with 2d and 3d rendering will be created (eg. Text Labels, Sprites, 3D Meshes)
  • The multi-rendering system will be finalized and we will begin to see the first examples of shaders (lighting and shadows)
  • The editor will be developed alongside these new features, including component modification
  • The multiplayer-first system will become a reality
  • Physics and scripting support will be added

That's it for now

I will continue to post updates here as the engine develops, along with some type of announcement in the Discord server. I think the #dev-log portion of the discord will be deprecated (but left there for now for historical purposes).

For anyone that has made it this far, thanks for reading! Hopefully this excites more than just me. At the end of the day, you're probably here because you're waiting for a hockey game. We'll get there :)