http://GameProgrammer.Com

Programming

GP Mailing List
     Thread Index
     Date Index

ATXGPSIG List
     Thread Index
     Date Index

Google
>

Home

Wise2Food



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 2D Movement



Sure. I've been doing just that recently. I did a little test program in 
allegro, take a look. And even if you're not into allegro, you can still use 
the sin and cos in the fashion in which I did.

Here's some source for you to ponder over:
http://underworld.fortunecity.com/rom/126/free.c
http://underworld.fortunecity.com/rom/126/rotate.c

and the basic 2d rotation/movement engine I derived from them:
http://underworld.fortunecity.com/rom/126/freerotate.c

and the bitmap they all load:
http://underworld.fortunecity.com/rom/126/guyoverhead.bmp

hope that helps,

~Stephan~

>Default Outlook Express Briefpapier.Hello fellow programmers.
>
>I'm working on a 2D game with view from above. Can somebody pass me some 
>code to let the player move in all directions while the character that the 
>player controls, looks at the direction it's moving at?
>
>Thank you.

________________________________________________________________________
Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com

=================================================================
The GameProgrammer.Com mailing list is for the open discussion
of any topic related to the art, science, and business of
programming games. This list is especially tolerant of beginners.
We were all beginners once

To SUBSCRIBE or UNSUBSCRIBE please visit:
http://gameprogrammer.com/mailinglist.html