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!


On 7/29/13, john <jpcarnemo...@comcast.net> wrote:
> I'm aiming to create a multi-level (multi-stage?) fps game. I
> plan to have a central location between stages, and each stage
> will have it's own map(s). I'm hoping to create a 3d game
> (similar to swamp in navigation). I plan to have about 15
> different types of terrain, and will probably end up manually
> creating the map files, with numbers to designate the type of
> terrain. As far as movement goes, I'm thinking of storing x and y
> in ints, and possibly creating timers to tell when the character
> changes coordinates. I'm not sure how I'm going to handle angles
> though.

---
Gamers mailing list __ Gamers@audyssey.org
If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org.
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/gamers@audyssey.org.
If you have any questions or concerns regarding the management of the list,
please send E-mail to gamers-ow...@audyssey.org.

Reply via email to