I am currently working on a game in Yoyo game's: Game Maker software. The game involves top down ships ( large watercraft ) moving. I'm running into one roadblock so far and that is that I am unsure of how to script movement for a top down vehicle such as this. I'm looking to create movement similar to that in the game "Sunless Sea." (I read somewhere that this would be considered "nonholonomic" movement.)
I am trying to avoid using the game maker physics functions and am planning on eventually having this be controlled by a game-pad (probably an ps3 or ps4 controller emulating a xbox controller.)
Has anybody written any scripts like this for ship movement?
For those unfamiliar with GML I have a super basic script I found for basic top down movement that I am currently using just to test ship interactions with other objects, mainly to show a little bit of the languages syntax and basic functions:
/*Temporary Movement Code*/
if (keyboard_check(vk_up) && keyboard_check(vk_right))
{x+=2; y-=2;}
else if (keyboard_check(vk_up) && keyboard_check(vk_left))
{x-=2; y-=2;}
else if (keyboard_check(vk_down) && keyboard_check(vk_right))
{x+=2; y+=2;}
else if (keyboard_check(vk_down) && keyboard_check(vk_left))
{x-=2; y+=2;}
else if keyboard_check(vk_up)
{x+=0; y-=4;}
else if keyboard_check(vk_left)
{x-=4; y-=0;}
else if keyboard_check(vk_down)
{x+=0; y+=4;}
else if keyboard_check(vk_right)
{x+=4; y-=0;}
// End
Any help, or helpful resources would be much appreciated! Thanks!
:D