How do you make a clone's opacity lesser?

I’m using the 1.19.3 test version in Wick Editor
and I know there are bugs in test sometimes,
but I haven’t had any bugs :smiley:

When I had played the project,
it never got lesser the opacity of the clones.
I didn’t know why, so I asked for help.
(It also made my project very laggy).

I’ve tried making some code to fix it,
but it’s the same still. This is the screenshot:
Screenshot from 2021-05-15 21-38-18
(I’m not using the default script for anything btw)

My file that you can inspect is
gamedev.wick (1.7 KB)

The reason why is lagging since to be associated with the fact that you are calling the object every frame.

The error is in line 3

You’re cloning the clones into clones that clone themselves into one’s that clone themselves and etc.
(And all the clones are being repositioned to the mouse X and Y value)
That’s why it’s working slow…

Use this code instead:

if (this.isClone){
    this.opacity -= 0.2;
    if (this.opacity === 0){
        this.remove();
    }
}else{ 
    this.clone();
    this.x = mouseX;
    this.y = mouseY;
}
1 Like

Ok ill do the cloning lesser!

Low your FPS to 30 or less… why it is at 1000 FPS?

Ok I will lower it.

That helped me alot! Thanks!

1 Like

Actually, I think the fps is just fine

I think when a project is at a too high fps, Wick run’s the project at the closest fps it finds fit rather than “over running” it in attempt of getting the perfect 1k fps performance (unless if the project was exported into an animation).

Results (with 1k fps) -
Untitled_ May 15, 2021 6_11 PM

1 Like

It will never run at 1000FPS, it is a bad practice. (Even though we can set it to that number, The editor or the browser has a limit applied to it)

the 1000 fps i think is to make the trail super smooth. but that comes with a cost of lag.

My project hasn’t been lagging when I put the project’s fps to 1000 fps. It has only been lagging when I make errors in the code.

1 Like

@Hamzah_Alani, @awc95014… after several experiments, it seems that 250FPS is the limit (at least on my machine).

FPS.wick (2.0 KB)

1 Like

I also tested that and got the same FPS as you on the browser.

1 Like

you are lagging, it’s just still at a high fps. if it’s at 1000 fps and you lag to 25% of the fps, it’s still at 250 fps and that’s still very fast.

Yeah, but nearly no one notices that lag anyways

and also i started using 250 fps when Jovanny said the max was 250 fps.

It is still not good to set it to that number… as a designer you want to have control over your FPS… Setting the FPS to the max number doesn’t guarantee it. When you share your application over the internet, people will have different experiences with your app based on their machines. For this small demo, it is ok, but as long as you continue with more complex applications/games, this will be an issue. (For games, the Nintendo switch is targeting to 60FPS, but in reality most of their games are running on 30FPS) (The PS5 is targeting now to 120FPS, but the PS5 has a powerful hardware)

it is a small demo game, so im testing how good the highest fps is on wick.
After i’ve finished testing most stuff, i will set the fps back the the original that i intended:
30 fps.