PDA

View Full Version : Game Dev help



MrPinkPanther
30-07-2009, 10:59 AM
Ok so I've programmed a non-tile based isometric game but now I'm stuck on making it move correctly isometrically.

Currently my character moves from one point directly to the other. However I now want to move him isometricly (2 points across for every one point down) so I will need to move him twice to get to the one point. Once going across and down and once going across and up, as shown in the diagram below. Does anyone have any idea how to calculate where point A is on the diagram? I've been racking my brains and can't think of a single trigonometric formula. So say if one point is (10,10) and the other (200, 100) how do I calculate where point A would be and where he changes direction.
http://img23.imageshack.us/img23/3995/triangleh.png


Thanks in advance,
FlyDuo

Thread closed by iAdam (Forum Moderator); Problem solved, and to prevent spamming.

Jahova
30-07-2009, 12:19 PM
What language is this game in? Could you post the current pathfinder code?

MrPinkPanther
30-07-2009, 12:39 PM
What language is this game in? Could you post the current pathfinder code?
Objective-C. Currently there is just point to point code. Basically I need the pseudocode of how to calculate the location of point A.

MrPinkPanther
30-07-2009, 03:39 PM
Ok, so at the moment I'm working out the equation of each line and now I need to work out their point of intersection. Usually you can just say one equation equals the other and work out x from there but you can't in programming so does anyone have another way to work out the point of intersection. Maybe by subbing in values?

MrPinkPanther
30-07-2009, 04:45 PM
Problem solved!

Jahova
31-07-2009, 07:06 AM
Problem solved!
Well done :D

kickerbat
31-07-2009, 01:38 PM
I suggest using C++, more compilers etc and cores to help you in near future like Torque.

MrPinkPanther
31-07-2009, 02:54 PM
I suggest using C++, more compilers etc and cores to help you in near future like Torque.

Do you have any idea what you are talking about?

Want to hide these adverts? Register an account for free!