Closed Germanunkol closed 10 years ago
This is a totally new field for me. I have not server/upload/download experience what so ever. So I am eager to learn!
I agree with what you wrote. The upload should be done in a separate thread, but the game should not let the user do anything in the meantime, maybe only show a waitbar and an option to abort.
Directly after approval, we could run a small test on the submitted file, if this is a proper map (from the technical point of view) and then have it in the "not approved" list. Final approval could be done by us by hand.
Additionally, I suggest, the players can rate the maps they download on two scales: fun and difficulty (in stars 1-5).
And we should try to make the concept future-proof. By that I mean, if we hard-code the server/domain where the maps are, and we decided to move, then the players cannot use this functionality anymore. Maybe have one fixed and definite place to go first (germanunkol.de). The map data do not have to be there, but the info, where to find the map data. So we can move the map data, if we need to.
The rating system is important, you're right!
The URL could be hard-coded if it was something we can be sure we'll stick with (like bandana.org). But there should be some way of falling back as well... (maybe entering a manual URL if nothing is found under the hard-coded URLs?)
Another thing came to mind: How should we store "meta"-data (ratings, number of downloads, file location etc.)? I can think of two methods:
You might be able to tell that I'm leaning towards the second option - but I'm open to suggestion. If you want to do sorting on the server's side, for example, we should consider databases - they're quite nice...
I have to say, this is totally outside my knowledge. But from what you are writing SQL would be a readily available solution, but probably a bit overkill, since we only have very few data fields. In the second option we have more control over the whole thing, since it is only one file.
I think, sorting can be done locally in the game, unless we get really many level submissions. Then we could still let the server sort the levels (e.g. by name) once a day or even after each new submission.
So, I cannot contribute much to this discussion and I am open to whatever you prefer.
Actually, you already DID contribute a lot: That idea about sorting once a day is really good. As so many things, though, it requires that we have a server we can run programs on - so more than a very simple web server.
I also noticed another thing we need to consider: We need to manually "approve" levels (or delete them) - so we somehow need to edit the metafile or the database. Editing the metafile might be easier - we can just log in and then manipulate the file using nano or vim. Editing a mysql database works, too, though: For this, we can even use graphical interfaces. Using a file reduces work on the download side, but might increase it on the upload, because we need to search through the file for a level with the same name, for example (which is very simple in mySQL). Using mySQL increases work on the download side, but decreases it on upload.
Few. Let me sleep over this... I'll also take a look at some php file functions - if there's a simply way to serialize tables then I think the metafile-method would be the way to go.
All right, I did some more reading. It seems that writing arrays in php to file and retreiving them is a 2-line thing - with the huge benefit that it can be written in human-readable form. This means we could simply edit that metafile manually when we want to administrate (approve or delete levels) and the php would then load the new file. Since sorting arrays in php works as well, I think we should use the file method as its the easiest to program (and, in my opinion, ends up in much cleaner code since we can avoid mixing SQL and php syntax). In case we do want a proper administration interface later on, we can always still add that later.
Another thing: Since we don't require a log in for downloading levels, how do we make sure people don't rate levels multiple times? Should we just save it locally? And should we ever notice abuse, we can still add some sort of security system... What do you think?
For downloading levels, should we simply add another entry to the main menu? And then a list of levels (similar to the level selection screen we currently have), where players can select a level to play. But how do we let the user sort? Maybe by pressing something on the keyboard? So first it's sorted by rating, when the user presses "space" then it changes to sorting by name, space again -> sort by author and so on? Also, we'll need two "categories", authorized and un-authorized. The latter could be below the screen ("underground"). Also, each level might have: Name, author, description, rating (fun), rating (difficulty). Do you have the time to brainstorm this level-selection screen and could you maybe come up with some sort of mockup?
P.S. I'd also be happy about icons that I can display on what I call the "upload status panel", the panel that displays at the bottom when uploading levels. For example: we could display some sort of "idle" or "waiting" image while the process is running, a checkmark when it's done and a red cross when it failed?
Well, up- and download is done. There's some minor things to sort with deleting levels and currently users can still rate a level multiple times. But the main functionality is done, I'll make seperate issues when we need them
I believe to make sure people use the level editor, we have to make up and download (i.e. sharing of the levels) as simple as possible. In my opinion, we need:
What's your opinion? Do you agree on the above, or is it too much? Do you want anything else added or do you have another idea of how to do it?
At least for testing purposes, I would use my server (germanunkol.de). If the application turns out light enough, we can leave it on there in the future as well, and maybe just buy a domain (bandana.org is free). Otherwise, we might need to rent a separate server. So we should definitely use http since root servers (which could run a Lua program) tend to be much more expensive...