Module ryot::bevy_ryot

source ·
Expand description

Bevy plugins and utilities for RyOT games.

This module is intended to be used as a library dependency for RyOT games. It provides common ways of dealing with OT content, such as loading sprites and appearances, configuring the game, and handling asynchronous events.

Modules§

  • This module provides functionality for managing and processing perspectives and visibility of entities in a game environment. Perspectives are defined by sets of view points that determine what an entity can see, based on tile positions and other spatial considerations.
  • Sprite loading and drawing.
  • This module deals with the definition and management of TileFlags, which represent the state of tiles within the game world. These flags are crucial for determining visibility, walkability, and whether a tile blocks sight, among other properties.

Macros§

  • A macro that simplifies the usege of on_hold_every condition by already calling into on the time argument.

Structs§

Enums§

  • Defines system sets for managing cache-related systems. This enum is used to organize and control the execution order of systems that interact with caches, allowing for a structured update and clean-up process.
  • The states that the content loading process can be in. This is used to track the progress of the content loading process. It’s also used to determine if the content is ready to be used. It’s internally used by the ContentPlugin and should not be manipulated directly. Can be checked by applications to perform actions that depend on the state of the content.

Statics§

Traits§

  • A trait to add an asynchronous event to an App.
  • The main ContentAssets of a Ryot game, is prepared by preparer systems during the loading process and is used by the game to access the content.
  • Helper trait to add plugins only if they haven’t been added already. This is useful for external plugins that are used by multiple plugins or dependencies and should only be added once.
  • A trait that represents assets that are preloaded within ryot. It contains preloaded assets and mutable preparation methods for the ContentAssets.
  • A trait that represents Preloaded and Content assets. Most of the PreloadedAssets are not directly available to the game. They are only used to prepare the ContentAssets and then discarded. That’s why there is a separation between PreloadedAssets and ContentAssets.

Functions§

  • Quick way to create WASM compatible windows with a title.
  • A condition using leafwing-input-manager that runs the system if an action is pressed or if the action is held down every X duration.
  • Many times we need to run a system with a cooldown, to avoid running it every frame. Things like drawing, deleting, casting a spell, etc. This function is a helper condition that only runs your system every X duration. Keep in mind that the duration is in game time, not real world time.
  • A system to spawn a grid of lines to represent the tiles in the game using a custom color.