Dymatic Logo

Documentation

Explore the complete documentation on getting setup with Dymatic as well as infomation around all of the engine's core features and systems.

Dymatic is a basic, open source, WIP 3D game engine created using C++. Currently, Microsoft Visual Studio is required to build, and only officially supports Windows. Visit the Dymatic Engine home page to find out more.

Engine Features

  • Real-time 2D and 3D renderer with lighting, volumetrics and animation
  • Extensive and customizable scene building toolset
  • Project management system
  • Entity component system
  • 2D and 3D physics engine
  • Audio engine
  • Asset manager
  • C# script engine
  • Built in source control
  • Visual scripting system
  • Python based editor scripting
  • Application deployment system

Building

Downloading the Repository

Clone this GitHub repository using:

git clone --recursive https://github.com/BenC25/Dymatic.git
If previously cloned non-recursively, clone the necessary submodules using:

git submodule update --init

Dependencies

  1. Run the Setup.bat file inside the scripts directory which will install any necessary submodules. Currently, python is required for these scripts to execute.

  2. If the Vulkan SDK, is not installed, VulaknSDK.exe will be launched via the script and will prompt the user to install the SDK. After installation run Setup.bat again, and if the previous step was successful, this will lead to the Vulkan SDK debug libraries being downloaded and un-zipped automatically.

  3. Submodules are updated automatically.

  4. Registration scripts will run, adding shortcuts, file extensions and ensuring that the Dymatic Editor and Runtime both use a 'High Performance' display setting.

  5. The Win-GenProjects.bat script file will get executed automatically, and will use premake to generate project files and configure them to the specifications of the included lua file.

  6. If any future changes are made to the project setup, use Win-GenProjects.bat to regenerate the project.

Available Tools

Dymatic Engine

The Dymatic Editor, Dymatic's powerful visual toolset for managing and creating assets, designing realistic and engaging 3D worlds, scripting interactive experiences and more.

Dymatic Tools VSIX

Dymatic's custom Visual Studio extension. Provides a toolset allowing for quick and easy debugging of C# scripts during Dymatic runtime in editor, including breakpoints, callstack, variable inspection and more. Introduces multiple C# templates to reduce time spent on boilerplate code.

Rationale

Dymatic Engine is a personal project developed by Ben Craighill, serving as as an educational tool, continually evolving as new features are introduced.

Editor Tools

Editor Tools

Editor Tools

Editor Tools

Editor Tools

Editor Tools

Editor Tools

Editor Tools

Editor Tools

C# Scripting API

Developer Automations

Python Bindings

Run as Command

Dymatic provides a built in Python interpreter allowing for engine task automation. Invidual python files/commands can be executed via the viewport command line (Shorcut: ~).

Run as Plugin

Python files can persist throughout the editor lifetime as plugins, receveing overridable events from the editor. This allows for engineers to create their own developer tools/UI and respond to certain events.

Overridable events include:

DymaticOnLoad()
DymaticOnUpdate()
DymaticOnUpdate(stage) // Passes a render stage flag to draw to a specifc region (e.g. Title Bar)
DymaticOnUIRender()
DymaticOnUIRender(ts)  // Timestep (as a float between the last frame)
DymaticOnUnload()

Callable Methods

Name Parameters Description
Versioning
GetVersionMajor None Retrieves the current engine major version as an integer
GetVersionMinor None Retrieves the current engine minor version as an integer
GetVersionPatch None Retrieves the current engine patch version as an integer
GetVersionString None Retrieves the current engine version as a string in the format {major}.{minor}.{patch}
Platform Utilities
Platform.OpenFileDialogue Filter (string) Opens platform dialogue to select a single file according to the filter (e.g. "Dymatic Scene (*.dymatic)\0*.dymatic\0")
Platform.SaveFileDialogue Filter (string) Opens platform dialogue to save a single file according to the filter (e.g. "Dymatic Scene (*.dymatic)\0*.dymatic\0")
Platform.SelectFolderDialogue None Opens platform dialogue to select a single folder
Editor
Editor.NewScene None Discards the current scene and creates a new empty scene
Editor.OpenScene None Prompts the user to select a scene to open and opens the specified scene
Editor.SaveScene None Saves the current scene, or SavesSceneAs if not currently saved
Editor.SaveSceneAs None Opens a save file dialogue for the current scene
Editor.Compile None Instructs the editor to compile the active project's C# assembly
UI
UI.BeginWindow None Must be called at the start of window for subsequent draw calls
UI.EndWindow None Must be called to end the current window (failing to execute will result in a crash)
UI.BeginChildWindow None Creates a sub-window region within the current window. This reigion has it's own draw list, scroll area etc.
UI.EndChildWindow None Must be called to end the current Child Window
UI.SameLine offset = 0.0 (float), spacing (float) = 1.0 Ensures the next element is draw on the same line (as opposed to dropping down a line)
UI.Text text (string), text_end (string) = "\0" Draws a text element
UI.TextDisabled None Draws a text element (with the editor disabled color)
UI.Separator None Draws a thin horizontal line to seperate elements
UI.Button label (string), size (vec2), flags (ButtonFlags) Draws a button element
Returns true if clicked
UI.InputText label (string), value (string), flags = NoFlags (InputTextFlags) Provides a field to input/modify a string value.
Returns a tuple containing a boolean 'modified' value, and a string with the current updated data value
UI.DragInt label (string), value (integer), drag_speed = 1.0 (integer), min = 0 (integer), max = 0 (integer), format = "%d" (string), flags = NoFlags (InputTextFlags) Provides a field to input/modify an integer value.
Returns a tuple containing a boolean 'modified' value, and an integer with the current updated data value
UI.BeginMenu label (string), enabled = true (boolean) Begins a menu for subsequent menu items to be placed inside
UI.EndMenu None
UI.MenuItem Label (string), Shortcut (string), Selected (boolean), Enabled (boolean) Draws a menu item inside a menu region.
Returns true if clicked.

UI Flags

Name Description
UIRenderStage
Main Flag passed to DymaticOnIURender for the drawing of all custom windows and UI elements seperate to the main editor.
MenuBar Drawing elements (menus/items) to the main menu bar. Note additonal menus can be specified and are not limited to the sub-menus outlined below.
MenuBar_File Drawing to 'File' menu of main menu bar.
MenuBar_Edit Drawing to 'Edit' menu of main menu bar.
MenuBar_Window Drawing to 'Window' menu of main menu bar.
MenuBar_View Drawing to 'View' menu of main menu bar.
MenuBar_Script Drawing to 'Script' menu of main menu bar.
MenuBar_Help Drawing to 'Help' menu of main menu bar.
TreeFlags
NoFlags None
Selected Draw as selected.
Framed Draw frame with background.
AllowItemOverlap Hit testing to allow subsequent widgets to overlap this one.
NoTreePushOnOpen
NoAutoOpenOnLog
DefaultOpen Default node to be open.
OpenOnDoubleClick Need double-click to open node.
OpenOnArrow Only open when clicking on the arrow part.
Leaf No collapsing, no arrow (use as a convenience for leaf nodes).
Bullet Display a bullet instead of arrow.
FramePadding Use FramePadding (even for an unframed text node) to vertically align text baseline to regular widget height.
SpanAvailWidth Extend hit box to the right-most edge, even if not framed.
SpanFullWidth Extend hit box to the left-most and right-most edges
NavLeftJumpsBackHere
CollapsingHeader Equivalent to Framed, NoTreePushOnOpen and NoAutoOpenOnLog
ButtonFlags
NoFlags None
MouseButtonLeft React on left mouse button (default)
MouseButtonRight React on right mouse button
MouseButtonMiddle React on center mouse button
InputTextFlags
NoFlags None
CharsDecimal Allow 0123456789.+-*/
CharsHexadecimal Allow 0123456789ABCDEFabcdef
CharsUppercase Turn a..z into A..Z
CharsNoBlank Filter out spaces, tabs
AutoSelectAll Select entire text when first taking mouse focus
EnterReturnsTrue Return 'true' when Enter is pressed (as opposed to every time the value was modified).
CallbackCompletion Callback on pressing TAB (for completion handling)
CallbackHistory Callback on pressing Up/Down arrows (for history handling)
CallbackAlways Callback on each iteration. User code may query cursor position, modify text buffer.
CallbackCharFilter
AllowTabInput Pressing TAB input a '\t' character into the text field
CtrlEnterForNewLine In multi-line mode, unfocus with Enter, add new line with Ctrl+Enter (default is opposite: unfocus with Ctrl+Enter, add line with Enter).
NoHorizontalScroll Disable following the cursor horizontally
AlwaysOverwrite Overwrite mode
ReadOnly Read-only mode
Password Password mode, display all characters as '*'
NoUndoRedo Disable undo/redo
CharsScientific Allow 0123456789.+-*/eE (Scientific notation input)
WindowFlags
NoFlags None
NoTitleBar Disable title-bar
NoResize Disable user resizing with the lower-right grip
NoMove Disable user moving the window
NoScrollbar Disable scrollbars (window can still scroll with mouse or programmatically)
NoScrollWithMouse Disable user vertically scrolling with mouse wheel. On child window, mouse wheel will be forwarded to the parent unless NoScrollbar is also set.
NoCollapse Disable user collapsing window by double-clicking on it. Also referred to as Window Menu Button (e.g. within a docking node).
AlwaysAutoResize Resize every window to its content every frame
NoBackground Disable drawing background color (WindowBg, etc.) and outside border. Similar as using SetNextWindowBgAlpha(0.0f).
NoSavedSettings Never load/save settings in the layout save file
NoMouseInputs Disable catching mouse, hovering test with pass through.
MenuBar Has a menu-bar
HorizontalScrollbar Allow horizontal scrollbar to appear (off by default).
NoFocusOnAppearing Disable taking focus when transitioning from hidden to visible state
NoBringToFrontOnFocus Disable bringing window to front when taking focus (e.g. clicking on it or programmatically giving it focus)
AlwaysVerticalScrollbar Always show vertical scrollbar (even if ContentSize.y < Size.y)
AlwaysHorizontalScrollbar Always show horizontal scrollbar (even if ContentSize.x < Size.x)
AlwaysUseWindowPadding Ensure child windows without border uses style.WindowPadding (ignored by default for non-bordered child windows, because more convenient)
NoNavInputs No gamepad/keyboard navigation within the window
NoNavFocus No focusing toward this window with gamepad/keyboard navigation (e.g. skipped by CTRL+TAB)
UnsavedDocument Display a dot next to the title. When used in a tab/docking context, tab is selected when clicking the X + closure is not assumed (will wait for user to stop submitting the tab). Otherwise closure is assumed when pressing the X, so if you keep submitting the tab may reappear at end of tab bar.
NoDocking Disable docking of this window
NoNav Equivalent to 'NoNavInputs' and 'NoNavFocus'
NoDecoration Equivalent to 'NoTitleBar', 'NoResize', 'NoScrollbar' and 'NoCollapse'
NoInputs Equivalent to 'NoMouseInputs', 'NoNavInputs' and 'NoNavFocus'

Data Structures

The Dymatic Python interpreter includes the following built in data structures:

vec2      (x, y)
vec3      (x, y, z)
vec4      (x, y, z, w)