Tile Movement

Info

Project Type: Gamemaker 2 Game

Timeframe: 2019

Video

Product Overview

One of my older projects. This is a prototype of a tile based movement system focused on getting smooth responsive movement with directional input. Move around, defeat the enemies and move on to the next room. Made around 2019 or so.

Project Overview

Made on my own over a few days, main focus was on getting a smooth feeling tile based movement system in gamemaker, which was my engine of choice at the time. After the movement was implemented I made some sprites, levels and a simple 'pathfinding' system that picks the unoccupied tile that is closest to the target.

Code

Try Move

The main challenge was allowing characters to move around without phasing into walls or eachother. The try-move function is a generic solution to this problem. It tests if the proposed movement would overlap with a non-walkable tile on the floor map. As well as testing if any other character is trying to move to that position.

AI Movement

The AI in the game is a simple example of how the try move function could be used in context.