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



Title: Default Outlook Express Briefpapier.
If you know how to check whether they press a certain key, like the arrow keys,
you can just say...
 
psuedo:
 
if(They hit the left arrow key)
{
    draw bitmap("WalkingLeft.bmp", CurrentPosition.x, CurrentPosition.y);
}
else if (They hit the RIGHT arrow key)
{
    draw bitmap("WalkingRight.bmp", CurrentPosition.x, CurrentPosition.y);  
}
etc...
 
It really depends on what you are using to display bitmaps to the screen.  What are you using to display the bitmaps?
Your own function?  Or just some other's API (functions)?
 
Ben Humphrey
Game Programmer
WebHost of www.GameTutorials.com
benh@humongous.com
benjina@mindspring.com
----- Original Message -----
Sent: Tuesday, July 11, 2000 1:22 PM
Subject: 2D Movement

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.

  • References:
    • 2D Movement
      • From: "Frank Cleynen" <frankcleynen@freegates.be>