Gamestudio Links
Zorro Links
Newest Posts
Removing outliers from files
by AndrewAMD. 12/02/26 15:26
SGT_FW
by Aku_Aku. 11/30/26 08:19
Experiences with cTrader
by JeyKey II. 11/27/26 09:04
make a complaint
by EW_bytes. 11/26/26 23:00
FXCM => AVA Trade Plugin???
by Martin_HH. 11/25/26 21:59
No connection to MT4
by Martin_HH. 11/23/26 06:38
MinMax function on History t6 file
by LucasJoshua. 11/21/26 14:28
What are you working on?
by rayp. 11/20/26 18:10
AUM Magazine
Latest Screens
Dorifto samurai
Shadow 2
Rocker`s Revenge
Stug 3 Stormartillery
Who's Online Now
1 registered members (AndrewAMD), 5,976 guests, and 2 spiders.
Key: Admin, Global Mod, Mod
Newest Members
EvanTJ, rht, MaliceTheMaker, Haitao_Ren, JimSimons
19250 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