GB Studio Diagonal 8 Direction Movement
A downloadable asset pack
This is a GB Studio (v2.0) engine mod that allows for diagonal movement within top-down mode.
Features:
The player will not stop moving when walking diagonally into a collision but will strafe in the next unblocked direction. For example, if the player holds up and right, this will happen when hitting an obstacle:
Extra feature unrelated to diagonal movement: when players walk up or down (straddling) into a left/right collision, it will be treated as a collision. Currently the player will walk through into the collision which is probably not what you want.
Installation
To use this mod, eject engine, copy TopDown.c into the location below and replace the existing file:
\assets\engine\src\states\TopDown.c
I have tested it and it seems to work fine but use at your own risk and read up on engine eject first. I take no responsibility if it eats your game.
Why this is needed
As of now, GB Studio 2.0's top-down mode does not have 8 direction (diagonal) movement, it only has 4 directions (up, down, left, right).
Adventure mode has 8-direction movement but there are bugs when walking into one-directional (top/bottom/left/right) collisions. If you do not need to use one-directional collisions, Adventure mode may already suit your needs.
Others before me
This engine mod is inspired by Nara Makes Games 8-direction mod but the code is completely rewritten to allow for strafing.
My Game
If you feel like it, check out my game too:
anv.itch.io/the-year-after
Status | Released |
Category | Assets |
Author | Hadrian Lin |
Tags | gb-studio, gbstudio |
Download
Click download now to get access to the following files:
Comments
Log in with itch.io to leave a comment.
Any chance of updating this to 3+?
I'm a bit rusty now with GB Studio but I'll try and do this once I have a chance