Gamestudio Links
Zorro Links
Newest Posts
Zorro 2.70
by jcl. 09/29/25 09:24
optimize global parameters SOLVED
by dBc. 09/27/25 17:07
ZorroGPT
by TipmyPip. 09/27/25 10:05
assetHistory one candle shift
by jcl. 09/21/25 11:36
Plugins update
by Grant. 09/17/25 16:28
AUM Magazine
Latest Screens
Rocker`s Revenge
Stug 3 Stormartillery
Iljuschin 2
Galactic Strike X
Who's Online Now
5 registered members (Dico, AndrewAMD, TipmyPip, NewbieZorro, Grant), 15,791 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
krishna, DrissB, James168, Ed_Love, xtns
19168 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Only (x,y,name) from and to the the server #201860
04/11/08 18:51
04/11/08 18:51
Joined: Dec 2004
Posts: 87
Nederland Tilburg
GarniSoft Offline OP
Junior Member
GarniSoft  Offline OP
Junior Member

Joined: Dec 2004
Posts: 87
Nederland Tilburg
Hello,
I want to make a multiplayer game where only the server must give/recieve the positions (x,y) and name of the players to/from the clients and the rest must be handled on the clients (moving e.d.)

client --> x,y,name --> server
server --> x,y,name (all clients) --> clients

! only datatraffic --> x,y,name

The players entities exist only on the clients.

is this posible within 3dgs ? and how can i do that?

Thanks


I am a dreamer ... i dream they all come true ...

www is in bewerking
Re: Only (x,y,name) from and to the the server [Re: GarniSoft] #203421
04/21/08 23:00
04/21/08 23:00
Joined: Nov 2003
Posts: 433
The Netherlands
T
Toon Offline
Senior Member
Toon  Offline
Senior Member
T

Joined: Nov 2003
Posts: 433
The Netherlands
I tryed something like that as well recently, with server and clients running on the same computer (testing purposes) it worked out well after a while but i tryed to run it over network with my team and it worked but verry slowly.

I think my problem might be the sending for messages to quickly after eachother (every frame).

I did not test this yet but i will when i have time for this.

The western shooter posted a while ago was quite good too, i dont know how this was programmed but it worked out.

I hope someone with a little more multiplayerprogramming expirience can help us out here.

Re: Only (x,y,name) from and to the the server [Re: Toon] #204000
04/25/08 15:50
04/25/08 15:50
Joined: Jan 2006
Posts: 968
EpsiloN Offline
User
EpsiloN  Offline
User

Joined: Jan 2006
Posts: 968
First you have to check if the app is running in server or client mode. Then (possibly in main() !on client!) you'll have to create if its a client an ent for that client. After that , whenever (using a loop) the client receives coordinates and a name for them , if an ent with that name doesnt exist , create it. Else , update its x,y according to the received.
Another function (started by main() on the clients) will send to the server the input (x,y and name) of the client.
The server , in the event function , if it received a var (or string,dunno exactly what you could use) send it to everybody (it'll send it to the original sender too , because you dont have ents on the server to filter that).
It isnt very hard to script that , but I just got home from work \:\) and thats the last thing I wanna do...

PS.: Using an array (to send to everybody) will be easyer , because you can stack several vars in one array and send it together. If you send an array for X,Y you'll have to send a string with name separately , and the server might receive that later than the string for another client. This will mix up the actual info the server is receiving , so...use 3 vars (x,y and ID) for data between server and clients.


Extensive Multiplayer tutorial:
http://mesetts.com/index.php?page=201

Moderated by  HeelX, Spirit 

Gamestudio download | 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