Gamestudio Links
Zorro Links
Newest Posts
FXCM: "Can't connect to price server"
by jcl. 06/19/19 15:47
Data Execution Prevention Strikes Again
by Dooley. 06/19/19 15:38
assert
by jcl. 06/19/19 14:59
Bring the old grin back!
by Michael_Schwarz. 06/19/19 07:56
Help with calculation
by Qw3rty. 06/18/19 08:01
AUM Magazine
Latest Screens
The Space Between
Pogostuck: Rage With Your Friends
Worst Case Z
AckCon'18 - Lotter vs the World 2 - Preview Release
Who's Online Now
13 registered members (AndrewAMD, Kaga, JeyKey II, Dooley, Grat, kvm, alibaba, Ayumi, MatPed, 1 invisible), 632 guests, and 3 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Qw3rty, Dal, Carson, giantj, dh85
18236 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Page 1 of 2 1 2
ENet Library #444384
08/08/14 09:23
08/08/14 09:23
Joined: Jul 2014
Posts: 49
Romania,vaslui
A
AceX Offline OP
Newbie
AceX  Offline OP
Newbie
A

Joined: Jul 2014
Posts: 49
Romania,vaslui
I want to make a network plugin for A7 using ENet.
But I have no idea,how to create a entity to be visible for all clients.

Also,I have some experience with ENet.But I never used it with 3DGS.

Re: ENet Library [Re: AceX] #444418
08/09/14 17:36
08/09/14 17:36
Joined: Jun 2001
Posts: 1,004
Dossenbach
N
nfs42 Offline
Serious User
nfs42  Offline
Serious User
N

Joined: Jun 2001
Posts: 1,004
Dossenbach


Andreas
GSTools - Home of
GSTScript 0.9.8: lua scripting for A6/7/8
GSTNet 0.7.9.20: network plugin for A6/7/8
GSTsqlite 1.3.7: sql database plugin for A6/7/8
3DGS Codebase: 57 snippets || 3DGS Downloads: 248 files
Re: ENet Library [Re: nfs42] #444428
08/10/14 11:30
08/10/14 11:30
Joined: Jul 2014
Posts: 49
Romania,vaslui
A
AceX Offline OP
Newbie
AceX  Offline OP
Newbie
A

Joined: Jul 2014
Posts: 49
Romania,vaslui
GSTNet isn't working for me :|

I want somebody to help me with a C++ code.

My plugin have only server/client init and I have a function to create a entity,but this entity is only visible in server :|.

Re: ENet Library [Re: AceX] #444429
08/10/14 12:42
08/10/14 12:42
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
I guess you dont know the whole server-client concept...
Try coding something small first like a chat or whatever.
Also try ANet, its based on ENet and its perfectly fine for coding a game (also for beginners)

Re: ENet Library [Re: Ch40zzC0d3r] #444431
08/10/14 14:26
08/10/14 14:26
Joined: Jul 2014
Posts: 49
Romania,vaslui
A
AceX Offline OP
Newbie
AceX  Offline OP
Newbie
A

Joined: Jul 2014
Posts: 49
Romania,vaslui
I know ANet,but ít's not free..
What I want to know,is how I can send created entities on server to client.

I know how to send a packet with a text,in Enet.but to send a entity not.

Re: ENet Library [Re: AceX] #444432
08/10/14 14:31
08/10/14 14:31
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Man...
There is no pre-defined thing for something like an "Entity". Its opensource library for all kinds of shit not just for 3DGS.
If you really want to do this then send the whole struct data of the entity and a byte infront of it to dertiminate what you want to do with it (something like the packet id, 1 == create entity, 2 == delete entity and so on)
I guess you should just pay the little money to get a good working plugin...

Re: ENet Library [Re: Ch40zzC0d3r] #444433
08/10/14 14:53
08/10/14 14:53
Joined: Jul 2014
Posts: 49
Romania,vaslui
A
AceX Offline OP
Newbie
AceX  Offline OP
Newbie
A

Joined: Jul 2014
Posts: 49
Romania,vaslui
I will try to send the whole struct data,and to see if works.

Re: ENet Library [Re: AceX] #444434
08/10/14 15:19
08/10/14 15:19
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
You still have to call ent_create.
If you dont need all struct data then only send relevant informations to keep traffic small.

Re: ENet Library [Re: Ch40zzC0d3r] #444448
08/11/14 10:43
08/11/14 10:43
Joined: Jul 2014
Posts: 49
Romania,vaslui
A
AceX Offline OP
Newbie
AceX  Offline OP
Newbie
A

Joined: Jul 2014
Posts: 49
Romania,vaslui

This is the code that I have:
Code:
...
DLLFUNC void AddEntity(ENTITY* ent,char* mdl)
{
ent = ent_create(mdl,vector(0,0,0),NULL);
}


I need to do something to send relevant information.

Re: ENet Library [Re: AceX] #444455
08/11/14 13:08
08/11/14 13:08
Joined: Oct 2011
Posts: 1,082
Germany
C
Ch40zzC0d3r Offline
Serious User
Ch40zzC0d3r  Offline
Serious User
C

Joined: Oct 2011
Posts: 1,082
Germany
Now you send an ID for example 1 for entity creation, or 2 for delete or whatever..
Then you send the model name and creation pos for example. On the cleints you receive that info and create an entity there too...

Re: ENet Library [Re: AceX] #444484
08/12/14 13:43
08/12/14 13:43
Joined: Apr 2007
Posts: 3,750
Canada
WretchedSid Offline
Expert
WretchedSid  Offline
Expert

Joined: Apr 2007
Posts: 3,750
Canada
Putting aside for a second that you need to define your own protocol and that Enet just takes care of pushing packages around:

Your AddEntity() method does not what you think it does, the pointer will not be transferred out of the function. You assign it a new value, but that's not visible to the caller. Either go with pointer to pointer, or better, return it as a return value.


Shitlord by trade and passion. Graphics programmer at Laminar Research.
I write blog posts at feresignum.com
Page 1 of 2 1 2

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