Web Analytics Made Easy -
StatCounter basic game movement - CodingForum

Announcement

Collapse
No announcement yet.

basic game movement

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • basic game movement

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

  • #2
    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; Sep 13, 2011, 01:06 AM. Reason: Lacked clarity.

    Comment


    • #3
      thanks

      Comment

      Working...
      X
      😀
      🥰
      🤢
      😎
      😡
      👍
      👎