Basics - Senscape/Dagon GitHub Wiki

Everything in Dagon is object-oriented. You can manipulate all the objects you create in many ways. The basic structure of a typical project is this:

Rooms -> Nodes -> Spots

Which means a room contains nodes which in turn can contain spots. Let's see in detail what each object does:

  • Room

    Works as a container for any number of nodes, which share any properties the room has. For example, an audio object that plays music or the default footstep sound. Every time a node is accessed inside the current room, the engine will look for properties first inside the node, then in the owning room. Therefore, if a node doesn't have a footstep sound, Dagon will load the container default.

    While you are able to load and link to nodes directly, the engine requires that every single node is contained inside a room.

  • Node

    They are represented as a cubemap with six faces in the engine. Each face is like a canvas of sorts in which you can "draw" spots. This object has a very handy feature which allows you to load a set of textures directly from a bundle, literally allowing the creation of nodes in a single line. You are always able to load the base textures individually.

  • Spot

    The most complex object in Dagon and its cornerstone. Spots are like "patches" on the node canvas. A spot may be of any shape and size. Their most basic use is loading images to texture the cubemap. They can also contain audio and video files, which can be played by different ways. This means a spot can be, for example, a point on the canvas which only has a sound attached to it, in which case it would act as a source to provide 3D audio positioning.

    A spot may link to another room or node, or a custom function defined by the user, in which case it becomes a (wait for it) "hotspot".