Indigo

Indigo

  • Blog
  • Guides
  • Docs
  • APIs
  • Tools
  • GitHub

›Presentation

Indigo

  • Indigo's Development Status

Getting started

  • Setup & Configuration
  • Hello, Indigo!
  • Examples
  • Mill & SBT Game Templates

Organising your game

  • Boot & Start Up
  • Game Entry Points
  • Scenes & Scene Management
  • SubSystems

The game loop

  • Events
  • Frame context
  • Outcome Type

Presentation

  • Animation
  • Audio
  • Boundaries
  • Cameras
  • Clones & Mutants
  • Depth
  • Layers
  • Lighting
  • Materials
  • Primitives & Building Blocks
  • SceneUpdateFragment
  • Shapes
  • Text & Fonts

UI Components

  • Overview
  • Buttons
  • Hit Area
  • Input Field
  • Radio Button

Shaders

  • Shaders Overview
  • Shader Constants, Variables, and Outputs
  • Blending
  • Premultiplied Alpha

Working with Time

  • Signals & Signal Functions
  • Time Varying Values

Platform & Publishing

  • Assets & Asset Loading
  • Cross Platform Publishing
  • File Format Importers
  • User Input Handling
  • Loading & Saving Data
  • Logging
  • Networking

Other information

  • Alternatives to Indigo
  • Glossary
  • Key Concepts
  • Model, ViewModel, & View
  • Anti-Patterns
  • Motivation & Constraints
  • Performance
  • Prior Art
  • Rendering Technology

Primitives & Building Blocks

Indigo is made of several projects, but two of particular note are Indigo itself, and "Indigo Extras".

Although it's called the "Extras" project, and is completely optional, it nonetheless contains some useful types and constructs to help you build your games, such as Buttons and some pre-made SubSystems like an FPS counter, automata, and an asset loader.

The important thing about the extras project is that everything in it is derived from the building blocks provided by indigo itself. You could rebuild all of it yourself without having to modify the core in anyway, and indigo doesn't depend on anything in the extras project.

What are the building blocks in use?

Scene graph nodes

When you put together a scene to be rendered, you are building a graph, known as a "Scene Graph" - it's really just a tree of things to draw, and Indigo's notion of a scene graph is fairly simplistic and gloriously anemic.

Each element of the graph is called a node, and there are different types of node.

Non-Renderable Node Types

Non-renderable nodes are nodes that are meaningless except in the context of other nodes.

Group

A group is an element that is removed at render time - but it is used to help organise elements together. Putting several graph nodes into a group allows you to transform them as one unit, any elements that have their own properties set under the group, do so relative to the groups properties. You can also nest groups under groups.

Renderable Node Types

All renderable nodes come with the same set of basic transforms that you see on a clone:

  • Depth (see below)
  • Position
  • Rotation
  • Scale
  • Alpha
  • Flip horizontal
  • Flip vertical

They are then specialised to do certain jobs.

Text[M <: Material]

Provides basic support for rendering text onto the screen, including things like alignment.

Requires you to have registered a FontInfo instance that you can link to using a FontKey.

TextBox

Provides a quick way to put font based rendering text onto the screen. Unlike Text, requires no special set up unless you want to use custom fonts. However, where Text is pixel perfect, TextBox is limited to what the browser can render and text will look fuzzy at high magnifications.

Graphic[M <: Material]

The simplest type of drawn element, simply renders a bitmap (which may be cropped) onto the screen.

Sprite[M <: Material]

Essentially an animated graphic. You need to provide an AnimationKey to link back to your registered Animation information, and then you can instruct the sprite to change animation cycles, and play or stop.

Clip[M <: Material]

An even simpler animation primitive than Sprite, Clip is a super lightweight way to get simple animations into your game that requires little setup.

The Event Loop

The glue that binds the whole thing together is the event system. Events allow you to communicate through time and space from one component to another. Indigo's event life cycle is very strict. Events triggered in this frame will only be apparent in the next frame, available to all, and then expire (unless propagated again).

← MaterialsSceneUpdateFragment →
  • Scene graph nodes
    • Non-Renderable Node Types
    • Renderable Node Types
  • The Event Loop
Indigo
Getting Started
Setup & Configuration Guide"Hello, Indigo!" TutorialLinks to examplesProject templates
Community
DiscordGitHub DiscussonsTwitter
Sponsor us!
GitHub SponsorsPatreon