#help 2d array game school project

13 messages · Page 1 of 1 (latest)

trim fable
#

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 !#?*

minor knotBOT
#

This post has been reserved for your question.

Hey @trim fable! Please use /close or the Close Post button 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.

obsidian dock
# trim fable Hello I have a school project to do I have to make a small game and i'm using 2D...

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.

trim fable
#

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

obsidian dock
#

Writing W then <enter> and displaying the board again, yes, that works

trim fable
obsidian dock
#

"move"?

trim fable
#

i write for an example W and a char moves up

obsidian dock
#

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

trim fable
#

oh okej thanks thumbs

minor knotBOT
# trim fable oh okej thanks <:thumbs:897423877154693130>

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.