ziggurat library
The main library.
Description
This package attempts to give you common methods and classes that will be useful when creating games.
The primary focus is on audio games, and honestly there are probably better packages for full-on video games. That said, if you want to use this library to make a video game, I'm certainly not going to stop you.
Tools
Writing AssetReferences, Menus, and generally fleshing out Levels with Ambiances and RandomSounds - not to mention tying CommandTriggers to functions can be tedious. To this end, the Crossbow application can be used to automate many common Ziggurat tasks, then generate the code for you.
If you want to stay on the command line, the ziggurat_utils package has various utilities that you may find useful for creating and modifying AssetReferences.
Classes
- AssetReference
- A reference to an asset on disk.
- AssetReferenceReference
- A class to hold an AssetReference, as well as other meta data required to generate Dart code.
- AssetStore
- A class for storing references to assets.
- AxisSetting
- A class that specifies axis configuration.
- CardinalDirections
- Provides various movement constants. A class which contains direction constants.
- Command
- Provides the Command class. A command which can be executed by the player, or by a simulation.
- CommandKeyboardKey
- A keyboard key that must be held down in order for a Command to be triggered.
- CommandTrigger
- A trigger which can fire a Command.
- ControllerAxisDispatcher
- A class for linking controller axes to functions.
- Game
- The main game object.
- Message
- A message to be output.
- MultiGridLevelRow
- A row in a MultiGridLevel.
- MultiGridLevelRowAction
- An action in a MultiGridLevelRow.
-
NextRun<
T> - A class that holds information about when its value should run next.
- Preferences
- A class to save and return items to a preferences dictionary.
- RumbleEffect
- A class for holding data about a rumble effect.
-
SettingDefaults<
T extends num> - Provides the SettingDefaults class. Defaults for a setting..
- Task
- A task which runs once on or after runAfter.
- TaskRunner
- A class for holding information about a running value.
- Tile
- A tile for a TileMap.
- TileMap
- A map which contains integer values which can be turned into Tile instances.
- TriggerMap
- A class for holding trigger-to-command mappings.
Enums
- AssetType
- The possible asset types.
- MovementDirections
- Walking directions.
- TurnDirections
- Turning directions.
Extensions
- DirectoryMethods on Directory
- An extension for getting random files from directories.
- FileSystemEntityMethods on FileSystemEntity
- Adds a method for always returning a file.
-
RunnerDoubleMethods
on Point<
double> -
An extension for returning a
Point<int>
from aPoint<double>
. -
RunnerIntMethods
on Point<
int> -
An extension for returning a
Point<double>
from aPoint<int>
. - SizeExtensions on int
- Size conversions.
Constants
- defaultGain → const double
- The default gain to use.
- defaultPreferencesKey → const String
- The default preferences key to be used by the Preferences class.
- emptyMessage → const Message
- An empty message.
- gigabytes → const int
- The number of bytes in a gigabyte.
- kilobytes → const int
- The number of bytes in a kilobyte.
- megabytes → const int
- The number of bytes in a megabyte.
- terabytes → const int
- The number of bytes in a terabyte.
Functions
-
angleToRad(
double angle) → double -
Convert an
angle
to radians. -
coordinatesInDirection(
Point< double> start, double bearing, double distance) → Point<double> - Return coordinates in a given direction.
-
normaliseAngle(
double angle) → double - Return an angle between 0 and 359 degrees.
-
radsToDegrees(
double radians) → double -
Convert
radians
to degrees.
Exceptions / Errors
- InvalidEntityError
- While looking for a random file, something that was neither a directory or a file was encountered.
- NoBoxError
- The player is not on a box.
- NoFilesError
- An attempt was made to get a random file from an empty directory.
- NoSuchBufferError
- No such buffer was found.
- NoSuchChannelError
- No such channel was found.
- NoSuchEchoError
- No such echo was found.
- NoSuchReverbError
- No such reverb was found.
- NoSuchSoundError
- No such sound was found.
- NoSuchWaveError
- No such wave was found.
- PositionMismatchError
- An attempt was made to set a channel position to a position not supported by its source type.
- SoundsError
- The base class for all sound errors.
- ZigguratError
- The base class for all ziggurat errors.