Hi, in my game, I want to give the possibility to the user to save his game, therefore he must be connected to greenfoot. Is there way to make a button that immediately open his browser on the Greenfoot homepage?
Thank you
Hi, in my game, I want to give the possibility to the user to save his game, therefore he must be connected to greenfoot. Is there way to make a button that immediately open his browser on the Greenfoot homepage?
Thank you
How is opening the browser to the Greenfoot homepage related to saving the state of a game? Why must a user be connected to greenfoot to save his game?
Oh.. I thought man must be connected to store the data to the greenfoot server. If you mustn't be connected, how does it work? the datas are stocked on the computer? thank you.
If you use the UserInfo class, there are two possibilities:
1. You play locally in the program. Then it will save the data in a .csv (Excel) on your computer.
2. You play here on the website. For this, the user has to be logged in.
One more question: it's one storage per computer, isn't it? I mean is it possible to have like multiple accounts in one computer, each account with 5 strings and 10 ints? If so, how to define which is the current user?
One more question: it's one storage per computer, isn't it? I mean is it possible to have like multiple accounts in one computer, each account with 5 strings and 10 ints? If so, how to define which is the current user?
It is one spreadsheet per scenario. Each line of the spreadsheet will contain the data for each user of that scenario. On the site, the name of the users are their greenfoot login names. Within the greenfoot application, they are the names that are specified within the Miscellaneous tab of the Preferences dialog under Player name (on the menubar, use "Edit>Preferences..."; or press 'Ctrl-Comma').
You do not need to swap users in your project. The 'getMyInfo' method of the UserInfo class will retrieve the data for whoever is currently logged in to the greenfoot site and running your program.