Unreleased - ReleaseDate
6.0.0 - 2023-12-03
WindowDescriptor
has been renamed toWindow
- You must new add
#[derive(Resource)]
above yourGameState
struct. - It is no longer possible to use the unit type
()
instead of aGameState
struct. Always create aGameState
struct (it can be an empty struct with no fields). - The
Timer
now takes aTimerMode
enum variant instead of abool
. UseTimerMode::Once
for a timer that runs once, orTimerMode::Repeating
for a repeating timer. - The following
KeyCode
variants have been renamed:LShift
->ShiftLeft
RShift
->ShiftRight
LAlt
->AltLeft
RAlt
->AltRight
LBracket
->BracketLeft
RBracket
->BracketRight
LControl
->ControlLeft
RControl
->ControlRight
LShift
->ShiftLeft
LWin
->SuperLeft
RWin
->SuperRight
- Update bevy from 0.8 to 0.12
- Update bevy_prototype_lyon from 0.6 to 0.10
- Update ron from 0.7 to 0.8
- Fixed some inconsistent parameter names in examples
- Some examples' audio was turned down lower
5.2.1 - 2022-11-15
- The
collider
(example) editor now snaps to half-pixels. - The
collider
(example) editor now handles relative paths that begin with./
or.\
, which was especially vexing to powershell users. Contributed by @webbertakken in #59.
5.2.0 - 2022-09-13
- Added
KeyboardStateChain
andMouseStateChain
to provide a functional interface for dealing with user input. Call.chain()
onKeyboardState
orMouseState
to access them. These new structs have methods with the same names as in theirChain
-less variants which accept closures to perform the logic, and can be chained. Contributed by @just-do-halee in #55.
CollisionPair
now implementsIntoIterator
, so you can do, for example:for label in event.pair { ... }
. Contributed by @just-do-halee in #55.
5.1.1 - 2022-08-01
- Updated to
bevy 0.8
andbevy_prototype_lyon 0.6
under the hood, which resolves the occasional stuttering problem.
5.1.0 - 2022-06-18
- Fixed
CollisionPair::either_contains
to use.contains
instead of==
, contributed by @etnt in #51 - Added
CollisionPair::either_equals_to
which uses==
, contributed by @etnt in #51 - Fixed documentation for a few fields of the
Engine
struct which were in the wrong place. - Improved CI caching. Builds should now generally complete in under 3 minutes.
5.0.6 - 2022-05-19
- Made a pass through the API documentation and Tutorials, clarifying, correcting, and filling in blanks.
- Reduced the debug level of logging the window dimension resizing from info to debug
5.0.5 - 2022-05-10
- Dropped the lazy_static, log, and env_logger dependencies.
Yes, I know I shouldn't be releasing breaking changes in a patch release...but no one should be using any 5.x versions until I start teaching classes with it publicly...so I'm going to break it until I start teaching with 5.x.
- Updated font loading to be rooted in
assets/
instead ofassets/font/
5.0.4 - 2022-05-09
- Updated to bevy 0.7 and bevy_prototype_lyon 0.5
- Stopped using bevy_kira_audio in favor of the built-in bevy audio which nows has all the features we need.
- Renamed the music file extensions to
.ogg
since bevy doesn't support that file extension yet -- this means the asset pack is now different.
5.0.3 - 2022-04-29
- The
level_creator
example can be installed globally withcargo install rusty_engine --example level_creator
and run in the root of your own project withlevel_creator
.
- Fixed sprite preset paths which broke due to the changes in 5.0.2
5.0.2 - 2022-04-29
- The
collider
example can be installed globally withcargo install rusty_engine --example collider
and run in the root of your own project withcollider assets/some-image.png
.
- The
collider
example can now load sprites from anywhere insideassets/
, instead of only from insideassets/sprite/
.
5.0.1 - 2022-04-11
- Implemented all the common traits on public
struct
s andenum
s that made sense. - Added documentation for a few structs, enums, and methods that were missing it.
- The
collider
example once again properly regenerates the visualization for circle colliders whenever they are created or altered. - Changed visibility of internal Bevy plugins from
pub
topub(crate)
. Technically this is a breaking change, but these wouldn't have been usable to anyone anyway so I'm ignoring the technicality.
5.0.0 - 2022-03-12
- Logic functions no longer return a
bool
to simplify the learning curve. If you want logic functions to run conditionally, instead track your state in yourGameState
and use it to exit early from your logic function. - The
EngineState
struct andengine_state
variables have been renamed toEngine
andengine
, respectively, for brevity.
4.0.0 - 2022-01-29
Game
is now generic over the user-provided game state struct, so theinit!
macro from the short-lived3.0.0
version has been removed! All you need to do is delete the macro call if you have it.EngineState.debug_sprite_colliders
has been renamedEngineState.show_colliders
for clarity.- Renamed the
collider_creator
example tocollider
for brevity. - Added
Sprite.collider_dirty
which you can set to true to regenerate a collider. Necessary if you manually replaceSprite.collider
with a new collider.
- Upgraded to Bevy 0.6.
Text
rotation and scale now works! 🎉- Switched to
bevy_prototype_lyon
to power the debug lines. They look much nicer now that I can choose the line thickness. - Updated (or finished) all of the game scenario descriptions.
- Updated the tutorial.
3.0.0 - 2021-12-30
- The fundamental way that Rusty Engine connects a user's game state to Bevy has been heavily
refactored to a new solution based on macros so that users can provide a custom struct with their
desired game state. This obseletes the old generic vectors and maps of various types that used to be
stored on the
GameState
struct (which itself has been renamed toEngineState
to more accurately describe what it is used for). Please refer to the readme and docs for comprehensive documentation on the new approach. - Placing the module-level macro call
rusty_engine::init!(MyGameState)
is now required.MyGameState
is any user-defined struct type that will be passed to the logic functions each frame. GameState
has been renamed toEngineState
so that user's custom game state can be referred to asGameState
instead.GameState::add_actor
has been renamed toEngineState::add_sprite
GameState::add_text_actor
has been renamed toEngineState::add_text
Game
now implementsDeref
andDerefMut
forEngineState
, so you can easily accessEngineState
's methods fromGame
inmain.rs
for your game setup.Game::game_state_mut
has been removed (if it had stayed it would have been renamedengine_state_mut
, but with the deref implementations it's not needed at all).GameState.screen_dimensions
, which was set at startup and never updated, has been replaced byEngineState.window_dimensions
, which is updated every frame so resizing the window can be handled in your game logic.- Multiple logic functions can now be run. Pass them to
Game::run
in the order you would like them run. Returnfalse
to abort running any later functions during the frame. - Logic functions now need to fit the signature
fn somename(engine_state: &mut EngineState, game_state: &mut GameState) -> bool
, whereGameState
is the user-defined struct passed torusty_engine::init!()
, or()
if nothing was passed in. .play_sfx()
now takes a volume level from0.0
to1.0
as a second argument, e.g..play_sfx(SfxPreset::Congratulations, 1.0)
Actor
has been renamed toSprite
to eliminate the confusing "actor" terminalogy.Actor::build
has been replaced bySprite::new
, which must be used to create aSprite
instead of defining a struct literal (enforced via private phantom data). TheDefault
implementation has been removed because of the previous restriction.Actor.preset
has been removedActor.filename
(aString
) has been replaced withSprite.filepath
(aPathBuf
)- The builder methods
Actor::set_collision
andActor::set_collider
have been removed since we never ended up adopting a builder pattern. Sprite.collider_filepath
has been addedSprite::write_collider
has been added (see note below about changes to colliders)
TextActor
has been renamed toText
to eliminate the confusing "actor" terminology.TextActor.text
is nowText.value
for similar reasons.
Sprite
s may now be created with either aSpritePreset
or the path to an image file via bothSprite::new
orEngineState::add_sprite
. The image file needs to be stored inassets/sprite
or one of its subdirectories. When specifying the path to the file, the path relative toassets/sprite
should be used. For example, if your image isassets/sprite/circus/animal.png
then you would passcircus/animal.png
to one of the methods to create the sprite.SpritePreset::build_from_name
andSpritePreset::build
have been removed (see note above about the new, more flexible way to create sprites)SpritePreset::collider()
has been removed since colliders are no longer hard-coded features of presets (see note below about changes to colliders)SpritePreset::filename -> String
has been replaced bySpritePreset::filepath -> PathBuf
, which powers theimpl From<SpritePreset> for PathBuf
implementation.- Colliders are now loaded from collider files. Collider files use the Rusty Object Notation (RON) format. The easiest way to create a collider is to run the
collider_creator
example by cloning therusty_engine
repository and runningcargo run --release --example collider_creator relative/path/to/my/image.png
. The image needs to be somewhere inside theassets/
directory. You could also create the collider programmatically, set it on theSprite
struct, and call the sprite'swrite_collider()
method. Or you could copy an existing collider file, name it the same as your image file (but with the.collider
extension) and change it to match your image. Collider coordinates need to define a convex polygon with points going in clockwise order. Coordinates are floating point values relative to the center of the image, with the center of the image being (0.0, 0.0). - All sprites' colliders in the asset pack have been recreated more cleanly using the new
collider_creator
example. - The
assets/fonts
directory in the asset pack has been renamed toassets/font
for consistency with the other directories. KeyboardState
andMouseState
now both have 6 similar methods for processing key- and button-presses:pressed
->pressed_any
just_pressed
->just_pressed_any
just_released
->just_released_any
AudioManager::music_playing()
will return whether or not music is currently playing (accessible throughEngineState:audio_manager
)- A custom font may now be selected by placing it in
assets/font
and specifying the relative filepath onText.font
. - Custom sounds may now be played via
AudioManager::play_music
andAudioManager::play_sfx
by specifying a path to a sound file relative toassets/audio
. Collider
now implementsPartialEq
,Serialize
, andDeserialize
Collider::is_convex
was added to make it easier to tell if you have a convex collider.- The
collider_creator
example was added to make it easy to load a sprite and make a collider file for it. Place your image file (let's call itmy_image.png
) anywhere inside your local clone of the Rusty Engineassets/
directory and then run the example:cargo run --release --example collider_creator -- assets/my_image.png
. Afterwards, copy the image file and the new collider filemy_image.collider
file over to the assets directory of your own project. - You can now toggle debug rendering of colliders by setting
EngineState.debug_sprite_colliders
totrue
. Thecollision
example will now toggle that value when you press theC
key. - (meta) Improved CI times by using sccache together with GitHub Actions caching
- Circular colliders no longer have duplicate starting and ending coordinates
2.0.1 - 2021-11-15
- Print out error and URL if assets directory is not present
2.0.0 - 2021-09-09
- Renamed
GameState.cursor_moved_events
toGameState.mouse_location_events
- Renamed
Gamestate.delta_seconds
toGameState.delta_f32
- Renamed
Gamestate.seconds_since_startup
toGameState.time_since_startup_f64
- Added
GameState::keyboard_state
(and a newKeyboardState
struct), to determine the current state of the keyboard. This should be preferred over keyboard events when dealing with character movement, etc. - Added
GameState::mouse_state
(and a newMouseState
struct), to determine the current state of the mouse. In most cases, this should be preferred over mouse methods when dealing with character movement, etc. - Added a new
MouseWheelState
struct to represent the state of the mouse wheel, which is a simplified representation of cumuluative mouse wheel events. - Added an "Extreme Driver's Ed" scenario reference implementation (
cargo run --release --example extreme_drivers_ed
). - Documented
GameState
- Added
GameState.vec2_map
andGameState.vec2_vec
as collections for the user to store state in. - Switched all instances of
std::collections::HashMap
tobevy::utils::HashMap
. - Updated all examples to adjust for breaking changes, also:
- The
keyboard
example has been renamed tokeyboard_events
to distinguish it from the newkeyboard_state
example which usesKeyboardState
for smooth movement - The
mouse
example has been renamed tomouse_events
to distinguish it from the newmouse_state
example which usesMouseState
for smooth movement
- The
- Added now
level_creator
example to use as a rudimentary level creator (originally added in 1.1.0)
1.1.4 - 2021-08-26
- Improve documentation in the
actor
module
1.1.3 - 2021-08-26
- level_creator: enable collision in generated code
1.1.2 - 2021-08-26
- level_creator: have current actor on top of placed actors
1.1.1 - 2021-08-25
- level_creator: Start the actors at normal scale
1.1.0 - 2021-08-25
- Bump
env_logger
to0.9
- Add
level_creator
example. Try it out withcargo run --release --example level_creator
ActorPreset
gained several new abilities:- It now implements the
PartialEq
trait .build_from_name()
allows building a preset from a string.prev()
and.next()
allow iterating over presets based on the current preset
- It now implements the
GameState
gainedf32_map
andf32_vec
fields for storingf32
values
1.0.3 - 2021-06-22
- Fixed an incompatibility with Rust versions
< 1.53.0
1.0.2 - 2021-06-22
- Added Car Shoot reference implementation (still needs a scenario writeup)
- Added some helper methods to
CollisionPair
- Fixed
CollisionPair
tuple members not beingpub
1.0.1 - 2021-06-22
- Fixed a bug in the
Hash
trait implementation forCollisionPair
- Fixed clippy warnings
1.0.0 - 2021-06-22
- Created some game scenarios (only Road Racer is fully complete)
- Created Road Racer reference example
- Added ability to configure window settings
- Set default window title
- Overhauled readme
- Improved
GameState
andCollisionState
by adding some methods - Made volume configurable when starting to play music
- Made a way to stop playing music
- Added instructions for how to download assets
0.13.0 - 2021-06-21
- All the basic features for 1.0
- This release is to test the remaining 1.0 functionality, but not all the documentation and scenarios are written, so we're not quite ready for 1.0.
0.12.0 - 2021-06-16
- Gut the entire project and started over by wrapping Bevy with a simple interface for beginners to use.
- Implement the following features: GameState, Actors w/Transform handling, Sprites w/asset pack, audio sfx/music with asset pack, timer utility.
- Add a release config and release doc
0.0.1 - 0.11.0
- Rapid, messy development based on gfx via
glium
, sound viarusty_audio
, timing viarusty_time
, and custom logic for everything else. This approach never reached a very usable state.