• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

global variable on mulitplayer

P

piksil_demon

Guest
so in frustrations ive scrapped my old character customization design and decided to refrence a tutorial. specificly this one-

for the TLDR's here- basically he uses global variables to know what sprites to use in his character.

if i were to use that method, would it be multiplayer compatible, as in each player can have their own character apperance? or would i have to change the method to suit multiplayer? if so, how?
 

FrostyCat

Redemption Seeker
If you mean local multiplayer on the same machine, a single global variable won't do. You'd need an array for that, one entry per player. Each player would then need to be assigned a numeric ID.

If you mean networked multiplayer on multiple machines, a single global variable won't do. Global variables can't reach across machines unless you send messages whenever it's changed and recipients set their own global variables accordingly. And you'd still need an array and player IDs.
 
P

piksil_demon

Guest
If you mean local multiplayer on the same machine, a single global variable won't do. You'd need an array for that, one entry per player. Each player would then need to be assigned a numeric ID.

If you mean networked multiplayer on multiple machines, a single global variable won't do. Global variables can't reach across machines unless you send messages whenever it's changed and recipients set their own global variables accordingly. And you'd still need an array and player IDs.
i mean networked like realm of the mad god
 
T

ThunkGames

Guest
i mean networked like realm of the mad god
You can't have global variables across clients (or at least not the kind you are thinking of). Look here for more information (it has the beginnings of a player customization system).
 
P

piksil_demon

Guest
You can't have global variables across clients (or at least not the kind you are thinking of). Look here for more information (it has the beginnings of a player customization system).
uuuuuhg. this game is gonna take more time to make then i thought :/
 
T

ThunkGames

Guest
uuuuuhg. this game is gonna take more time to make then i thought :/
Yes. Unlike a lot of aspects of development in game maker, working with networking in GM:S is very much like working with networking in other languages. The good news is this allows for non-GM servers to communicate with GM clients (which is a good deal faster, as "Game Maker: Studio" is not "Server Maker: Studio"). I would check out this tutorial by Heartbeast which is very good if you don't like reading (and, as I've mentioned before, I believe the built in example by YYG to be bad).
 
P

piksil_demon

Guest
I would check out this tutorial by Heartbeast which is very good if you don't like reading (and, as I've mentioned before, I believe the built in example by YYG to be bad).
the problem is none of the tutorials ive seen go into to much detail, they dont explain what everything does. plus i cant ask a video questions. :/ and that articular is to broad, dosnt answer the questions im looking for, and is really complicated
im trying to make a server system kinda like minecraft where the players host the servers. i want to make to where no more than 6 people can be on each server, and there is still a single player mode.
 

FrostyCat

Redemption Seeker
the problem is none of the tutorials ive seen go into to much detail, they dont explain what everything does. plus i cant ask a video questions. :/ and that articular is to broad, dosnt answer the questions im looking for, and is really complicated
im trying to make a server system kinda like minecraft where the players host the servers. i want to make to where no more than 6 people can be on each server, and there is still a single player mode.
Then the truth is that you aren't using enough of your own head.

This fad with novices crying over tutorials not answering all their prayers is getting pretty stupid. Real-world development throws more kinds of crap at you than there are tutorial authors in this world. You are going to have to solo some things on your own that nobody else has faced, that's life.

If the tutorials aren't helping, the likely problem is that you are too much of a Goldilocks. Most of the time you won't get a porridge that's just right, you're going to have to heat it up or cool it down yourself. With tutorials that means introspection, contextualization and re-applying basic facts, that's life.

Tutorials are sometimes a means, but never an end.
 
P

piksil_demon

Guest
Then the truth is that you aren't using enough of your own head.

This fad with novices crying over tutorials not answering all their prayers is getting pretty stupid. Real-world development throws more kinds of crap at you than there are tutorial authors in this world. You are going to have to solo some things on your own that nobody else has faced, that's life.

If the tutorials aren't helping, the likely problem is that you are too much of a Goldilocks. Most of the time you won't get a porridge that's just right, you're going to have to heat it up or cool it down yourself. With tutorials that means introspection, contextualization and re-applying basic facts, that's life.

Tutorials are sometimes a means, but never an end.
my problem isnt necessarily that they dont tackle exactly what im looking for, its that what their doing isnt properly explained so i dont know what can be changed. as for me not using my head- i ask only when i cant solve the solution on my own. the point of these forum is for people to share ideas and be able to ask questions. if thats a problem for you then i dont sympathize with you. furthermore, if your comment dosnt help the conversation then its not needed.

p.s. i hate porridge, tastes weird, even at the perfect temperature. and i have red hair. not gold
 
T

ThunkGames

Guest
my problem isnt necessarily that they dont tackle exactly what im looking for, its that what their doing isnt properly explained so i dont know what can be changed. as for me not using my head- i ask only when i cant solve the solution on my own. the point of these forum is for people to share ideas and be able to ask questions. if thats a problem for you then i dont sympathize with you. furthermore, if your comment dosnt help the conversation then its not needed.

p.s. i hate porridge, tastes weird, even at the perfect temperature. and i have red hair. not gold
OK here is a tutorial I made back when I was a squeaker. I explain stuff pretty well I think.
 
Top