RTS cooperative multiplayer template

0 favourites
  • 4 posts
From the Asset Store
10 isometric and animated Strategy Game Buildings in two Colors.
  • I have uploaded a version of my upgraded RTS template to the arcade, including a commented CAPX.

    Its a cooperative game play version.

    RTS template in the arcade

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Hello,

    I'm pleased to study a bit you capx and work around with Multiplayer plugin for tests. One thing remains obscure to me : in the "enemy" part, which seems to be shared by both host and peer, you gave a random point for the enemy patrol behavior ai. I don't understand how this does not conflict with multiple connected instances of the game. I mean, is the random function already synched when in multiplayer for secure random number generation ? (Or do we have to program this by ourself ?) I saw that it works, but why ? Why this function does not return different values ? And why it is done on the peer instance ? This should be only on the host that make all the calculations and send to peer via multiplayer messages or synched objects, although I know there's many ways to implement game logic in multiplayer (like host does main calculations and send results, or host and peer have the same simulation synchronized by functions, etc...).

    Is it because the TankBase is synched so when you do a modification, it's done once ?

    I saw that you disabled a random angle set at Projectile object creation. Is it for the same reason ? Because the object is not synched, so you can't use random function and set the spawner object's angle to be sure it shared ?

    I miss something. Do you have some time to explain me more ? I feel lost ! The multiplayer plugin is the most difficult to deal with in Construct 2.

    By the way, thanks for your useful template !

  • The Enemies find path Event has a "Group Host is active" event, making this event only fire on a peer which has the group "Host" active, meaning it only gets fired on the host peer.

    When the hosts enemy object moves, its positioning gets synced to the peer.

    The random angle bit is disabled as it creates to large a difference in targeting and shooting among different peers. (preventing visual misfires on none host peers)

    The aiming relies on the default turret behavior, the less difference between peers, the more accurate the multiplayer effect will feel.

    This could actually do with an upgrade, but it would require a bit of fancy syncing and targeting which would be rather specific for this situation, making the the template less adaptable for other projects.

    The key of this template is that you have multiple objects for peers, each able to move and act individually in a multiplayer scenario.

  • Ok, I was a little bit confused so I misread some things. Thanks to you !

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