Crate thomas

source ·

Structs

  • Generator responsible for setting up and performing engine performance analysis. To use the data generated by the analysis, you can query for the EngineStats component.
  • Represents stats tracked by the engine to report on its performance.
  • An Entity represents a thing in your game world and is one of the core aspects of ECS. Functionally, you can think of an Entity as its ID. Entities are associated with Components to define what data that Entity has. Though it’s likely you’ll use Entity references provided to you, you should never be creating an Entity yourself.
  • The core structure of any game made with Thomas. The Game instance facilitates communication with Thomas’ internal mechanisms to automate the nitty gritty details of running the game.
  • Identifying information that can be used to give entities meaningful identifying factors.
  • Represents received user input.
  • Useful in several contexts, Layers are a way to represent how something exists relative to other things.
  • A 2D matrix with defined iteration order.
  • A representation of how important something is relative to something else.
  • Represents how to pull specific entities and components out of the world for use by a System. Methods in a Query can be chained to create more complex queries. All chains are treated like logical ANDs.
  • Represents a single match from a query.
  • A collection of matches against a query. Queries will typically match on more than one entity in the world, so this is the representation you’ll see when interacting with the results of a query.
  • Represents an RGB color.
  • A list of components that are currently stored in the game world.
  • A System represents a function that uses the result of a collection of queries to act on and potentially mutate the game world. Systems are a core aspect of ECS. Systems are where the bulk of the logic of your game will live, as they’re responsible for changing game state based on existing state.
  • Marks that an entity in the world is capable of colliding with other TerminalColliders.
  • Represents a collision between two TerminalColliders. Also provides the entities that collided.
  • A generator responsible for setting up and performing collision detection between active TerminalColliders in the world. This systems generator is included for you, you don’t need to include it.
  • Data to describe how to render something in the terminal.
  • Positional data for a world in the terminal where it’s 2D and strictly gridded.
  • A generator responsible for setting up and performing UI rendering in a terminal game. This systems generator is included for you, you don’t need to include it.
  • Text UI data that describes how the Text should be visible on the screen.
  • A way to track the passage of real time.
  • Positional data for a 3D world.
  • Positional data for a 2D world.
  • Text UI that’s rendered in the world space rather than a camera’s screen space.

Enums

  • A list of supported keys that we can query from the OS. Outside of mod.
  • Where the UI element is anchored on the screen. The anchor represents where the element is positioned by default when it has no offset.

Constants

Traits

  • A Component is essentially a data bucket and is one of the core aspects of ECS. A Component houses no logic and is simply meant to be a repository for related data. In Thomas, you should never be implementing the Component trait directly, but rather deriving it to create your own custom components:
  • A simple way to organize related systems into a unit. You can easily add all systems created by a SystemsGenerator to your game using the Game::add_systems_from_generator method.

Type Definitions

Derive Macros