I want to create a game on web platform. The game is not multiplayer, so there is no need to any server. But I want save player data for each player and I want them loggined to my game. I am not sure about how to do that. Is this following pattern is good?
- In Assets/Resources folder, create a text file (called users.txt in this case) which contains player username password …etc. Read this file on start then compare player username and password with them if it matches one of them, then player can be logged in.
- After game play, save player data to a file by serializing player data with a consistent file name, after player relogged in, load this file.
Now. I know first method is not look safe but I want to know is this file (user.txt) a shared single file for each client. Do I need to check for the file if is in use…etc. When hundreds of users attempting to open the game via browser, are many file read operation occuring on one single file? How this process working? Can I find a technical guide or documantation for this process.
Thanks in advance and sorry for my bad English.