Search Unity

  1. Welcome to the Unity Forums! Please take the time to read our Code of Conduct to familiarize yourself with the forum rules and how to post constructively.

Question Is it possible to import and send database from my own website without Mysql?

Discussion in 'Multiplayer' started by said123sawn, Nov 17, 2022.

  1. said123sawn

    said123sawn

    Joined:
    Oct 31, 2019
    Posts:
    26
    I've never built a Website in my life, but I need a server for my new game that I'm developing (No problem to learn, I can handle it). I have a store in my game, and through this store, users can download files and comment on the person who created the file. At the same time, I want to set up a website. Do I have to use mysql to implement this idea or do I just have to buy a website?
     
  2. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    1,847
    You need to learn more about that as well. ;)

    You cannot just "buy a website" that does something very specific for you, you normally rent a (virtual) server with disk space which grants you more or less privileges to install and run more or less software. There's a whole range of options from the dumbest fileserver to having root access to your own physical hardware somewhere in a data center.

    Firebase (or similar service) is probably the best option for you as it provides a well-documented means to define and access data and is compatible with Unity both through readymade asset store plugins or otherwise accessiable via UnityWebRequest API or perhaps even a native C# api if I remember correctly.
     
  3. said123sawn

    said123sawn

    Joined:
    Oct 31, 2019
    Posts:
    26
    I used Firebase in another application before, but when too many users pulled data, the quota was filling up, of course, this may be because I use the free one, I don't know if the quota problem will go away if I buy it. As I understand it, to make my own website, I need to buy a domain and also a service for hosting. Is this true?
     
  4. CodeSmile

    CodeSmile

    Joined:
    Apr 10, 2014
    Posts:
    1,847
    Domain is optional actually. You only need it if you want users to visit your site by entering a domain URL rather than some IP address. But for a game-only server it would suffice to code the server's address in the app like "123.234.13.14" to be able to access it.

    Then you need some way of accessing some computer. Theoretically, you could have your own PC running at home and set up routing to it - however all users connecting to that machine will be sharing your up/download bandwidth, and generally ISPs forbid users running 24/7 accessible services on their consumer internet lines.

    A minimal webserver that gives you FTP access to install software running on it (ie wordpress) is what you should check out. I would start with the cheapest option that has a built-in database. Then you'd have to write PHP or some other scripts on your server for external requests to be handing over results from the database. This is also an important security measure, as directly connecting an app with your webserver's database would compromise it because you'd have to program the database login/password into the app. Many webservice providers actually forbid that, technically even by only allowing connections to the webserver database from the localhost or their own internal subnet.

    I don't know about Firebase prices but I don't think they'll be costing you much more especially given how much less work you need to put into it.