This iteration of Titan has been paused. Currently reworking parts of it in a separate repo. I was not happy with where the engine+editor were going and decided to rethink it (Influenced by to many other engines, but I want to do my own thing).
The new iteration will use a lot of source generators to remove boiler plate code. There will be no editor (at this stage at least) and asset processing are automagically done by just specifying a folder.
More info soon.
This is a C# (.NET 8) only Game Engine (Reboot #56)
Titan currently uses DirectX 12 for graphics and XAudio2 for audio.
Keep in mind that the development of this engine is in a very early stage and will have a lot of breaking changes.
The engine is built with cross platform in mind but all parts have not been implemented.
Missing features:
- Wayland/X11 window implementation
- Vulkan rendering API
- Audio implementation
There's a script that you can run that will setup the parts you need to start using the engine.
./setup.ps1
- Titan in Space a space invaders clone.
-
Create a new C# console project in a path that's in the same directory as the titan root folder.
/git/Titan /git/YourAmazingGame
-
Add the Titan engine projects to the solution. See Space.sln for an example.
-
Run manifest builder and open the built.tmanifest and run Cook Assets from the menu. This will build the engine shaders and put them in the titanpak file.
-
Create an assets folder in your project, open the manifest tool and select "Open or Create" and select that folder. It will create a .tmanifest and a .tconfig file in that folder.
-
Add textures, audio and whatever you need for your game into the manifest, run "Cook assets" and fill out the Namespace, target directory etc for the generated files.
Sample from the Space Invaders project{ "namespace" : "Space.Assets", "outputPath" : "bin", "generatedPath" : "..\\src\\Space\\Assets", "manifestStartId" : null }
-
Setup the entry point
using Space; using Titan; using Titan.Assets; using Titan.Audio; using Titan.Core.Logging; using Titan.Core.Maths; using Titan.Graphics; using Titan.Input; using Titan.Runners; using Titan.Setup.Configs; #if DEBUG using var _ = Logger.Start<ConsoleLogger>(10_000); const bool UseRawAssets = true; var devAssetFolder = Path.GetFullPath($"{AppContext.BaseDirectory}../../../../../assets"); var devPakFolder = Path.Combine(devAssetFolder, "bin"); var devEngineFolder = Path.GetFullPath($"{AppContext.BaseDirectory}../../../../../../Titan/"); var devConfig = new AssetsDevConfiguration(devAssetFolder, devPakFolder, devEngineFolder, UseRawAssets); #else using var _ = Logger.Start(new FileLogger(Path.GetFullPath(AppContext.BaseDirectory, "MyAmazingGame", "logs", )), 10_000); #endif App.Create(new AppCreationArgs()) #if DEBUG .AddConfig(devConfig) #endif .AddModule<GraphicsModule>() .AddModule<InputModule>() .AddModule<AudioModule>() .AddModule<GameModule>() .AddConfig(GraphicsConfig.Default with { #if DEBUG Debug = true, #else Debug = false, #endif Vsync = true, AllowTearing = false, ClearColor = Color.Red }) .AddConfig(WindowConfig.Default with { Title = "This is my game", Windowed = true, //AlwaysOnTop = true, // Enable this if you want the window to always be on top Width = 1024, Height = 768, Resizable = true }) .UseRunner<WindowedRunner>() .Build() .Run() ;
-
Start the game with F5!
-
See GameModule.cs in the TitanInSpace sample for a IModule implementation where it adds components, systems and assets.
The tools that are used by titan to build the manifests.
Path: tools/Titan.Tools.ManifestBuilder/Titan.Tools.ManifestBuilder.exe
Path: tools/Titan.Tools.Packager/Titan.Tools.Packager.exe
.... not yet decided, come back soon!