# Simulating "White Noise" along a point

0 favourites
• 3 posts
From the Asset Store
Connect the dots in the correct order and draw happy animals!
• Hi guys. I want to create sort of a "WHITE NOISE" effect with the lines of my sprite.

In the capx below are my attempts at creating that effect on sprites.

https://www.dropbox.com/s/rdxf2x0u11ouo ... .capx?dl=0

FACE 1 is the base animation of each face

FACE 2 uses controlled double sine to simulate shaking effect. can be moved using WASD

FACE 3 uses REX'S SHAKE PLUGIN. can be moved using UDLR

Now as you can see in both picture and CAPX, the white noise simulation looks better on FACE_2.

However it cannot be smoothly implemented as setting its position relative to a point every tick results in it not moving at all so I'm forced to set FACE_2 position every X seconds and this results in a pretty bad, Atari-looking displacement.

Basically, I want FACE_3's shaking along a point but with less intensity that what it currently has. Is there a separate effect for shaking where you can control the parameters of the the shake? What other solutions would you suggest?

• ## Try Construct 3

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

Construct 3 users don't see these ads
• I can't open the capx since i don't have that third party plugin.

I guess you could do face2 with events though. Use one object that you'd move around and then just position a second object with sines, using the first as the center.

Here's the sine equation:

magnitude*sin(period*time*360+offset)

And the events:

start of layout

magX = 4 + random(2)

perX = 0.2 + random(0.2)

offX = 0

magY = -4 + random(2)

perY = 0.4 + random(0.2)

offY = 0

every tick

sprite: set x to center.x + magX*sin(perX*time*360 +offX)

sprite: set y to center.y + magY*sin(perY*time*360 +offY)

• ...

Yeah! This is pretty good. It doesn't have the jumpy effect like when I try to combine sine + displacement every tick.

Thanks a lot!

• 3 posts