Set up a server for downloading user built levels

Hello. I am making a game where players can design a level and test it. Then it is saved in file formats. I would like to set up some kind of online server where people can upload their own levels and someone from across the world can download the files and play it. My only experience with networking is Multiplayer in Unity. But I have no experience with a server and file uploading/downloading. Any tips, references, programs? Thanks I would appreciate it.

P.S: I plan on building the level uploading/downloading on a different application. The actual Unity game is only for saving the level to files and reading from the files, but I plan for the separate application to deal with the uploading and downloading.

I have actually looked into something similar to this. I think you will find my post very helpful.

It can be found here

I have no experience with a server and file uploading/downloading. Any tips, references, programs?

For loading data there are 2 methods:

  • Resources.Load simple but load only from the resources folder path
  • www load from hard disk or internet webpage link, but load bites.

So www is what you are looking for. Unity script reference www class is use to save data in the server. You need a server that support PHP. It will receive the unity binary file [it can be a txt file]. Learning PHP is more simple than Unity C#. You do not need a MySQL database since you can make a smaller database using PHP. You can put all the files in a folder. So other users can download them.

PHP: there are books about PHP but a youtube video course can help better. There are also other pay online profesional courses. I take one php at Treehouse and I like it. Also this PHP free course is excellent web site and very extensive.

Good Luck!

Sorry to be so vaige but I can give you a simple answer quick. Look up “C# Tcp Connections”

You are going to use a TCPClient and transfer data between the TCPClient and the TCPServer.

I think WWW is good enough to upload/download files. Tcp is overpower, unless we are talking about directly send a file to another player

The tricky part is the server side. I think you have not much experience on server apart from unity multiplayer networking. You have to download XAMPP first, it can host a PHP/MySQL server in your local computer, for testing. Then you have to learn some PHP and MySQL. I guess you need to build a database to store user account and level information. If the level is just a small text, you can directly save it in database instead of an independent file.