Closed Germanunkol closed 10 years ago
Very good idea. The game should absolutely be future-proof!
Especially the upload/download functionality could break with future updates. In that case, the game should tell the user that he cannot up/download files. How about on the start of the editor/download page the game sends the current version number to the server. The server checks if this number is compatible with the current software on the server and then gives a warning, if upload is impossible.
The backbone of this feature is done. When the game starts up, it will check online for the version.php file, which returns a version string and a welcome message. The game will compare the version against its own internal version stored in the global GAMEVERSION (main.lua). If they don't match it will display a warning, otherwise it will display the welcome message, Minecraft-style.
The display itself could be prettier (maybe add a background panel or something), but I think we should do that once we have the menu background done.
To change the version string of the welcome message, simply edit version.txt and welcomemessage.txt in the bandanaweb repository, commit and push.
Edit: I have not yet added the functionality to the editor and userlevel list. For that, I need to add a version string into the levels' file-format first... this is a bit more work. But we have a seperate issue for that, so I'll close this one.
Works very well!
Design-wise I'd suggest some small changes: In my opinion, we don't really need a welcome message. Instead, I'd prefer to do this:
I think, if there is no version mismatch, then the note should be almost invisible and the game should not tell the user too obviously, because the user does not need to know this. Only, if there is a version mismatch, the note should be clearly visible, but not making panic. The user can still play the game. That's why I reformulated the alert message.
I made the changes you mentioned, with one exception: The mechanism for the welcome message is still in place. I "removed" it by simply setting the welcome message online to an empty string (welcomemessage.txt in the bandana-web repo is empty now). This way, if we ever have to tell the users something important, then we still have this option.
What do you think? The font might still be a bit large - I only use the two font sizes at the moment... here we could make an exception though, maybe?
That's how I wanted it. I made a super small change on the text and added one line break. Now, the text overlaps with the bamboo frame a little bit, but if our final url is shorter, then everything will be fine. If not, then we can still change the font size.
By the way: Happy 1000th commit!!
I think it would be good if the game checked once at startup, whether or not the current version is the same as the newest version online and if not, display a "New version available at www.bandanagame.com" or similar at the bottom of the main menu.
Coding this will be really simple, but we need some version string in the game.