Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    Regular Coder
    Join Date
    May 2011
    Posts
    357
    Thanks
    23
    Thanked 1 Time in 1 Post

    basic game movement

    How could you say make a x move around a grid using the arrow keys?

  • #2
    New Coder
    Join Date
    Jun 2006
    Posts
    21
    Thanks
    1
    Thanked 1 Time in 1 Post
    I think you might do better reading a tutorial for this question.
    Here's one that you might like, but you can find others on Google:
    http://www.brighthub.com/hubfolio/ma...s-element.aspx

    Basically, moving "thing" with the arrow keys involves:
    1. making an "x" and "y" variable (to store the object's position)
    2. capturing a keyboard event to change the "x" and "y"
    3. clearing the screen and redrawing "thing" to the changed "x" and "y"

    I won't explain it in any more detail (though someone else here may), because so many other people have done a good job of explaining exactly what you're looking for.
    Last edited by Blazer2000x; 09-13-2011 at 06:06 AM. Reason: Lacked clarity.

  • #3
    Regular Coder
    Join Date
    May 2011
    Posts
    357
    Thanks
    23
    Thanked 1 Time in 1 Post
    thanks


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •