What to use to make the fastest trail?

This forum is currently in read-only mode.
  • I know there were many topics about trails, but this one is quite different. I know how to make trails, but I don't have a clue about their effectiveness. In my application there are dozens of very small (~1x1px) objects with slow-fading trails up to 250 px long and I don't want the app. to lag, even in 1920x1440 resolution. Should I use sprites, plasma, particles or something else?

    So far my bet is on particles, but I'm still beginner in Construct.

  • If the number of objects approaches the number of pixels in the screen, you would be better off with plasma.

    Particles: probably not a good idea for trails, specially for objects so small

    Sprites: good if there's much less objects than pixels in the screen, you'd have to do some math to get the trail looking right. Do the objects turn? if so, you'll have to segment your sprites and each segment needs more math. When comparing pixels vs objects, double the number of objects for each segment on your trail, if it's still less than pixels go with sprites.

    Bonus: Lines!

    If your objects are 1x1 px, consider using the Line object instead of sprites for the trail. Less vertex data, less computations, faster and simpler to understand. The segment thing goes for lines too, though.

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • If the number of objects approaches the number of pixels in the screen, you would be better off with plasma.

    That's negative.

    Particles: probably not a good idea for trails, specially for objects so small

    Any particular reason?

    Sprites: good if there's much less objects than pixels in the screen, you'd have to do some math to get the trail looking right. Do the objects turn? if so, you'll have to segment your sprites and each segment needs more math. When comparing pixels vs objects, double the number of objects for each segment on your trail, if it's still less than pixels go with sprites.

    There are literally dozens of these objects, i.e. max ~2-3 dozens - not thousands. Objects do turn.

    Bonus: Lines!

    If your objects are 1x1 px, consider using the Line object instead of sprites for the trail. Less vertex data, less computations, faster and simpler to understand. The segment thing goes for lines too, though.

    AFAIK, it's even slower than canvas.

  • In my experience, plasma can be slow. Canvas can be difficult to work with. Particles are fast, but lack fine control. Sprites would probably be your best bet as far as a balance of speed and control goes.

    It would help to see a .cap of your objects moving around though.

  • It would help to see a .cap of your objects moving around though.

    Sorry, can't do. Secret project They're moving on parabolic trajectories, like in Scorched Earth. If particles' only weakness is lack of control... well, I can live with what I've already done (I've started with particles).

    I'm probably going to stick with them, because I found out I can remove original 1x1px sprite and simply move the particle spray. If I find a problem impossible to solve with particles, I'll swich to Sprites.

    I'd still appreciate more advice though.

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