Skip to main content

On Sale: GamesAssetsToolsTabletopComics
Indie game storeFree gamesFun gamesHorror games
Game developmentAssetsComics
SalesBundles
Jobs
TagsGame Engines

zipxing

4
Posts
2
Topics
1
Followers
A member registered Jun 14, 2024

Recent community posts

(1 edit)

https://github.com/zipxing/rust_pixel

Online Demo

  • Refactored the underlying rendering module, abandoned the canvas API of SDL, and replaced it with OpenGL shader
  • Unified OpenGL drawing mode supports sdl and wasm (glow & sdl2)
  • Opengl rendering improved engine performance (CPU dropped from 38% to about 15%)
  • Added the ability to use shader to achieve various special effects(coding petview transition)
  • Abstracted the repeated code in lib.rs of each application into a procedural macro: pixel_game!(Snake)
  • Fixed numerous cargo clippy warnings

Palette is a terminal tool developed by  : rust_pixel

It supports many different color spaces: SRGB, CMYK, HSL, OKLAB, OKLCH, HCT(google) ...

Oh...     https://github.com/zipxing/rust_pixel

(1 edit)

RustPixelis a 2D game engine written in the Rust language, supporting both text and graphical rendering modes. The text mode runs in the terminal, while the graphical mode supports both SDL standalone window mode and browser-based wasm web mode:

  1. Text Mode:
    Built with the crossterm module, it runs in the terminal and uses ASCII and Unicode Emoji for drawing.
  2. Graphical Mode (SDL Mode):
    Built with sdl2, it runs in a standalone window and uses the PETSCII character set and custom graphical patterns for rendering.
  3. Graphical Mode (Web Mode):
    Similar to the SDL mode, but the core logic is compiled into wasm and rendered using WebGL and JavaScript (refer to rust-pixel/web-template/pix.js).

RustPixel implements game loops, a Model/Render common pattern, and a messaging mechanism to support the construction of small games. It also includes some common game algorithms and tool modules. Additionally, RustPixel comes with small games like Tetris, Tower, and Poker, which can serve as references for creating your own games and terminal applications. It also includes examples of wrapping core game algorithms into ffi and wasm.

Overall, RustPixel is suitable for creating 2D pixel-style games, rapid prototyping, and especially for developing and debugging CPU-intensive core algorithm logic. It can be compiled into ffi for game front-end and back-end use, and also into wasm for web-based small games.