locked
keyboard input for game controls RRS feed

  • Question

  • Here's CVK888

    I was thinking of making a side scolling game and started with the keyboard control and geting the background to do it's thing. Use the arrow keys to scroll the background. Try moving up and then right or left without letting go of the up button and you will stop going up. I understand why this setup doesn't work but don't know how to do the keyup while still seeing the keys that are still down. Any sugestions??

    Saturday, June 9, 2012 3:23 AM

Answers

  • This one here CVK888-2 is working alrighty!  :D


    Click on "Propose As Answer" if some post solves your problem or "Vote As Helpful" if some post has been useful to you! (^_^)

    • Marked as answer by JKrueg Sunday, June 10, 2012 12:28 AM
    • Unmarked as answer by JKrueg Sunday, June 10, 2012 12:34 AM
    • Marked as answer by JKrueg Sunday, June 10, 2012 12:34 AM
    Saturday, June 9, 2012 8:13 AM
    Answerer

All replies

  • Try this one -> CVK888-1

    Still buggy though!  =(


    Click on "Propose As Answer" if some post solves your problem or "Vote As Helpful" if some post has been useful to you! (^_^)

    Saturday, June 9, 2012 8:02 AM
    Answerer
  • This one here CVK888-2 is working alrighty!  :D


    Click on "Propose As Answer" if some post solves your problem or "Vote As Helpful" if some post has been useful to you! (^_^)

    • Marked as answer by JKrueg Sunday, June 10, 2012 12:28 AM
    • Unmarked as answer by JKrueg Sunday, June 10, 2012 12:34 AM
    • Marked as answer by JKrueg Sunday, June 10, 2012 12:34 AM
    Saturday, June 9, 2012 8:13 AM
    Answerer
  • Yea, OK, this makes sense! Set flags on and off with the keyboard events. Thanks for the examples.

    How do you get the code to publish with the -1 or -2, a sort of version number?

    Sunday, June 10, 2012 12:34 AM
  • I too was curious how others did it

    But I've found out how by chance.

    Just import a code, modify it, and then, publish it. Gonna follow the same code w/ next number suffix available!  :D


    Click on "Propose As Answer" if some post solves your problem or "Vote As Helpful" if some post has been useful to you! (^_^)

    Sunday, June 10, 2012 1:16 AM
    Answerer
  • Very cool, I've gotten a little farther and published my updated code, but it seems really slow when playing it on the web. Any ideas on what makes it so slow? CVK888-4

    Just noticed if you mash a few arrow buttons together and let go all of them at the same time, the software misses some of the keyups and will keep scrolling. Interesting, to me anyway.

    • Edited by JKrueg Sunday, June 10, 2012 4:15 AM
    Sunday, June 10, 2012 4:10 AM