Gamestudio Links
Zorro Links
Newest Posts
Change chart colours
by 7th_zorro. 05/11/24 09:25
Data from CSV not parsed correctly
by dr_panther. 05/06/24 18:50
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
1 registered members (AndrewAMD), 1,310 guests, and 1 spider.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 3 1 2 3
Multiplayer Concept #94594
10/15/06 19:02
10/15/06 19:02
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
Can someone explain to me how I can make a multiplaye game start and create a player entity locally on each client (and the server). I need them to be local, so each client only knows it's own player and no one elses. So if I use the "player" pointer somewhere in a script it means their player only.
I have functions like "initialize_camera" which actually controls the player as the centre of orbit, so how can I make this function only run locally, so each client has control of their own camera.

I'm not familiar with the concept of multiplayer, so I need a little help understanding. If someone can give me a snippet to use, that would be great.

Multiplayer Concept [Re: sheefo] #94595
10/15/06 19:05
10/15/06 19:05
Joined: Sep 2006
Posts: 188
Latvia
MDI Offline
Member
MDI  Offline
Member

Joined: Sep 2006
Posts: 188
Latvia
Me too!! Dont forgot me!! Help us 2!!


Latvija rullē
Re: Multiplayer Concept [Re: MDI] #94596
10/15/06 19:25
10/15/06 19:25
Joined: Jan 2004
Posts: 2,062
Hamburg, Germany
slacer Offline
Expert
slacer  Offline
Expert

Joined: Jan 2004
Posts: 2,062
Hamburg, Germany
You both should start searching and finally reading the multiplayer tutorials...

Re: Multiplayer Concept [Re: MDI] #94597
10/15/06 19:26
10/15/06 19:26
Joined: Oct 2005
Posts: 196
ambe Offline
Member
ambe  Offline
Member

Joined: Oct 2005
Posts: 196


- code monkey
Re: Multiplayer Concept [Re: ambe] #94598
10/15/06 19:29
10/15/06 19:29
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
I need a specific explanation. I was hoping someone would tell me how.
The tutorials don't tell me how to do what I want.

EDIT: I'm only need LAN, I don't want internet multiplayer.

Last edited by sheefo; 10/15/06 19:31.
Re: Multiplayer Concept [Re: sheefo] #94599
10/15/06 19:53
10/15/06 19:53
Joined: Jan 2004
Posts: 2,013
The Netherlands
E
Excessus Offline
Expert
Excessus  Offline
Expert
E

Joined: Jan 2004
Posts: 2,013
The Netherlands
If we only tell you how to do one thing you'll never learn and you will forever keep posting these questions without even trying to solve something by yourself. Read the tutorials to get the general picture and when you get stuck on a specific problem, ask here. Everything in your question is explained in detail in locoweeds tutorial.

Re: Multiplayer Concept [Re: Excessus] #94600
10/15/06 19:56
10/15/06 19:56
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
Oh come on, please tell me
It will help me to understand the concept of running functions and managing entities locally. It is what I need to get rid of this little problem I have.

Well?

Re: Multiplayer Concept [Re: sheefo] #94601
10/16/06 04:42
10/16/06 04:42
Joined: Aug 2004
Posts: 1,305
New York
PrenceOfDarkness Offline
Serious User
PrenceOfDarkness  Offline
Serious User

Joined: Aug 2004
Posts: 1,305
New York
okay 1st off, they are right. YOU MUST MUST MUST read locoweed's tutorial and there is 1 other that is a bit older but still pretty good. They can explain and show you how to do alot. After you read their tutorial try mimicing what they did but try it on your own 1st and go back to the turorial after u fail horribly ( like i did ). Last month I was in your shoes, and last week the fog finally starting to disappear. Locoweed's tutorial will teach you indepth how to do exactly what your asking us to show you. Also what you want ain't a simple line of code (believe me I just went through clearing up the great multiplayer fog).

However, since I feel bad for you lol, I'll help you out a bit. 1st off, create an entity and assign it to the my pointer. my = ent_create(blah,blah,and_blah);
Grats, the entity was created on all the machines.

Now you said you wanted to create a player entity locally. This means the server and no one else on the game will NOT see this entity except for the client that created it. If you really want to do this then use ent_createlocal(blah,blah,and_blah); This entity will only exist on your machine. This is good if your making a 1st person shooter and you want the nice little floatiing gun thing on the lower right side of your screen.

For cameras all you gotta do is make a function on the client side that moves the camera with the player.

Now I know what your saying, "and how exactly in holy hell can I do that?"

This is when I go back to saying STOP BEING STUBBORN AND READ THE FREAKING TUTORIAL! Locoweed has a nice little talent for tutorials and explaining things, not to mention he won the tutorial contest with this tutorial meaning the ppl that made our little A6 engine think he knows what he's talking about. Probably because (and i'm just guessing on this one)... HE DOES!

READ THE TUTORIAL, the longer you put it off the longer it'll take you to learn multiplayer.


"There is no problem that can't be solved with time and determination." -me
prenceofdarkness for instant messages on AIM.

Looking for a model designer
PLEASE, SEND ME A PRIVATE MESSAGE OR EMAIL IF YOU'RE INTERESTED.
Re: Multiplayer Concept [Re: PrenceOfDarkness] #94602
10/16/06 07:35
10/16/06 07:35
Joined: Sep 2006
Posts: 108
J
Jered Offline
Member
Jered  Offline
Member
J

Joined: Sep 2006
Posts: 108
I second everything the Prince had to say and add: read the freaken tutorial

Seriously though, the very thing you "asked" us to help you with is covered in his tutorial. Any one of us could sit here and write out a code that you could use, but that does not "teach you" how to do it. Get the "concepts" from Locoweeds tutorial, then take the "concept" and work it over to what you need specificly.

Multiplayer is complex, but I have notice the more you "try" the more you learn. When you just get a code from someone and make it work in your script, you really didn't learn anything....the learning comes from attempting, failing, and then problem solving it until you get it working. ( during this process...post away..then get responses ( try to get the "concept" of what they say...impliment it...then if it still don't work...post again....get the "concept" try again..until YOU get it...then you "learn" and can move on)

We would all be glad to help you along, as we are all learning as we go along with our own games, but first take the time to take a run through the tutorial so you have the concepts of multiplayer first.


If you want to create a entity that is on the server you use my = ent_create ( , , ); // look it up in the manual
This creates an entity on the server itself and send_skill ( , ) to update all the clients.


to create an entity on a client only, you would ent_createlocal (, ,) since you want it localy and not on the server.

however if you want to create an entity localy, but also have a copy of it on the server ( and also on all clients) then you will need to use

ent_createlocal ( , , ); first

after that you would assign a pointer that you declared above the code to the entity that will be pointed to on the server


entity* player_clone; // put this pointer above the code that uses it
player_clone = ent_create ( , , );


and you can update that clone ( pointer ) using send_skill (player_clone.skill_name, send_all) // send all sends the next two skill in line after skill_name


again, if you have not at least used or read through the tutorials for multiplayer....then go do it. Yes I know....I don't have time for that....fact is you don't have time "not" to go do it if you are serious about making a game that will be multiplayer over lan or over the internet.

Multiplayer has a steep learning curve, and I am fairly new to it myself, but the more you learn, then try, then "fail", then "fix", then try again, then eventually get it working....then you start to "get it". It is a process...it takes time...be patient...and never stop learning while you make your game. Have the tenasity to be relentless....and DONT give up, eventually you will start getting bits and pieces..and once that starts happening....then it is just a matter of working it out the way you want it to go in your game.




best of luck to ya!


3DGS (6.4) Commercial
Re: Multiplayer Concept [Re: Jered] #94603
10/16/06 10:13
10/16/06 10:13
Joined: Jul 2006
Posts: 783
London, UK
sheefo Offline OP
User
sheefo  Offline OP
User

Joined: Jul 2006
Posts: 783
London, UK
Thanks sooooo much everyone. I have read the tutorial, but I will read it again and again till I understand every line of it.
I am a good programmer, I'm just not familiar with the concept of multiplayer. I will however learn

Thanks again!

Page 1 of 3 1 2 3

Moderated by  HeelX, Spirit 

Gamestudio download | chip programmers | Zorro platform | shop | Data Protection Policy

oP group Germany GmbH | Birkenstr. 25-27 | 63549 Ronneburg / Germany | info (at) opgroup.de

Powered by UBB.threads™ PHP Forum Software 7.7.1