How to set position of particles for pasting onto canvas in split screen multiplayer?

Not favoritedFavorited Favorited 0 favourites
  • 4 posts
From the Asset Store
Particles support animations, collisions, effects and etc.
  • I really hope someone can figure this out as I have hit a wall!

    I have a split screen two player game and use the method of using a canvas and every tick pasting all objects on the canvas after setting their position using the distance between the two players and then resetting their position back again.

    It works perfectly for all objects except particles. This is obviously because once a particle has been emitted it is no longer controllable. Of course you can set the particle emitter position but this will not result in the particles being pasted on the canvas.

    I assume there must be a way to achieve the same thing such as moving an entire layer to match the distance between the two players but thus far I cannot seem to get anything to work.

    Any ideas please?

  • I think the best way will be to roll your own particle system with a simple RNG and pass both the same seed. That sounds more difficult than it actually is.

    Here is a related open feature request you should thumbs-up: github.com/Scirra/Construct-feature-requests/issues/533

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • Thanks. Do you mean own particle system using sprites with bullet and fade? It's to generate fire and smoke effect so would this be far more cpu intensive to be able to move that many particles back and forth and pasting on canvas every tick? The game is already hitting fairly high CPU usage so been trying to be as efficient as possible moving forward! The open feature request for 2 cameras would certainly be a great option!

  • That's why you need to write a random number generator and pass both the same seed. That way, you don't need to keep track of each particle. If you create two instances of a particle system with the same RNG and the same seed, they will draw the exact same particles.

    I don't think there's any way to set the seed in Construct or in JS. Fortunately, your RNG can be pretty simple, since it's just for visual effects.

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