Is it secure and fast for me to make my C++ DirectX10 game retrieve data from my MySQL server via SQL queries that are run inside the client?
C++ and MySQL for the server
retrieving data is "secure" as long as you don't need to restrict in detail what data the client has access to. (having the client fetch for example a list of news directly from a SQL server is safe if the account used by the client is restricted to SELECTs on that specific table), it would probably be faster to use a cache layer between the SQL server and the client though.
Any semi-competent user will be able to retrieve the MySQL account used by the client and run their own queries with whatever permissions that account has, if you intend to use the SQL server to allow clients to modify and share the game state in a multiplayer game then no, it will be extremely insecure, and if the updates are frequent, very slow.
Separately, for a real-time game, most developers end up reading the important data into RAM in a persistent process in the application server (call it "game server") and only write back to the database on occasional snapshots or specific events. This is usually done for efficiency purposes.
Definitely not; it is possible to do an effective DoS attack on a MySQL server even without access to any tables at all. You need to put a layer in between MySQL and the big, bad world.
Separately, it accepts requests from the client, computes the result of those requests, and returns the authoritative response to the client, as well as stores important outcomes back into the database.
I already suggested how this is done: You create a game server (application server) that talks to the database, and provides the necessary view of the data to the client.
Separately, it accepts requests from the client, computes the result of those requests, and returns the authoritative response to the client, as well as stores important outcomes back into the database.
Yes but you never explained how i would do this. Not everyone here have a Game Programming degree in C++ :P Lol. But do you have any suggestions on how i could do this?
You should use tools that are available to you, and that you are comfortable in using.What i mean is, what should i use to make the server? Is there a tutorial on this?
Successful game servers have been written using a variety of technologies, including but not limited to C++, Java, C#, Python, Visual Basic, Erlang, JavaScript, and C.
So, the first question is: What do you already know, and what do you have available to you?
You should use tools that are available to you, and that you are comfortable in using.What i mean is, what should i use to make the server? Is there a tutorial on this?
Successful game servers have been written using a variety of technologies, including but not limited to C++, Java, C#, Python, Visual Basic, Erlang, JavaScript, and C.
So, the first question is: What do you already know, and what do you have available to you?
What i meant is how do i make a server? Idek how i would do any of this but no-one is even giving me a hint on how to start coding a server.
What i already know is basically how to do everything needed to make an online game except how to code a server. So any help would be great!