GMS 2.3+ How difficult is it to make an online game?

GMWolf

aka fel666
What do you mean by player search?

The difficulty will depend on your requirements.
If you just want players to see each other and don't really interact: pretty simple.

If you want the to interact: somewhat simple.

If you want them to interact and see the same thing happen: moderately difficult.

If you want them to interact, see the same thing happen, and be low latency: hard.

Interact, see the same thing, low latency, 10s of players, very hard.


100s of payers: very very hard.
 

FoxyOfJungle

Kazan Games
To do the "player search", you need a online server with a database containing the information of all player accounts, so you will have to use MySQL and PHP to get the values from tables and others, use the HTTP functions of GMS 2 to receive this information, I recommend use the base64-transformed JSON format for this.
 
Last edited:

GLHF

Member
To do the "player search", you need online server with a database containing the information of all player accounts, so you will have to use MySQL and PHP to get the values from tables and others, use the HTTP functions of GMS 2 to receive this information, I recommend use the base64-transformed JSON format for this.
Can i use c++?
 

GMWolf

aka fel666
Can i use c++?
I don't see the possibility of using C++, you are apparently using GML. PHP and MySQL are web languages...
You can totally use c++ for the server.
GM has "raw" versions of the networking function to connect to any server (not just GMS servers).

In fact, I would recommend using a language like C/c++, java ect.


The architecture I would recommend is have a C/C++/java/c#/... server, and have a MySQL data base.

The game client would connect to the server and send requests.
The server would connect to the MySQL data base to store and query data.
At no point should the game client be given direct access to the MySQL Database. That's a recipe for hacking.

for example, for a player Search, the client would send a search request to the
Server. The server would check that the client is in the right state, and has the right permissions. It would then build a query and get the data it needs from the data base.
It will then process that data and send a response to the client.
 

FoxyOfJungle

Kazan Games
You can totally use c++ for the server.
GM has "raw" versions of the networking function to connect to any server (not just GMS servers).

In fact, I would recommend using a language like C/c++, java ect.


The architecture I would recommend is have a C/C++/java/c#/... server, and have a MySQL data base.

The game client would connect to the server and send requests.
The server would connect to the MySQL data base to store and query data.
At no point should the game client be given direct access to the MySQL Database. That's a recipe for hacking.

for example, for a player Search, the client would send a search request to the
Server. The server would check that the client is in the right state, and has the right permissions. It would then build a query and get the data it needs from the data base.
It will then process that data and send a response to the client.
I was referring to using C++ for what he wants, getting player information from a database, it is not necessary to use C++ for this, only with http_get and post is it possible to do this.

There is no need to use C++ to have a hosted server, 000webhost offers a free server (for hosting files and databases) and can be used for testing.

But if he really wants to make a game online in real time, then he needs a suitable server for that purpose. And in fact it can be written in another language, like python, node.js and others ...
 

Yal

šŸ§ *penguin noises*
GMC Elder
How difficult is it to make an online game? With Player search
It's hard enough that professional game industry companies routinely have issues with online stability. If you're just one guy with no programming experience, it's probably in the "impossible" range. And that's without considering secondary things like keeping credentials safe, stopping players from breaking the game with forged requests, and keeping latency low.
 

GMWolf

aka fel666
did you check the link? it has a number of resources for all sorts of languages and platforms.

Networking is like any other subject in programming, it doesnt matter what language and what platform the core concept stay the same.
There is also, of course, the game maker manual which should have erverything you need to apply your newfound networking knowledge in game maker.
 
Hello !

In my own little experience in programming (about a year...) I've found that each part in programming taken one by one are always simple to implement. The problem is always into interactions.

When you're working only with GMS you have only one language and at first it works only on one machine and there you already need extra tools : for example to make sprite (Gimp/Asprite or whatever). Why not something for music ? etc ...

If you go on online games you increase interactions heavily. Indeed all players interacting together will requiere the highest control GMS + at start a server to manage at least connections (rendez-vous server), which can be in one language (c++, php, I would personaly go on "bash"). The web server has it's own way to set up then implement php in there (learn php), if you add mySQL : this is one more, if you make a website (html, css) two more again maybe JS ? AND all of that needs to be under security stuffs that need to be understood well to be efficient and not bloc anybody who would be honest.

Well yes it's a lot. However :

Most of programming languages have a lot of similarities (php is very close to GML and inclulde commands from bash) as long you are comfortable with english a good there lots of abbacus on the web (I often use w3bschool.com) when you doubt of the syntax. Choose you language and system where you are comfortable and NOT where anybody tells you to go. PHP mySQL and stuffs are very famous but there are many other option such as bash (very versatile) python, java, c++ ... there must be more since my knowledge is limited haha.

In my opinion the really tricky part is in security. Especially as GML includes nearly nothing for that (no ssl/https, no string encryption function ...) You will have to do it yourself. Also security depends more on sequences of actions or you could call that protocols than in encryption itself.

Yes it's tough because doing all that alone costs truely a lot of time to both learn and do. But in my opinion what is truely needed is patience and nothing else. Work on every parts step by step. Don't learn first then do. It's not efficient. It's better to learn how to build something flexible and adapt little by little specialy if you are alone.

Never give up ;)

Hope it helps !
 
Top