Releases: tversteeg/chuot
pixel-game-lib-v0.9.0-alpha.4
A small one with some quality of life changes.
GameConfig
now has a with_..
builder function for each field. Another field is also added for disabling vsync, which is now enabled by default.
Context
now has a sprite_raw_pixels
method to get the pixels as an ARGB u32
vector. It also has a sprite_size
method to get the size of a sprite.
Furthermore, some internal refactoring changes have been made to future-proof the GPU flow, which grew organically and was a bit of a mess. I made a small attempt to add a GPU profiler, but this seemed to fit really badly in the project structure, so I just dropped it.
Added
- (config) allow setting vsync in
GameConfig
- (config) add builder methods for
GameConfig
fields - (context) add
Context::sprite_raw_pixels
- (context) add
Context::sprite_size
Other
- (graphics) refactor structure of communicating with the GPU for future addition of GPU profiler
pixel-game-lib-v0.9.0-alpha.3
Another graphics focused small release with some breaking changes.
A major breaking change is the refactoring of WindowConfig
to a more aptly name GameConfig
, to which RotationAlgorithm
is added, allowing you to select with one to use:
Algorithm | Image |
---|---|
RotationAlgorithm::Scale3x (default) |
|
RotationAlgorithm::NearestNeighbor |
|
RotationAlgorithm::Diag2x |
|
RotationAlgorithm::Scale2x |
Each one has different performance and aesthetic characteristics, which you can read about more in the RotationAlgorithm
documentation.
This release also allows you to manually overwrite parts of uploaded images, exposing the possibility for dynamic textures.
Some small performance optimizations have also been made, especially for the Web.
Added
- (graphics) add
Context::update_sprite_pixels
for updating regions of pixels on an already uploaded sprites - (graphics) allow configuring
RotationAlgorithm
in config
Fixed
- (deps) update rust crates glam and glamour
- (deps) update rust crate egui to 0.27.0
- (deps) downgrade 'glam' so 'glamour' can upgrade
Other
- (readme) show different RotSprite upscale options in README.md
- (project) [breaking] rename
WindowConfig
toGameConfig
- (web) [breaking] improve performance on Web builds by using canvas scaling
- (graphics) [breaking] skip downscale render pass when buffer fits inside window
- (project) [breaking] make some internal public items private, improve documentation
pixel-game-lib-v0.9.0-alpha.2
This alpha release is mostly focused on graphics and on the performance of rendering images.
It's now possibly to easily draw text on screen:
ctx.draw_text("Beachball", Vector2::ZERO, "137.9");
Where "Beachball"
is the name of the bitmap font asset, which draws the following:
All textures are now also stored in a single texture atlas under the hood, resulting in a huge performance speed and allowing you to draw thousands of sprites.
Added
- (font) [breaking] add
Context::draw_text
which loads a bitmap font
Fixed
- (deps) update rust crate glam to 0.27.0
- (graphics) repair RotSprite shader
- (graphics) properly embed texture atlas info in shader
Other
- (context) improve performance by switching from
Arc<Mutex<..>>
toRc<RefCell<..>>
- (graphics) pack all sprites into a single texture atlas
pixel-game-lib-v0.9.0-alpha.1
Even though the amount of commits in this alpha release is very small, the amount of changes is huge. I've swapped the vek library out for glamour, which seems to be more updated and also maps better to the types required by the GPU.
PixelGame::update
and PixelGame::render
have been merged in a single PixelGame::tick
, whose only argument is a Context
. This Context
is the new main way to interface with the application. It can be cheaply cloned, so lifetime and mutability is not a concern.
I've also completely removed the experimental physics engine behind the physics
feature flag. This was a nice experiment and I learned a lot, but I think it's better to integrate a more mature engine in the future. Rapier has seen some nice developments lately.
Fixed
- (build) fix compilation for WASM target
- (window) handle exit event
Other
- (project) [breaking] replace
PixelGame::update
&PixelGame::render
with singularPixelGame::tick
, change vek library to glam and glamour
pixel-game-lib-v0.9.0-alpha
This alpha release is a complete rewrite of the library. I was slowly moving towards an integrated game-engine instead of a utility toolbox, and I'm embracing that now.
The biggest change is that the pixel-based CPU renderer is now replaced with an instanced GPU renderer. A nice plus and what makes this game engine novel, as far as I know, is that pixel sprites can be rotated, and they will be nicely rendered using the RotSprite algorithm. This is implemented as a branchless, single-pass shader and I will write a blog post about this technique later.
The basic draw loop, where you can load an image sprite of the disk and draw it on the screen, is implemented, but a lot of essential functionality is still missing.
The window
function is also now made private and the only way to use the engine is by implementing the PixelGame
trait.
Added
- (profile) Allow
in-game-profiler
feature flag for showing a profiler overlay, use proper color space for background and viewport colors - (window) [breaking] add
background_color
andviewport_color
options toWindowConfig
- (graphics) update Scale2X to Scale3X with proper sampling
- (graphics) use Scale2X for upscaling the sprites
- (graphics) create letterbox with in the future integer scaling for the buffer
- (graphics) expose
RenderContext::draw_sprite_rotated
which also allows future 2D scaling and skewing - (graphics) make
Sprite
a GPU instanced rendering pipeline - (bitmap) add
from_bitvec
andclone_with_padding
toBitMap
- (bitmap) implement floodfill
- (bitmap) allow toggling a single value
- (bitmap) add
BitMap
for 2D masking operations on buffers
Fixed
- (graphics) [breaking] Use
Into<Rotation>
as argument fordraw_sprite_rotated
- (wasm) build again on WASM with WebGL2 and cleanup
- (project) use proper relative mouse coordinates and cleanup small pieces of code and examples
- (graphics) use proper alpha blending for components
- (graphics) properly render output buffer in viewport
- (graphics) render pixel graphics to proper buffer size with upscaling and downscaling preparing for rotsprite like algorithms
- (deps) update rust crate winit to 0.29.15
- (deps) update rust crate bytemuck to 1.15.0
- (deps) update rust crate miette to 7.2.0
- (deps) update rust crate blit to 0.8.5
Other
- (project) cleanup and prepare for beta release
- (ci) fix test and wasm-build step
- (project) [breaking] make
window
function private, batch render calls inrender
trait method withRenderContext
- (project) [breaking] remove gui, reorganize most components related to rendering
- (window) [breaking] start replacing CPU based pixel renderer with GPU based one
pixel-game-lib-v0.8.0
Added
- (physics) add square, triangle and circle collider shapes
- (audio)
audio
crate feature for playing audio, based on the Kira crate
Fixed
- (deps) update rust crate winit to 0.29.14
- (deps) update rust-wasm-bindgen monorepo
- (ci) install audio dependency in CI
- (window) [breaking] re-export proper window types for the input helper
- (deps) update rust crate winit_input_helper to 0.16.0
- (audio) hide module definition behind feature flag
- (canvas) ensure line drawing doesn't go out of bounds
- (state) use proper aliased input type
Other
- (ci) only test on Linux and run check on the other platforms
pixel-game-lib-v0.7.0
Added
- (state) create a
PixelGame
trait which simplifies setting up a new game with a window
Fixed
- (deps) update rust crate winit to 0.29.13
- (assets) [breaking] improve ergonomics of
asset
andasset_owned
by making the path an anonymous generic - (deps) update rust crate assets_manager to 0.11.3
Other
- (example) fix 'physics' import
pixel-game-lib-v0.6.1
Other
- (window) perform color conversion on GPU with a custom shader instead of on CPU
- (window) use
Rc
instead ofArc
for the window handler - (canvas) improve
draw_line
performance by switching from 'line_drawing' to the 'clipline' crate
pixel-game-lib-v0.6.0
Added
- (gui) [breaking] embed default GUI elements behind feature flag
default-gui
- (dialogue) implement dialogue feature based on Yarn Spinner
Fixed
- (deps) update rust crate winit to 0.29.11
Other
- (ci) fix WASM build and test out of space
- (example) fix dialogue example buttons
- (example) draw options as GUI buttons
pixel-game-lib-v0.5.0
Fixed
- (sprite) take offset into account when drawing
- (deps) update rust crate image to 0.24.9
Other
- (serde) [breaking] add
deny_unknown_fields
to all items implementingDeserialize