Once you understand exactly where functions run on the client and server by default, and how to manipulate them to run anywhere, multiplayer thinking makes sense. Here is a quick run-down:

- Entities created will create an "instance" of themselves on each computer. Each entity will have the same pointer. A handle that calls up an entity on one computer will call up the same entity on the other computer. There is no problems retrieving "you" pointers from other computers, just place them in a skill, send that skill, and ptr_for_handle them. In a single player game you wouldn't have to worry about this; in a multiplayer environment entities don't know what their instances "you" pointers are ect. You have to send them.

- Entities created will run their action on the server.
In that action you can call proc_client many times, it will start a function for that entity on the client that created the entity. This is needed for individual input.

- Proc_local starts a function for the entity on all computers for its instance. Do not put specialized input in here unless you validate if "my.native == on". Because it's being run on each computer for the same entity. Only call this function once and branch from there. When a new client joins the game only the last proc_local for each entity called will be called again for the new client.

- Even though a hybrid server is both a server and client it will not run proc_local or proc_client functions. Which is rightfully so since the server already started a function for each entity when they were created. Just do the work from those those functions or branches from them.

Just nail down exactly how to manipulate functions to run between the clients and server and you'll have a foothold on mulitplayer. After that is the tougher part, how to go about it? Depending on the size of your project, this can be very tedious. Some questions you'll come across: Collisions? Scans? and the very big one - Syncronization. Create a small movement demo before you go into your real projects. It'll help introduce some issues, but don't become over zealous and lose sight once succesfull in that, I learned that lesson... theres many more problems awaiting and it depends on the genre really.

Quote:


btw whats your game all about?





It's a kart racing game somewhat similar to Mario Kart. Take Mario Kart and innovate many key aspects of it, some more than others, from weapons, level selections, mulitplayer, modes, gameplay, and graphics. While i'm not going to say to much now, i'll have a website up sometime this year. Afterwards i'll release some details here on the forum alongside a couple screenshots, I think most will be surprised.


Check out Silas. www.kartsilas.com

Hear my band Finding Fire - www.myspace.com/findingfire

Daily dev updates - http://kartsilas.blogspot.com/