Showing results for

player

movement

on sokoban.iolivia.me
sokoban.iolivia.me › c02 03 push box
Pushing boxes - Rust sokoban
...In this section we'll add some logic for more intelligent player movement.
Movement components
First, we need to make our code slightly more...
sokoban.iolivia.me › c01 02 ecs
Entity Component System - Rust sokoban
...up of multiple components, for example a player might be made up by Position, Renderable & Movement, while the floor might just be Position & Renderable...
sokoban.iolivia.me › c01 03 entities components
Components and entities - Rust sokoban
...We previously discussed Position, Renderable and Movement - we'll skip movement for now. We will also need some components to identify each entity - for...
sokoban.iolivia.me › c02 02 move player
Moving the player - Rust sokoban
...As you might have noticed this is not a great experience as a player because you don't have good control over the movements...
sokoban.iolivia.me › print
Rust sokoban
...In this section we'll add some logic for more intelligent player movement.
Movement components
First, we need to make our code slightly more...
sokoban.iolivia.me › c02 05 gameplay
Gameplay - Rust sokoban
Gameplay
The player character is able to move and push boxes on the field. Many (but not all!) games have some kind of objective...
sokoban.iolivia.me › c02 04 modules
Modules - Rust sokoban
...10, ..position }, Renderable { path: "/images/player.png".to_string(), }, Player {}, Movable {}, )) } }
Now for the map loading.
#![allow(unused)] fn main() { // map.rs use crate...
sokoban.iolivia.me › c03 02 animations
Animations - Rust sokoban
...For example, to get our player blinking we'll have three animation frames:
- our current player with the eyes open
- player with eyes a...
sokoban.iolivia.me › c03 05 batch rendering
Batch rendering - Rust sokoban
...have a fairly simple game and our logic for input and movement is not actually that complex, we also don't have that many...