All Versions
56
Latest Version
Avg Release Cycle
31 days
Latest Release
437 days ago

Changelog History
Page 3

  • v0.4.0 Changes

    June 24, 2020

    โž• Added

    • The mouse can now be grabbed by the window. (@tatref in #184)
      • This is exposed via the grab_mouse method on ContextBuilder, and the is_mouse_grabbed/set_mouse_grabbed functions in the window module.

    ๐Ÿ”„ Changed

    • ๐Ÿ’ฅ Breaking: The text rendering API has been rewritten from scratch.
      • It now uses ab_glyph instead of rusttype, which allows us to support OTF fonts, and should be faster in general.
      • This also fixes several long-standing bugs with text rendering (#125, #161, #180).
      • The new API has been written with the requirements of bitmap fonts in mind, and a loader for these will likely be added in a future version.
      • As this API may expand in the future, it has been moved into the tetra::graphics::text submodule to avoid cluttering the main graphics module.
    • ๐Ÿ‘Œ Improved the documentation for various types' performance characteristics.
    • ๐Ÿ’ฅ Breaking: Updated vek to 0.11.
      • As Vek is exposed via Tetra's API in the form of the tetra::math module, this is potentially a breaking change.
    • โšก๏ธ Updated hashbrown to 0.8.

    โœ‚ Removed

    • ๐Ÿ’ฅ Breaking: Font no longer implements Default, and the Deja Vu Sans Mono font is no longer bundled with Tetra (#174).
      • It was previously a little murky whether or not the default font's license needed to be included even when you're not using it, due to the bytes being included in the binary.

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed an issue where gamepad axis ranges were not being correctly mapped from integers to floats.
  • v0.3.6 Changes

    May 15, 2020

    โž• Added

    • A new suite of functions has been added to the window module, allowing you to query info about the monitors that are connected to the current device.

    ๐Ÿ”„ Changed

    • ๐Ÿฑ The window is now hidden when the game loop is not running. This avoids issues where the window would be displayed before the game has a chance to fully load assets, or to determine ideal rendering sizes.

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed an issue where OpenGL objects would not be properly unbound when they were dropped.
    • ๐Ÿ›  Fixed an issue where the OpenGL buffer attributes were not being set correctly.
  • v0.3.5 Changes

    April 25, 2020

    โž• Added

    • File drag and drop events can now be detected via Event::FileDropped.
    • The clipboard can now be manipulated via input::get_clipboard_text and input::set_clipboard_text.
    • input::get_key_modifier_down and input::get_key_modifier_up have been added, allowing for code handling the control, alt and shift keys to be made more compact.
    • An Animation can now be set to stop playing after all the frames have been displayed, instead of looping. This can either be controlled by the set_repeating method, or you can create a non-looping animation directly by calling Animation::once.
    • hex and try_hex constructors have been added to Color.

    ๐Ÿ”„ Changed

    • โšก๏ธ Updated sdl2 to 0.34.
  • v0.3.4 Changes

    April 12, 2020

    โž• Added

    • Animation now exposes methods for getting and setting the current frame index, and the amount of time that the current frame has been displayed for. This can be useful when implementing more complex animation behaviors. (@VictorKoenders in #169)
    • Some utility methods have been added to Rectangle for getting the co-ordinates of the sides, center and corners.
    • A content_mut getter has been added to Text, allowing the content to be mutated using the standard String API (e.g. push_str, clear, etc.).
  • v0.3.3 Changes

    April 04, 2020

    โž• Added

    ๐Ÿ”„ Changed

    • ๐ŸŽ The internal representation of Texture objects has been changed to improve performance.
    • โšก๏ธ Updated sdl2 to 0.33.
    • โšก๏ธ Updated hashbrown to 0.7.
    • โšก๏ธ Updated image to 0.23.
    • โšก๏ธ Updated rodio to 0.11.
  • v0.3.2 Changes

    January 15, 2020

    โž• Added

    • Rectangle::intersects, Rectangle::contains and Rectangle::contains_point have been added.

    ๐Ÿ”„ Changed

    • Added a missing function parameter to window::set_mouse_visible, so that you can actually set the value.
      • This is technically a breaking change, but given that the functionality is completely broken, this will be included in a patch release rather than 0.4.
    • ๐Ÿ‘ Restructured the platform layer to better facilitate new backends in the future.
    • ๐Ÿ‘Œ Improved docs for the math module to make it clearer why a re-export is used.
    • โšก๏ธ Updated glow to 0.4.
  • v0.3.1 Changes

    December 15, 2019

    ๐Ÿ›  Fixed

    • ๐Ÿ›  Fixed an issue with variable timesteps causing an infinite loop.
  • v0.3.0 Changes

    December 14, 2019

    โž• Added

    • The State trait now provides an event method for hooking into window/input events. This is useful in scenarios where you want to be notified of events rather than polling (for example, reacting to window size changes).
    • โšก๏ธ A Context can now be configured to have a variable update rate, if that suits your game/architecture better. This is exposed via the time_step method on ContextBuilder.
    • ๐Ÿ›  Several new functions have been added to the time module, to support both variable and fixed timesteps.
    • Functions for getting and setting vsync have been added to window.
    • Details of the active graphics device can now be retrieved by calling graphics::get_device_info.
    • Shader::from_vertex_string and Shader::from_fragment_string constructors have been added.
    • Color::RED, Color::GREEN and Color::BLUE constants have been added.
    • graphics::get_transform_matrix, graphics::set_transform_matrix and graphics::reset_transform_matrix has been added, which allows you to apply a transformation to your rendering.
    • The Camera struct has been added, which provides a simple way of creating a transform matrix.
    • ๐Ÿ‘ Serde support has been added (via the serde_support Cargo feature) for the following types:
      • graphics::Color
      • graphics::Rectangle
      • input::Key
      • input::MouseButton
      • input::GamepadButton
      • input::GamepadAxis
      • input::GamepadStick
      • Various math types, as defined by the Vek crate.

    ๐Ÿ”„ Changed

    • โœ… Tetra now targets the latest stable Rust compiler, rather than a fixed minimum version. This will hopefully change once Cargo has better functionality for enforcing minimum supported compiler versions - currently it's impossible to make guarentees, as our dependencies can change their minimum versions at will.
    • State::draw no longer takes the blend factor as a third parameter - instead, you can call the new time::get_blend_factor function.
    • ๐Ÿšš Key and MouseButton are now Tetra-specific types, rather than re-exporting the SDL versions. Note that some names have been changed for consistency, and some variants have been removed to simplify the docs.
    • ๐Ÿ”€ TetraError::Sdl and TetraError::OpenGl have been merged into TetraError::PlatformError, since they both represent the scenario where something's gone seriously wrong with the underlying platform.
    • DEFAULT_VERTEX_SHADER and DEFAULT_FRAGMENT_SHADER are now const instead of static.
    • Screen scaling has been extracted from the core of the engine, and is now provided via the ScreenScaler struct. This allows it to be more flexibly integrated with the rest of your game's rendering.
    • Various functions now return errors instead of panicking.
    • TetraError has been reorganized, so that the errors returned are more descriptive.
    • The glm module has been renamed to math, and the nalgebra-glm dependency has been replaced with vek.
    • Vec2 is now exported from math, not graphics.
    • More types can now be passed into shader uniforms via the UniformValue trait.
    • 0๏ธโƒฃ The graphics device debugging info is now hidden by default. Set the debug_info option on Game to true to bring this back.
    • The functions for setting the fullscreen/cursor visibility state have been changed to take booleans, instead of there being multiple functions.
    • The Shader::vertex and Shader::fragment constructors have been renamed to Shader::from_vertex_file and Shader::from_fragment_file.
    • Animations now use a Duration to specify the frame length, and as such, they are no longer coupled to your game's tick rate. Call advance from your draw method to advance the animation's timer.
    • โšก๏ธ Updated glow to 0.3.0-alpha3.
    • โšก๏ธ Updated hashbrown to 0.6.
    • โšก๏ธ Updated image to 0.22.
    • โšก๏ธ Updated glyph_brush to 0.6.
    • โšก๏ธ Updated rodio to 0.10.

    โœ‚ Removed

    • time::duration_to_f64 and time::f64_to_duration have been removed, as the standard library now provides this functionality (Duration::from_secs_f64 and Duration::as_secs_f64 respectively).
    • ๐Ÿšš ContextBuilder::tick_rate has been removed, as ContextBuilder::time_step now fulfils the same purpose.
    • โœ‚ Removed deprecated sub-modules from graphics.
    • โœ‚ Removed deprecated color::BLACK and color::WHITE constants - use Color::BLACK and Color::WHITE instead.
    • Removed deprecated from_data constructors - use from_file_data instead.
    • โœ‚ Removed deprecated DrawParams::build_matrix method.
    • โœ‚ Removed re-exports of Animation and NineSlice from graphics - from now on this functionality will be accessible via graphics::animation and graphics::ui respectively.
  • v0.2.20 Changes

    July 13, 2019

    ๐Ÿ”„ Changed

    • All of the SDL2 code is now localized to a single platform module. This is a first step towards decoupling the engine from any particular windowing library.
    • The OpenGL backend is now implemented using glow.
    • ๐Ÿ—„ The public module structure of graphics has been simplified, so that only animation and GUI code is grouped into submodules, not 'primitive' types. The existing paths have been deprecated.
    • ๐Ÿ—„ The BLACK and WHITE color constants are now associated with the type, not the module. The existing constants have been deprecated.
    • Color::rgb, Color::rgba and Rectangle::new are now const fn.
    • โšก๏ธ Updated glyph-brush to 0.5.3.

    ๐Ÿ›  Fixed

    • window::is_mouse_visible now actually returns a value (whoops).
  • v0.2.19 Changes

    June 13, 2019

    โž• Added

    • Textures and canvases now provide a method for setting the texture filtering mode.

    ๐Ÿ”„ Changed

    • โšก๏ธ Updated image to 0.21.2.
    • โšก๏ธ Updated hashbrown to 0.5.0.
    • โšก๏ธ Updated rodio to 0.9.0.