Showing results for

player

movement

on www.redblobgames.com
redblobgames.com › articles › coordinate transforms › 2016
Coordinate transformations
...In some games the player can scroll around manually. In other games the camera follows the player.
How does a camera work?
A camera...
redblobgames.com › x › 2327 roguelike dev
2023 Summer Roguelike project
...colonist’s movement. To reduce the scope of the game, I’m going to try simplifying the pathfinding requirements.
- The player won’t dig...
redblobgames.com › x › 2226 roguelike dev
2022 Summer Roguelike project
...Stepping back a bit, I had been starting from the “adventure mode” style movement for your player character, but I have to admit, I...
redblobgames.com › x › 2025 roguelike dev
2020 Summer Roguelike project
...The final step is to make player movement not allow moving onto a wall. I modified the movement function to check if the map...
redblobgames.com › pathfinding › grids › graphs.html
Grids and Graphs
...result.append([node[0] + dir[0], node[1] + dir[1]]) return result
If your game allows diagonal movement, you’ll have eight...
redblobgames.com › x › 2126 roguelike dev
2021 Summer Roguelike project
...when the player enters the room; one option would be to stay out of the way and sneak past them -
[ ]
movement — instead of always...
redblobgames.com › articles › curved paths
Curved Paths
...Why?
- Converting positions to distances lets us calculate the lengths of road segments, which are used for pathfinding and movement.
- To animate a vehicle...
redblobgames.com › pathfinding › tower defense
Flow Field Pathfinding for Tower Defense
...Enemies will move in the direction that gets them closer to the player:
How would we implement this?
Graph search algorithms like A* are...
redblobgames.com › grids › hexagons › implementation.html
Implementation of Hex Grids
...I’ll call this the Hex class.
- For some games I want to show coordinates to the player, and those will probably not be...
redblobgames.com › articles › noise › introduction.html
Noise Functions and Map Generation
...Another way to use noise is as a movement from a previous value. For example, if the noise function returns [2, -1, 5]
then...