Hello I have a school project to do I have to make a small game and i'm using 2D arrays but i don't know how to make something move with WASD its just a small code no graphics just characters like !#?*
#help 2d array game school project
13 messages · Page 1 of 1 (latest)
⌛ This post has been reserved for your question.
Hey @trim fable! Please use
/closeor theClose Postbutton above when you're finished. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.
TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.
That's the problem though. Java doesn't support using direction keys nor generally modifying the screen's content without having a GUI.
When using just characters in the console, Java accepts input typed and pressing <enter>, and it can write lines. That's it.
For modifying the console's screen, you'd need thirdparty libraries that use native access to the console, as Java's provided APIs don't support that.
i was thinking like writing a W and it changes the position of the character and refreshes the game board and then asks for another movement
Writing W then <enter> and displaying the board again, yes, that works
do you have any ideas how i can make it move that is the part i am stuck on right now
"move"?
i write for an example W and a char moves up
Like I said, you can display the board again, in new lines, dragging up the previous display.
Something else but that, you cannot
At least, not without a GUI nor a native thirdparty library
oh okej thanks 
If you are finished with your post, please close it.
If you are not, please ignore this message.
Note that you will not be able to send further messages here after this post have been closed but you will be able to create new posts.