Hello there!

Welcome to the first pots of Flax Facts blog series! We have a lot of things to share from out development so every Friday we will try to write about something interesting (series inspired by the Factorio game blog).

Refactor, refactor, refactor…

Once in the past I wrote about Tech Demo production. It was supposed to be released by now but we decided to do something different. We wanted to slow down our dev and focus on existing code base to refactor it. This gave us a better view for the current Engine state and of course to prepare code for the next a few years of features-making-machinery!

Now I can admit it was a good decision. Changes we applied are very satisfying which will enable us to code new Engine parts even faster.

The only issue is that we have no tech demo yet :/

lines of code

Amount of lines of code (engine only) in time.

250 000 lines of happiness

Recently Engine made a small milestone. Amount of lines of code of the Engine + API exceeded 250 000. Yeah, we are getting big.

Take a look at the above screenshot. It presents amount of lines of code (Engine only) in time. It’s kind of good summary of our work. You can see we’re always moving forward! 😀


If you’re interested here is a complete report with detailed list of made changes. Enjoy! 🙂

  • Merge CubeTexture, RenderTarget and Texture classes for better design
  • Easier to implement more graphics platforms
  • Interface for staging textures
  • TextureDescription for easier resource creation
  • MSAA support
  • Separated from textures streaming
  • Unified PixelFormat and tool functions across all platforms
GPU Async
  • Changed to be independent service
  • Better GPU async jobs submission
  • Solid GPU async jobs synchronization
  • Ability to extend (could use better async on DirectX 12)
Content Streaming
  • Unify content loading tasks
  • Better scalability for loading huge amount of data
  • Dynamic assets streaming
  • Easy to maintain and extend
  • Task class
  • Super easy to use task management and work submission
  • New Exceptions system for better logging and debugging experience
  • Strings formatting changes
  • Updated CppFormat lib to fmt 3.0
  • Added ToString to support more types
  • Unify ToString formatting using operator<< overloading
  • More API tests
  • Mono backend refactoring
  • Better assemblies management
Shaders Processing
  • Cleanup Text Processing and tokens parsing
  • Change shader permutation generation
  • Shaders identified by name instead of the index
  • Refactor shader compilation
  • Introduce shader compilation options and context
  • Exporting shader debug info
  • Stripping DirectX shaders bytecode (30% less memory usage)
  • Unify shader compilation and caching for shader and material assets
  • Introduce Shader Profiles: ShaderModel4 and ShaderModel5
  • Introduce Shader Cache Database service
  • Compiled shaders cache can be stored in project database or in asset internal
  • Cleanup code
  • Remove deprecated LinkedList collection
  • Refactor Dictionary class – better performance and stability
  • New Stack and Queue collections (build on top of the Array class)
  • Added DataContainer tool class for easy data storage and sharing
  • New HashSet collection
  • New assets storage format with better design
  • Asset packages support
  • Asset IDs collisions auto resolving
  • Automatic asset upgraders
  • Per asset custom data in asset headers (faster small assets load times)
  • Better asset chunks management
  • Per asset custom metadata (json format)
  • Better separation of assets and storage layers
  • Assets importers redesigned
  • Cleanup platform dependant code
  • Move sharable platform code to base classes
  • Unify and prepare for new platforms easy integration (we want Linux, Mac + consoles)
  • Introduce more tool functions to File class
  • Change FileSystem class paths type from Char* to String
  • Remove FileSystem class paths normalization
  • Better engine exit routine
Visual Studio
  • New separated VS connection plugin
  • Fixed opening documents in VS
  • Stable Flax building in VS17
  • Content loading locks fixes
  • Many minor fixes

Wojciech Figat

Lead Developer


Leave a Reply

Avatar placeholder

Your email address will not be published.