I've already done some experimenting in the Yar research project. I thought 8d control was pretty straightforward. But in Yar the player object has a sprite that can face 8 directions with two subimages per direction. So, it accomplish this, all this code was necessary :
// code is GML, but should be obvious to anyone if(keyboard_check(vk_up) and keyboard_check(vk_right)) { sprite_index = sprBugShipUR; x = x + bugShipSpeed; y = y - bugShipSpeed; } else if(keyboard_check(vk_up) and keyboard_check(vk_left)) { sprite_index = sprBugShipUL; x = x - bugShipSpeed; y = y - bugShipSpeed; } else if(keyboard_check(vk_down) and keyboard_check(vk_right)) { sprite_index = sprBugShipDR; x = x + bugShipSpeed; y = y + bugShipSpeed; } else if(keyboard_check(vk_down) and keyboard_check(vk_left)) { sprite_index = sprBugShipDL; x = x - bugShipSpeed; y = y + bugShipSpeed; }else if(keyboard_check(vk_left)) { sprite_index = sprBugShipL; x = x - bugShipSpeed; }else if(keyboard_check(vk_right)) { sprite_index = sprBugShipR; x = x + bugShipSpeed; }else if(keyboard_check(vk_up)) { sprite_index = sprBugShipU; y = y - bugShipSpeed; }else if(keyboard_check(vk_down)) { sprite_index = sprBugShipD; y = y + bugShipSpeed; }
The multi-button diagonals needed to be checked first. And maybe it just me, but it makes sense that diagonal is faster than non-diagonal movement. Sometimes it seems like it is, sometimes not.
—hartnell