Tetra v0.6.0 Release Notes

Release Date: 2021-02-05 // about 3 years ago
  • โž• Added

    • All drawable objects now have an inherant draw method, instead of relying on Drawable/graphics::draw.
    • Texture::draw_region can be used to draw a sub-section of a texture.
    • Texture::draw_nine_slice can be used to draw UI panels.
    • DrawParams::to_matrix has been added, which can be used to create a transformation matrix matching the behaviour of DrawParams.
    • Font now has a from_vector_file_data constructor, which is a shortcut for VectorFontBuilder::from_file_data(data)?.with_size(ctx, size). (@fossegutten in #232)
    • Mesh now has methods for getting and setting the winding order, which will automatically be applied when drawing it.
    • Mesh now has methods for getting, enabling and disabling backface culling.
    • A new Canvas::multisampled constructor has been added, allowing for off-screen rendering with MSAA.
    • ๐Ÿ“„ More example links have been added to the docs, where appropriate.

    ๐Ÿ”„ Changed

    • ๐Ÿ’ฅ Breaking: Mesh and shape rendering types have been moved to graphics::mesh, to avoid cluttering the main graphics module.
    • ๐Ÿ’ฅ Breaking: The zoom field on Camera has been renamed to scale, and is now a Vec2<f32>.
      • Note that numeric operations are implemented on Vec2<f32> for f32, so you can still add/subtract/multiply/divide both components at the same time.
    • ๐Ÿ’ฅ Breaking: Text::draw and Text::get_bounds now take &mut self.
      • This better reflects the fact that they cache geometry under the hood, and avoids RefCell overhead.
    • ๐Ÿ’ฅ Breaking: NineSlice is now a config object for Texture::draw_nine_slice, rather than a wrapper for a texture.
    • ๐Ÿ’ฅ Breaking: Font are now sized and positioned more accurately, and should look the same in Tetra as in other programs. (@fossegutten in #229)
      • This is not an API breaking change, but will alter the behaviour of existing games.
    • ๐Ÿ’ฅ Breaking: FLAC audio support has been disabled by default - use the audio_flac feature to re-enable it.
    • ๐Ÿ’ฅ Breaking: Updated vek to 0.13.
      • As Vek is exposed via Tetra's API in the form of the tetra::math module, this is potentially a breaking change.
    • time::get_delta_time now returns a fixed value when called from update in fixed timestep mode.
      • Using delta time in fixed timestep mode is not required, but can be useful if you want to measure things in 'per second' terms rather than 'per frame'.
      • Previously, trying to use delta time in this way could introduce floating point error/non-determinism into your game logic, and would break in the case of a double update.
    • The audio files for the tetras example are no longer ridiculously big.

    โœ‚ Removed

    • ๐Ÿ’ฅ Breaking: graphics::draw and the Drawable trait has been removed.
    • ๐Ÿ’ฅ Breaking: DrawParams::clip has been removed.
      • Texture::draw_region can be used instead.
    • ๐Ÿ’ฅ Breaking: graphics::get_front_face_winding and graphics::set_front_face_winding have been removed.
      • Mesh::front_face_winding and Mesh::set_front_face_winding can be used instead.
    • ๐Ÿ’ฅ Breaking: graphics::ui has been removed.
      • NineSlice is now located in graphics.