Skip to main content

Crate perovskite_game_api

Crate perovskite_game_api 

Source
Expand description

This crate contains APIs for defining game behaviors/content in Perovskite

Some APIs are re-exported directly from perovskite_server and are subject to change; they are available with the unstable_api crate feature.

Modules§

animals
Animals. Currently the only function is to enable animals in a world.
autobuild
Autobuilding (e.g. making a road in a few clicks, worldedit style functions, etc) - including helpers to make it easier to define your own autobuilfing logic. Tools for players to quickly build structures. Initial focus is on roads, to prove out the UX and get some initial experimentation.
blocks
Contains utilities for defining types of blocks in the world, as well as simple items that are 1:1 matched to those blocks.
carts
Carts on rails. Currently, there are no public APIs other than the function to enable carts in a world, but this may change in the future.
circuits
Provides digital circuits that can be used in the default game.
colors
Provides colors that can be used in the default game, as well as a unified set of items representing dyes in different colors. Also provides functionality to colorize textures automatically, allowing one base texture to be used for multiple blocks in different colors.
constants
Common constant values useful for game content.
default_game
Provides a default set of game content centered around exploring a natural procedurally-generated world, collecting resources through mining, converting resources to useful materials, building structures out of them, etc.
farming
game_builder
Provides functionality to build and start a game and server.
items
Contains utilities for defining items.

Macros§

include_texture_bytes
Convenience helper for including a texture in the source tree into the game.
maybe_export

Structs§

BlockCoordinate
A 3D coordinate in the world.
ChunkCoordinate
Represents a location of a map chunk.
ChunkOffset
Represents an offset of a block within a chunk.
NonExhaustive
Marker that a struct may be extended in the future

Functions§

configure_default_game