Gamestudio Links
Zorro Links
Newest Posts
Free Live Data for Zorro with Paper Trading?
by AbrahamR. 05/18/24 13:28
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 (AbrahamR), 717 guests, and 4 spiders.
Key: Admin, Global Mod, Mod
Newest Members
Hanky27, firatv, wandaluciaia, Mega_Rod, EternallyCurious
19051 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
Possible bug with multiplayer #301136
12/08/09 15:52
12/08/09 15:52
Joined: Aug 2008
Posts: 36
California USA
tunisod Offline OP
Newbie
tunisod  Offline OP
Newbie

Joined: Aug 2008
Posts: 36
California USA
Hello, I think I may have found a bug with multiplayer. In the AUM 78 in multiplayer 9, multiplayer 10 or multiplayer 11 examples when the code is compiled the client fires from the server model. I’m currently using A7.80 Commercial and it’s been tested with A7.817 by George Pirvu.

Re: Possible bug with multiplayer [Re: tunisod] #301146
12/08/09 16:11
12/08/09 16:11
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
This might indeed be a bug or incompatibility of the current engine version with the code from AUM 78. I'll look into it.

Re: Possible bug with multiplayer [Re: jcl] #301788
12/14/09 11:29
12/14/09 11:29
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
Ok, it's not a bug but just a timing issue.

You're calling wait(-0.5) immediately after loading a model. The hard disk access goes into the wait time, thus depending on the speed of your hard disk the -0.5 are most likely too short. It probably worked on George's PC, but not on yours.

You could use a longer wait time like (-5), but of course this might still not work on other PCs and is anyway a bad solution. The normal way is polling the entity until the handle becomes valid. You can do it this way:

my = ent_create ("redsoldier.mdl", vector (100, 50, 40), move_players);
while (my.client_id != dplay_id) wait (1); // wait until the handle is ready
client_ent = handle(my);

I'll mention this in the manual.

Re: Possible bug with multiplayer [Re: jcl] #301833
12/14/09 15:25
12/14/09 15:25
Joined: Aug 2008
Posts: 36
California USA
tunisod Offline OP
Newbie
tunisod  Offline OP
Newbie

Joined: Aug 2008
Posts: 36
California USA
I had the same thought before I posted thinking the model didn't have enough time to load, so I played with the wait states and it didn't help. When George tested it it failed for him as well. I wanted to confirm with him first before I posted and when he tried and it failed for him too he told me to go ahead and post the problem.

So I'm guessing you changed the wait states and it worked for you?

Re: Possible bug with multiplayer [Re: tunisod] #301836
12/14/09 15:47
12/14/09 15:47
Joined: Jul 2000
Posts: 27,986
Frankfurt
jcl Offline

Chief Engineer
jcl  Offline

Chief Engineer

Joined: Jul 2000
Posts: 27,986
Frankfurt
It works when I use wait(-2). But this is dependent on the model load time on the individual PC. You might need -10 or even more.

Better use the modification that I posted. That works everywhere.

Re: Possible bug with multiplayer [Re: jcl] #301840
12/14/09 15:52
12/14/09 15:52
Joined: Aug 2008
Posts: 36
California USA
tunisod Offline OP
Newbie
tunisod  Offline OP
Newbie

Joined: Aug 2008
Posts: 36
California USA
ok I'll go ahead try your fix when I go home tonight.

Thanks for your help jcl

Re: Possible bug with multiplayer [Re: tunisod] #301944
12/15/09 15:31
12/15/09 15:31
Joined: Aug 2008
Posts: 36
California USA
tunisod Offline OP
Newbie
tunisod  Offline OP
Newbie

Joined: Aug 2008
Posts: 36
California USA
You’re awesome as usual JCL. I tested the fix last night and it worked beautifully.

Thanks again for your time and help.


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