Minty Files - mtalyat/Minty GitHub Wiki

This page is a list of Minty engine file types and how they are structured. All files, components, etc. are case-sensitive. The examples for each of the following use the default values, or use "My___" if the default would normally be empty. Any instance of [UUID] is expected to be a UUID, such as def0000000000014.

Syntax

Minty Files are essentially a tree of nodes. Here is a snippet of how different things are represented:

: MyRootValue
MyNode
    MyChildNode: Value
        MyGrandchildNode
MyList
    - MyListItem
    - MyListItem
    - MyListItem
MyList2
    0: MyListItem
    1: MyListItem
    2: MyListItem
MyMap
    MyKey: MyValue
    MyKey2: MyValue2

Components

AnimatorComponent

Stores data for Animators on an Entity.

Animator: [UUID]
Tag Description
Animator The UUID of the Animator to use.

AudioListenerComponent

The ears of the Scene. All spatial audio is related to the Entity with this Component.

This component has no values.

AudioSourceComponent

An Entity with this Component emits spatial audio.

AudioClip: [UUID]
Play: True
Volume: 1.0
Attenuation: LinearDistance
AttenuationRollOff: 1.0
Min: 0.1
Max: 100.0
Tag Values Description
AudioClip -- The UUID of the AudioClip to play.
Play True or False When true, the AudioSourceComponent will begin to play music as soon as it is able.
Volume [0, 1] The volume of the AudioSourceComponent.
Attenuation InverseDistance, LinearDistance, or ExponentialDistance Defines how the audio becomes quieter as the distance increases between the AudioListenerComponent and this AudioSourceComponent.
AttenuationRollOff -- --
Min [0, inf) The near distance for the audio source. Anything closer than this distance will be at 100% volume.
Max [0, inf) The far distance for the audio source. Anything further than this distance will be at 0% volume.

CameraComponent

Stores data for a Camera. A rendered Camera will be rendered from the transformation of the Entity this Component is attached to.

Camera: [UUID]
Tag Description
Camera The UUID of the Camera to use.

CanvasComponent

Stores data for a Canvas.

Resolution: (1920, 1080)
Tag Description
Resolution The Float2 Resolution of the Canvas to use. This is a virtual Canvas size. All child UITransforms will act as if they are within a screen of this size, even if the real screen size is different.

DirtyComponent

Marks a Transform on a Component as dirty, and needs to be updated.

This component has no values.

EnabledComponent

Enabled a Component and allows it to be updated, drawn, etc.

This component has no values.

Layer Component

Holds the Layer(s) that this Entity belongs to.

Layer: 1
Tag Values Description
Layer [0, inf) The Layer(s) an Entity is on. These are flags, represented as an integer.

MeshComponent

Holds a Mesh for an Entity.

Type: Custom
Mesh: [UUID]
Material: [UUID]
Tag Values Description
Type Empty, Custom or any other Minty::MeshType The type of the Mesh. If the Type is anything other than Custom, the Mesh Tag can be omitted.
Mesh -- The UUID to the Mesh.
Material -- The Material to use when rendering this Mesh.

NameComponent

Holds the name of an Entity.

Name: MyName
Tag Description
Name The name of the Entity.

RelationshipComponent

Holds the relational information between this Entity and those around it.

Parent: [UUID]
Tag Description
Parent The UUID of the parent Entity.

SpriteComponent

Holds data to render a Sprite.

Sprite: [UUID]
Color: #ffffffff
Tag Values Description
Sprite -- The UUID to the Sprite to use.
Color A hex value or color name The Color to render the Sprite with.

TextComponent

Holds text to render.

Text: MyText
Color: Black
Font: [UUID]
Size: 32
Flags: None
Tag Values Description
Text -- The text to render.
Color A hex value or color name The Color to render the Text with.
Font -- The Font to use to render the Text.
Size [1, inf) The size of the Font to use to render the Text.
Flags None, or any combination of Italic, Bold The flags of the Font to use to render the Text.

TransformComponent

Holds a Transform for an Entity.

Position: (0, 0, 0)
Rotation: (0, 0, 0)
Scale: (1, 1, 1)
Tag Description
Position The Float3 position of the Entity within the Scene.
Rotation The Float3 euler angles of the Entity within the Scene.
Scale The Float3 scale of the Entity within the Scene.

UITransformComponent

Holds a UITransform for an Entity.

AnchorMode: TopLeft
X: 10
Y: 10
Z: 0.2
Width: 100
Height: 200

OR

AnchorMode: All
Left: 100
Top: 100
Depth: 0.2
Right: 100
Bottom: 100
Tag Alt Tag Values Description
AnchorMode -- All, None, or any combination of Top, Middle, Bottom, and Left, Center and Right. The AnchorMode flags for this UITransform. Anchors itself relative to its parent. Using TopBottom or LeftRight will stretch that respective direction, and use their respective values instead of X, Y, Width, Height
X Left (-inf, inf) The X position of the Entity, OR, the Left offset of the Entity.
Y Top (-inf, inf) The Y position of the Entity, OR, the Top offset of the Entity.
Z Depth [0, 1] The Z position of the Entity, OR, the Depth of the Entity. This determines rendering order. 0 is the top, and 1 is the bottom.
Width Right (-inf, inf) The width of the Entity, OR, the Right offset of the Entity.
Height Bottom (-inf, inf) The height of the Entity, OR, the Bottom offset of the Entity.

UUIDComponent

This component holds a UUID for an Entity. It does not store the value like normal Components, instead, it is directly tied into the Entity line. For example:

MyEntity: [UUID]

VisibleComponent

Makes a Component Visible and allows it to be drawn.

This component has no values.

Systems

All systems do not have data. For now, just use their names in the Scene file.

File Types

AudioClip Files (.mp3, .wav)

While AudioClip files do not hold Minty information in their asset file, they do have Minty information in their meta files.

Volume: 1.0
Loop: True
LoopPoint: 0.5
Exclusive: False
Tag Values Description
Volume [0, 1] The initial olume of the AudioClip.
Loop True or False Set to true to restart after ending, otherwise the clip will play one time.
LoopPoint [0, clip duration] After looping, start the next loop here.
Exclusive True or False If this is exclusive, only one copy of this sound can play at one time.

Camera Files (.mcam)

A configuration file for a Camera Asset.

Perspective: Perspective
FOV: 45.0
Near: 0.1
Far: 100.0
Color: Black
AspectRatio: 1.77777
RenderTarget: [UUID]
Tag Values Description
Perspective Orthographic or Perspective The perspective of the Camera.
FOV (0, inf) The Field of View of the Camera.
Near [0, inf) The near distance of the Camera. Any geometry closer to the camera than this will be discarded.
Far [0, inf) The far distance of the Camera. Any geometry further from the camera than this will be discarded.
Color -- The background/clear Color of the Camera.
AspectRatio (0, inf) The aspect ratio of the Camera.
RenderTarget -- The UUID of the RenderTarget that this Camera is rendering to.

Font Files (.mfnt)

A Font file defines the object for a Font, including all of its variants (sizes, bolded, etc.).

Name: MyFont
Variants
    - [UUID]
Tag Description
Name The name of the font.
Variants A list of UUIDs of the FontVariants that this Font uses.

FontVariant Files (.fnt)

A FontVariant is a standard font file. This is used to create a bitmap font. Their format will not be covered here, as it is not Minty specific. Their .meta files contain no special information.

Material Files (.mmat)

A configuration file for a Material.

Template: [UUID]
Values
    MyValue
        MyVariable: Int: 123
        MyVariable2: Float: 12.3
        MyVariable3: Object: [UUID]
Tag Description
Template The UUID for the MaterialTemplate that this Material is based off of.
Values A collection of objects and variables that this Material contains. The names of the objects should directly correlate to the defined values set in the corresponding Shader for this Material. These values are optional in the Material files. If any values are omitted, their values within the corresponding MaterialTemplate are used.

Material Template Files (.mmtp)

A configuration file for a MaterialTemplate. MaterialTemplates are default values for Materials. A Material is always based on a template.

Shader: [UUID]
Values
    MyValue
        MyVariable: Int: 123
        MyVariable2: Float: 12.3
        MyVariable3: Object: [UUID]
Tag Description
Shader The UUID for the Shader that this MaterialTemplate uses.
Values A collection of objects and variables that this MaterialTemplate contains. The names of the objects should directly correlate to the defined values set in the corresponding Shader for this MaterialTemplate. These values are required in the MaterialTemplate files.

Meta Files (.meta)

Every asset has a meta file. The meta files will hold the ID of the asset, and possibly some more information in some circumstances. For assets where the main file type is not a Minty-formatted file (ex. .png, .fnt, .mp3), the .meta file will contain additional information that the Engine will use.

A .meta file will typically look like so:

: [UUID]
Tag Description
UUID The UUID of the Asset. This is a 16 digit hexadecimal number produced at random, used to uniquely identify the Asset.

RenderPass Files (.mrpa)

A RenderPass defines the types of resources used within a single frame while rendering. Typically, you will have a Color attachment (for drawing color to the screen) and a Depth attachment (for keeping the ordering of objects with distance). They can be defined in here.

Attachments
    Color
        Load: Clear
        Store: Store
        Initial: Undefined
        Final: Presentation
    Depth
        Load: Clear
        Store: Store
        Initial: Undefined
        Final: DepthStencilAttachment
Tag Values Description
Attachments -- A list of Attachments to the RenderPass. The name of each sub-element determines the type of Attachment: such as Color and Depth. Color and Depth are optional, but at least one of them must be present.
Load DontCare, Load, or Clear The load operation of the data for the Color Attachment.
Store DontCare or Store The store operation of the data for the Color Attachment.
Initial Undefined or another Minty::ImageLayout The initial image layout that the Attachment is in. This will always be undefined for the first RenderPass, or if you only have one RenderPass.
Final Presentation, ColorAttachment, DepthStencilAttachment, or another Minty::ImageLayout The final layout that the Attachment is in. This will always be Presentation for Color Attachments for the last RenderPass, and DepthStencilAttachment for Depth Attachments.

RenderTarget Files (.mrta)

A RenderTarget is a destination that a Camera can render to. This will either be a collection of Images, or a Surface (which contains its own collection of Images it uses to render to the Screen). There are two different forms this file can take. If Surface is specified for Images, then the RenderTarget will render directly to the Screen. Alternatively, the Images can be specified manually to render to.

RenderPass: [UUID]
Images: Surface

or

RenderPass: [UUID]
Images
    - [UUID]
Tag Description
RenderPass The UUID to the RenderPass that this RenderTarget uses.
Images Either Surface, or a list of UUIDs to the Images that this RenderTarget will draw to upon rendering.

Scene Files (.msce)

A Scene configuration file.

Assets
    - Path/To/File.png
Systems
Animation
Audio
Render
Entities
World Camera
    Transform
        Position: (0, 0, 0)
        Rotation: (0, 0, 0)
        Scale: (1, 1, 1)
    Camera
        Camera: def000000000001d
    Visible
    Enabled
    AudioListener
Tag Description
Assets This is a list of paths to Assets to load. These can either by physical files to files on the disk, or virtual files to files within Wrap files.
Systems This is a collection of Systems that shall be loaded into the Scene when the Scene is loaded.
Entities This is a collection of Entities and Components that shall be loaded into the Scene when the Scene is loaded.

Shader Files (.msha)

A Shader configuration file. Used to define how a Shader behaves, what sort of inputs it has, and more.

Inputs
    object
        Type: PushConstant
        Stage: Vertex
        Structure
            transform: Matrix4
    camera
        Type: UniformBuffer
        Stage: Vertex
        Set: 0
        Binding: 0
        Frequent: true
        Structure
            camera: Matrix4
    texture
        Type: CombinedImageSampler
        Stage: Fragment
        Set: 0
        Binding: 1
        Frequent: false
        Structure
            texSampler: Object
PrimitiveTopology: TriangleList
PolygonMode: Fill
CullMode: Back
FrontFace: Clockwise
LineWidth: 1
Transparency: False
RenderPass: [UUID]
Bindings
    0: Vertex
        0: Float3
        1: Float3
        2: Float2
Stages
    Vertex: [UUID]
    Fragment: [UUID]
Tag Values Description
PrimitiveTopology PointList, LineList, LineStrip, TriangleList, TriangleStrip, or TriangleFan How the vertex data is interpreted. In most situations, you will use TriangleList.
PolygonMode Fill, Line, or Point Determines how the data is drawn. Fill will fill in the triangles, etc. as normal. Line will draw the wire frames of the edges. Point will draw just the vertices as points.
FrontFace CounterClockwise or Clockwise Determines how to decide which side of the triangle is the front vs the back. The front face will be on the side where looking at it shows this rotation as you go from point 1 to point 2 to point 3.
CullMode None, Front, Back, Both Determines what sides of the face to discard and not draw. None will draw both sides. Front will only draw the back side. Back will only draw the front side. Both will draw nothing.
LineWidth [0, inf) The width of a line if the PolygonMode is Line. Must be set to 1 at all other times.
Transparency True or False Allows for transparency if true. Rendering is faster when transparency is off.
Inputs -- A collection of input values for the Shader. This includes push constants, uniform buffers, etc.
Inputs->Binding [0, inf) The binding that this input belongs to. In a ShaderModule, that looks like this: layout(binding = 0) uniform Camera {...};
Inputs->Stage Vertex or Fragment The ShaderStage that this input is inside of. Use Vertex for .vert files and Fragment for .frag files.
Inputs->Type PushConstant, UniformBuffer, CombinedImageSampler, or another Minty::ShaderInputType The type of input. In a ShaderModule, that looks like uniform DrawObject or uniform sampler2D texSampler.
Inputs->Count [1, inf) The number of elements in this input. If omitted, the value defaults to 1. Only use greater than one if the input is an array.
Inputs->Frequent True or False Set to true when this value is updated once a frame, or more. If not, set to false.
Inputs->Structure -- The object structure. This should contain a list of variable names, with their type. For example, layout(push_constant) uniform DrawObject { mat4 transform; vec4 color; } object; turns into transform: Matrix4 and color: Float4.
Bindings -- An ordered list of all bindings that appear within the ShaderModules. Bindings are the inputs from the vertex buffers. The sub-elements are structured as [BINDING]: [INPUT_RATE], where BINDING is the binding value, and INPUT_RATE is the Minty::InputRate. Every element under this sub-element is an ordered list of the types within this binding.
Stages Vertex, Fragment, or any other stages A list of the stages used within this Shader. Each stage holds a UUID value that points to the ShaderModule for that specific stage.
RenderPass -- The UUID of the RenderPass that this Shader belongs to.

ShaderCode Files (.frag, .vert)

These are files that are the GLSL code for the ShaderModules. A ShaderModule is a compiled ShaderCode file. Their format will not be covered here, as it is not Minty specific.

ShaderModule File (.spv)

This is a compiled ShaderCode file that is used to define a stage of a Shader. Their format will not be covered here, as it is not Minty specific. Additionally, you should not need to know the format.

These files can be compiled with the glsLangValidator tool, if you have the VulkanSDK installed. You can compile a ShaderCode file as follows:

glsLangValidator -V "MyFile.frag" -o "MyFile.frag.spv"
glsLangValidator -V "MyFile.vert" -o "MyFile.vert.spv"

Sprite Files (.mspr)

A Sprite is a slice of a Texture. It is optimized to reduce the number of textures needed on the GPU.

Texture: [UUID]
CoordinateMode: Normalized
Offset: (0, 0)
Size: (1, 1)
Pivot: (0.5, 0.5)
PPU: 16
Tag Values Description
Texture -- A UUID pointing to the Texture to use for this Sprite.
CoordinateMode Normalized or Pixel If set to Normalized, Offset, Size and Pivot will have their values be in the range of [0, 1]. If set to Pixel, their values will be in the range of [0, size), where size is the width or height of the Texture in pixels, respectively.
Offset (X, Y) The offset of this Sprite within the Texture.
Size (Width, Height) The size of this Sprite within the Texture.
Pivot (X Offset, Y Offset) The offset of the pivot within this Sprite.
PPU [1, inf) The amount of Pixels Per Unit in world space.

Texture Files (.png, .jpg, .jpeg)

While Texture files do not hold Minty information in their asset file, they do have Minty information in their meta files.

Filter: Nearest
AddressMode: Repeat
Tag Values Description
Filter Nearest or Linear Determines how the pixels are drawn when the pixels being drawn are larger than the physical pixels on the screen. Nearest is for pixel art, and Linear is for everything else.
AddressMode Repeat, MirroredRepeat, ClampToEdge, ClampToBorder, or MirroredClampToEdge Determines what to do when the sample position has gone out of bounds. Useful if you set the Sprite size to something larger than the Texture.