I think I'd prefer to have north be zero, as I'm more familiar with that concept (though neither of the names you mentioned ring any bells). I'm certainly willing to give the geometry my best shot, but I think it's worth mentioning that the only serious concept I've got down is the pythagerium theorem (a^2+b^2=c^2 if that name doesn't come out correctly). How much trig/geometry is required to get a basic setup functioning? Is it primarily stuff I can find on a traditional scientific calculator, or will I need to be spending some time with the local search engine?

----- Original Message -----
From: Thomas Ward <[email protected]
To: Gamers Discussion list <[email protected]
Date sent: Mon, 29 Jul 2013 08:48:57 -0400
Subject: Re: [Audyssey] looking for programming advice:cyntaxdifferencebetween bgt and java

Hi John,

Okay, I am glad you told me that, because what you want to do is going to require some basic understanding of trig and geometry to pull off. I can certainly help you with that, but there is absolutely no way out
of the math requirements for movement in that type of game.

First, simple integers for x and y coordinates won't work in an FPS. They aren't precise enough for what you want and you'll loose accuracy and precision. You would be better off using floats or even better yet doubles for a wider degree of accuracy when moving from coordinate to
coordinate.

Second, you don't have to use timers to update the player's position. You can simply update the player's position in real time as the up or down arrow keys are pressed. To keep them at a constant speed you can check if the step sounds are playing or not. If playing ignore the command. If not playing play step sound and update position. That's
basically all there is to it.

Finally, as far as handling angles there are two ways of handling
this. You can use the Cartesian calculations with 0 oriented as due east, or you can use the bearing system where 0 is oriented do north. If we know how you want to handle this it will be pretty easy to pass
along some formulas for calculating your position.

Cheers!

---
Gamers mailing list __ [email protected]
If you want to leave the list, send E-mail to [email protected].
You can make changes or update your subscription via the web, at
http://audyssey.org/mailman/listinfo/gamers_audyssey.org.
All messages are archived and can be searched and read at
http://www.mail-archive.com/[email protected].
If you have any questions or concerns regarding the management of the list,
please send E-mail to [email protected].

Reply via email to