Original Post
I am currently working on a prototype for a 2D naval game that will involve 19th century warships. Each player will fight his/her ship on a 2D grid. Now, I admit, my math is (more than) a bit rusty... so be gentle. What I need to do is no the shipd Heading. Course 000 or 061, for example. The direction of the heading is where I apply the speed to the XY coordinates to update its position for each game tick. So, if I have a ship sailing on course 045 and moving 10 grid points per tick, how do I solve for its new XY position? I also need to do the opposite and solve for a directional bearing from my location. For example, if I am at position 200,125 and my target is at position 100,100 what is his bearing relative to me?