Gamestudio Links
Zorro Links
Newest Posts
AlpacaZorroPlugin v1.3.0 Released
by kzhao. 05/22/24 13:41
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
AUM Magazine
Latest Screens
The Bible Game
A psychological thriller game
SHADOW (2014)
DEAD TASTE
Who's Online Now
2 registered members (AndrewAMD, ozgur), 1,415 guests, and 7 spiders.
Key: Admin, Global Mod, Mod
Newest Members
AemStones, LucasJoshua, Baklazhan, Hanky27, firatv
19055 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
passing panel update from client to server #258445
03/30/09 16:48
03/30/09 16:48
Joined: Jul 2004
Posts: 74
Inside Maya
S
Sichlid Offline OP
Junior Member
Sichlid  Offline OP
Junior Member
S

Joined: Jul 2004
Posts: 74
Inside Maya
Hello ,

I have made a working MP demo for my client.
There is a voltage bar ( similar to a health bar) which increases as player presses a button.


All is working fine and the below Panel is working fine.

When Server player is increasing voltage , then client/Server PC's can see the panel bar increasing but when client is increasing voltage , then the panel is not updating on both the machines. the code is below which is for a standard panel.

"
PANEL serverincreasingvoltagered
{
pos_x = 360;
pos_y =40;
window(0,0,240,20,redbar,display_ratio_output,NULL);
flags = refresh;
layer =10;
}

"

Any help will be greatly appreciated.

Regards,
Sichlid


Best Regards, Sichlid
Re: passing panel update from client to server [Re: Sichlid] #258450
03/30/09 17:22
03/30/09 17:22
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline
Serious User
croman  Offline
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
you should send variable that moves that window/bar (display_ratio_output in your case, right?) from client to client and update each panel locally



Ubi bene, ibi Patria.
Re: passing panel update from client to server [Re: croman] #258453
03/30/09 17:32
03/30/09 17:32
Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
Cowabanga Offline
Expert
Cowabanga  Offline
Expert

Joined: Aug 2008
Posts: 2,838
take me down to the paradise c...
[OFF TOPIC] Hey cerberi, nice to see you again on the forums! smile

Re: passing panel update from client to server [Re: Cowabanga] #258779
04/02/09 03:58
04/02/09 03:58
Joined: Jul 2004
Posts: 74
Inside Maya
S
Sichlid Offline OP
Junior Member
Sichlid  Offline OP
Junior Member
S

Joined: Jul 2004
Posts: 74
Inside Maya
Hi Cerberi,

thank you for your reply.

I am passing the display_ratio_output variable to the server and vice versa but not working.

Also when you say panel local updating , i belive panels are automatically updated locally as there is no command with which we can do it and since rest of the panels are working properly .. i think this is bug of A7 MP.

REgards,
Sichlid


Best Regards, Sichlid
Re: passing panel update from client to server [Re: Sichlid] #258839
04/02/09 12:21
04/02/09 12:21
Joined: Nov 2007
Posts: 1,032
Croatia
croman Offline
Serious User
croman  Offline
Serious User

Joined: Nov 2007
Posts: 1,032
Croatia
you'll find plenty of A7 MP bugs along the way so i suggest you start using some MP plugin like ANet(recommended) or GSTNet



Ubi bene, ibi Patria.
Re: passing panel update from client to server [Re: croman] #259273
04/05/09 08:13
04/05/09 08:13
Joined: Jul 2004
Posts: 74
Inside Maya
S
Sichlid Offline OP
Junior Member
Sichlid  Offline OP
Junior Member
S

Joined: Jul 2004
Posts: 74
Inside Maya
Hi Cerberi_croman,

Thanks for the links and i am also of the opinion that there are certain bugs in
A7 MP.

I shall try ANet and see how it goes.

Thanks,
Sichlid


Best Regards, Sichlid
Re: passing panel update from client to server [Re: Sichlid] #259282
04/05/09 09:35
04/05/09 09:35
Joined: Jan 2004
Posts: 2,062
Hamburg, Germany
slacer Offline
Expert
slacer  Offline
Expert

Joined: Jan 2004
Posts: 2,062
Hamburg, Germany
Is this a dualplayer game only? Or how do you want to use with n panels if n players connect to your server? If you have 3 players connected to your server, all players would try to update the same variable display_ration_output, which is not what you need.

ANet does not eliminate this design problem of your code, only YOU can do this.

Re: passing panel update from client to server [Re: slacer] #259284
04/05/09 09:48
04/05/09 09:48
Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Tobias Offline

Moderator
Tobias  Offline

Moderator

Joined: Aug 2000
Posts: 1,140
Baunatal, Germany
Variable update between server and clients works fine in A7 MP here. I think that blaming A7 bugs is wasted time, it almost always turns out that the bug is in your code. Check that youre not additionally setting it somewhere else on the server or receiving it from two different clients. Thats the most likely mistakes with variable sending.

Re: passing panel update from client to server [Re: Tobias] #259419
04/06/09 05:51
04/06/09 05:51
Joined: Jul 2004
Posts: 74
Inside Maya
S
Sichlid Offline OP
Junior Member
Sichlid  Offline OP
Junior Member
S

Joined: Jul 2004
Posts: 74
Inside Maya
@slacer
I have server and client only right now ( hence 2 players only).i would like to add more players in the future but for now i need to get 2 player game code working.

@Tobias

All other variables , panels ( comprising of digits and BMAP) are working properly.Except for this one which is a panel having a HBAR. only this HBAR panel
which needs to increase/decrease based on display_ratio_output is not working.
When the HBAR panel is increasing from server side ( by pressing Key1 for increasing the HBAR from right to left) ,it get updated properly on client.
But when client side is pressing key 1 to increase HBAR , there is no change in HBAR even though display_ratio_output is getting updated properly on both instances of game ( i.e server and client).

Doka


Best Regards, Sichlid
Re: passing panel update from client to server [Re: Sichlid] #260157
04/09/09 07:02
04/09/09 07:02
Joined: Jul 2004
Posts: 74
Inside Maya
S
Sichlid Offline OP
Junior Member
Sichlid  Offline OP
Junior Member
S

Joined: Jul 2004
Posts: 74
Inside Maya
Ok guys .. i found out the bug . It was in my code as the variable to decide
the BAR length on client side was not being updated.

Thanks for all the help to everyoone.

Sichlid


Best Regards, Sichlid

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