0 Favourites

How do I save syncronized changes

  • Hello again!

    Since the last time, I've read some manuals, tutorials and threads, so I'm slowly getting in S2's multiplayer... I hope =)

    Thank you, guys, for helping me in , it was impossible to find that without you

    I'm not near my computer now, so I cannot give you some screenshots and capx but I'll give them at evening if you won't solve the problem)

    The problem is... strange. I'm making some loot on game map. When player in LOS if item and clicking on it - he will take it. When all events are triggered, I'm sending message to host (reliable ordered). On message I'm destroying object on host side and broadcasting new message. In common on message, I'm destroying object to. All's working. But when new player connecting it can interact with this object - it's dissapearing only for players what were online. I thought, all information are based on host's info... I'm syncing object in layout start

    Thx a lot

  • drive google com/file/d/0B8Cc6MKKLdYkY0RJTWZ5eERCRU0/view?usp=sharing

  • Construct 3

    Buy Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Buy Now Construct 3 users don't see these ads
  • When player in LOS if item and clicking on it - he will take it. When all events are triggered, I'm sending message to host (reliable ordered). On message I'm destroying object on host side

    All sounds theoretically correct in this part until...

    and broadcasting new message. In common on message, I'm destroying object to. All's working. But when new player connecting it can interact with this object - it's dissapearing only for players what were online.

    Starting from this part, there are things that is unnecessary, destroy event concept is similar to creation event, you don't have to broadcast message to trigger destroy event, this is done by host. Broadcast message only when it is necessary, such as announcing the name of the peer and the item collected.

    Furthermore, do not use create/destroy/spawn event in peer and common, these are restrictively host only event, whatever happen in peer will not be synced, unless you communicate the changes, which is unrecommended because you adding burden to the host.

    I haven't looked at the capx, I'll look at it if I have some time later today.

  • I've tested. It's not working without broadcasting something too =(

  • I've tested. It's not working without broadcasting something too =(

    That tells me that your event is not complete on the host side or you got the wrong condition, my old tests proves there's no broadcast required, and I believe this is still valid. I haven't test with LoS before, possibly your character LoS did not overlap with your item in host, this mean you have to sync the LoS angle too.

  • It dont want to work for some reasons

  • It dont want to work for some reasons

    I guess you still don't grasp the flow of object creation. If you already can spawn peer's character without broadcast, there's no reason at all why you need to broadcast. I think you have to revisit the official example, either the shooter or pong, both shows how to do it. Or, study the flow of peer character creation on your project, it's obvious that you don't understand the flow because creating peer character and creating item on host is absolutely the same process.

    I can't point out anything specific because I don't have C2 right now.

  • Still have a problem. Attention. Need help =))))

  • > It dont want to work for some reasons

    >

    I guess you still don't grasp the flow of object creation. If you already can spawn peer's character without broadcast, there's no reason at all why you need to broadcast. I think you have to revisit the official example, either the shooter or pong, both shows how to do it. Or, study the flow of peer character creation on your project, it's obvious that you don't understand the flow because creating peer character and creating item on host is absolutely the same process.

    I can't point out anything specific because I don't have C2 right now.

    Unfortunately, I don't know how to summon you in this thread, unless I can not send pm =( Let's try this way while you're online

  • DuckfaceNinja Hope it work's : D Feelin' like a big fat spammer now

  • I don't know what should I be saying here... What's left is you are the one who has to understand how to do it.

    Some pointers:

    1) Understand what sync object does: (creation and destroy is covered here not broadcast message)

    2) Sync Position (or with angle) if it is moving npc/enemy object.

    3) Sync None if it is a static object like loot. Use broadcast message to update position on created.

    4) Restrict client input just for continuous trigger, for triggering trigger use send message.

    I'm not sure how familiar you are with c2 event system, what can I say is the way you set up you capx imply that you still need some more study to get out of the normal event structure (it feels incomplete rather than wrong), in MP it is different but you can correlate such as to use every tick = use sync, to use trigger = use send message, trigger once= send message.

    I'm an artist, not a coder and official example and manual is all I need to understand this, there's no reason why you can't do it

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)