Gamestudio Links
Zorro Links
Newest Posts
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
2 registered members (AndrewAMD, Nymphodora), 1,470 guests, and 5 spiders.
Key: Admin, Global Mod, Mod
Newest Members
firatv, wandaluciaia, Mega_Rod, EternallyCurious, howardR
19050 Registered Users
Previous Thread
Next Thread
Print Thread
Rate Thread
[ANet] Synchronise Skills #353279
01/09/11 00:49
01/09/11 00:49
Joined: Jun 2008
Posts: 428
Rasch Offline OP
Senior Member
Rasch  Offline OP
Senior Member

Joined: Jun 2008
Posts: 428
hey it´s me again.

I just have a hopefully easy question. What do i have to do to "sychronise" flags and skills to every new connected player? because my player starts fighting and set some flags on the npc´s. Now these npc´s send their new skill to all and the fight starts on every client. If a new client joins all npc´s dont fight (only those who already connected and received) because there are no skills send from the other.

SO how to do it? or do you have some tips how to get all the flags and skills from every player and npc which are visible on the screen? (just the get) grin

Thanks

edit: ok i tried it out and i´m scanning with c_scan for entitys near my player. if i hit em they send a request to server and server send their correct skills. thats fine so far. but i need to send skill 50-99 its 250 bytes per entity. this is not a big problem, as long as the player isnt spawning in a very big populated area i think. but are there another solutions maybe?

Last edited by Rasch; 01/09/11 03:21.
Re: [ANet] Synchronise Skills [Re: Rasch] #353316
01/09/11 12:00
01/09/11 12:00
Joined: Nov 2002
Posts: 913
Berlin, Germany
S
SchokoKeks Offline
User
SchokoKeks  Offline
User
S

Joined: Nov 2002
Posts: 913
Berlin, Germany
In my current redesign of survive, I'm just going through all entities with ent_next and sending their necessary skills if any.

in the end, you have to send the skills whatever way you program it. But do you really need all 50 skills? I bet there is a lot of redundant data in there that could be calculated on the client instead of being transfered.
In my old project I had around 10 skills that needed to be send per npc.

Re: [ANet] Synchronise Skills [Re: Rasch] #353317
01/09/11 12:09
01/09/11 12:09
Joined: Jul 2005
Posts: 1,930
Austria
Dark_samurai Offline
Serious User
Dark_samurai  Offline
Serious User

Joined: Jul 2005
Posts: 1,930
Austria
After the EVENT_SYHNCHRONIZED is called, you can send all skills and flags you are using with enet_send_skills()/_flags(). You could use a variable that is set to 1 if the EVENT_SYNCHRONIZED was called. In the entities main loop you then send all skills and flags that should be synchronized.


ANet - A stable and secure network plugin with multi-zone, unlimited players, voip, server-list features,... (for A7/A8)!
get free version
Re: [ANet] Synchronise Skills [Re: Dark_samurai] #353356
01/09/11 17:53
01/09/11 17:53
Joined: Jun 2008
Posts: 428
Rasch Offline OP
Senior Member
Rasch  Offline OP
Senior Member

Joined: Jun 2008
Posts: 428
@SchokoKeks

I also thought about ent_next but i think c_scan is working better for me this way. I dont really need all 50 skills at the moment. But i split them into 50 60 70 80 90 skills. So i need to send them all. I think it will be working i just need to send the skills not at the same time on every entity.

@ Dark_samurai

Thanks but the problem is, that i need to get the skills from the server. If i snychronise and send from the entitys i would just send the same skills because i difference the functions with "if(MY_CONNECTION == SERVER_MODE)else"

THanks anyways. This way its working good so far. I´ll see if i´ll get bigger problems but at the moment its fine. laugh


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