Search code, repositories, users, issues, pull requests...

AGPL licensed and opinionated game engine for 2D pixel-art games.

Using this crate is quite simple, there is a single trait [Game] with two required functions, [Game::update] and [Game::render], that need to be implemented for a game state object.

Embed all assets into the binary when building.

Must be enabled when building for the web. If disabled all assets will be loaded from disk.

This will dice all PNG assets into a single tiny optimized PNG atlas. On startup this diced atlas will be efficiently uploaded to the GPU as a single bigger atlas, which will be used for all static sprites.

Expose read operations on images, if disabled sprites will be uploaded to the GPU and their data will be removed from memory.

On Linux you need to install asound2-dev for audio and udev-dev for gamepads:

This example will show a window with a counter that's incremented when pressing the left mouse button1. The counter is rendered as text2 loaded from a font in the top-left corner. When the 'Escape' key is pressed3 the game will exit and the window will close.

In the library it's possible to choose between multiple upscale implementations for the single-pass RotSprite algorithm, see the Rust documentation for more information:

This doesn't apply any extra rotation effects.

Link nội dung: https://diendanmarketing.edu.vn/index.php/chuot-a19406.html