Posted 06 April 2013 - 01:14 PM
I'm trying to make a game that uses the arrow keys to control the position of a character on the screen. I know how to detect the keys and move the player around the screen but if they are at the top (or any other side) and press the up arrow then it is going to go off the screen.(and probably produce an error because the position would be out of range, not sure though) I know I could just get the coordinate of every place on the side and not allow the player to use that button if it was at any of those coordinates but that would be a lot of variables and it would take up so much time. How would I get the boundary of the screen and not allow the player to go out of the screen?
Help is appreciated!
Thanks! :D/>
Help is appreciated!
Thanks! :D/>