I’m trying to write myself a game server for educational purposes.
I need to have some sort of list containing all the online users, their names and their X and Y positions.
What’d be the smartest way to hold this? I was thinking some sort of a multidimensional array or arraylist? Code examples as well would be great, i’m very new at Java 🙂
Make an
ArrayListof a Class you could maybe callUser.You could hold all the information like username, x and y position in said class.
I realize this is a very general answer, but it’s a very general question.