Showing results for

player

movement

on rogueliketutorials.com
rogueliketutorials.com › tutorials › tcod › 2019
Part 5 - Placing Enemies and kicking them (harmlessly) · Roguelike Tutorials
...Depending on whether or not its the players turn, we want to control the
player’s movement. The player can only move on the...
rogueliketutorials.com › tutorials › tcod › 2019
Part 8 - Items and Inventory · Roguelike Tutorials
Part 8 - Items and Inventory
So far, our game has movement, dungeon exploring, combat, and AI (okay, we’re stretching the meaning of “intelligence...
rogueliketutorials.com › tutorials › tcod › v2
Part 9 - Ranged Scrolls and Targeting · Roguelike Tutorials
...By using the same movement keys we use to move the player around, we can move the cursor around, with a few extra options...
rogueliketutorials.com › tutorials › tcod › 2019
Part 6 - Doing (and taking) some damage · Roguelike Tutorials
...For the player, that’s easy enough; we just need to update handle_keys
to allow us to move diagonally. Modify the movement part of...
rogueliketutorials.com › tutorials › tcod › 2019
Part 2 - The generic Entity, the render functions, and the map · Roguelike Tutorials
...movement so that the Entity class handles the actual movement.
if move:
dx, dy = move
- player_x += dx
- player_x += dy
rogueliketutorials.com › tutorials › tcod › v2
Part 6 - Doing (and taking) some damage · Roguelike Tutorials
...action = WaitAction(player) ...
The MOVE_KEYS
dictionary holds various different possibilities for movement. Some roguelikes utilize the numpad for movement, some use “Vi Keys.” Ours...
rogueliketutorials.com › tutorials › tcod › v2
Part 7 - Creating the Interface · Roguelike Tutorials
...GameMap
def __init__(self, player: Actor):
self.event_handler: EventHandler = MainGameEventHandler(self)
+ self.message_log = MessageLog()
self.player = player
rogueliketutorials.com › tutorials › tcod › v2
Part 2 - The generic Entity, the render functions, and the map · Roguelike Tutorials
...movement so that the Entity class handles the actual movement.
if isinstance(action, MovementAction):
- player_x += action.dx
- player_y += action.dy
+ player...
rogueliketutorials.com › tutorials › tcod › v2
Part 10 - Saving and loading · Roguelike Tutorials
...player = self.engine.player
key = event.sym
index = key - tcod.event.K_a
if 0 <= index <= 26:
try:
rogueliketutorials.com › tutorials › tcod › 2019
Part 11 - Delving into the Dungeon · Roguelike Tutorials
...character_screen(player, 30, 10, screen_width, screen_height)
Final thing before we wrap up this chapter: Awhile ago, we included
diagonal movement for the player character...