A tree waving in the wind.

This forum is currently in read-only mode.
From the Asset Store
Weather Wind Sounds - Wind contains 10 tracks (1 tracks and 9 seamless loops)
  • Hey Guys!

    Been all through the forums trying to find a good answer for what I'm trying to do (no point in posting a cap yet as I've removed all bits regarding the issue).

    I'm trying to make a tree bend in a wind storm. Entirely 2D - I figured a distort effect using columns and rows would handle it. I want the bottom of the tree to not move at all and every row towards the top it moves a bit more.

    I've tried doing the basic stuff like SINE - but it rotates the whole object. I figured maybe having the code set to grab the x distortion from the previous row and adding a value to it - but the rows above the moving one do not respond to it, they only see the adition value I've added.


    Go to 1:47 into the video.

    Ghouls n Ghosts for the tg16/supergrafx has the effect I'm trying to go for. I feel like I was close but I screwed something up.

    I considered animating the trees but I kinda like this cheesy effect.

    Any help is greatly appriciated! I'm not a total noob on here my account wouldn't let me reset the password so I gave up and made a new account (damainman69). I was learning Construct last year by rebuilding the first level of the Black Tiger arcade game :)

    Anyhow, Thanks in advance for any help!!!


  • I think I solved it - I'll post a pic. Seems to be doing what I want, just need to put it oin the proper place right now!

    <img src="http://gooBGgBV" border="0" />

  • Or you could use the tree crown sprite seperate and use horizontal skew on it^^

    edit: here an example with warp and skew. You have to tweak some numbers, but it doesn't looks too odd :P.


  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • It looks like (in Ghouls 'n Ghosts) the trunk is actually a separate texture to the canopy. So the trunk doesn't have the distort effect, and the distort effect starts at the very bottom of the canopy texture.

    Make sure your hotspot is in the right place too. If the sine effect is spinning your tree, maybe your hotspot is in the middle of the tree texture. Place it at the bottom of the trunk (or bottom of the canopy, if you split the trunk and canopy into two different textures) and you should get much better results.

    Hand animating does look a heck of a lot better, but it also affects VRAM usage a lot too. I created a 20 frame animation for five different trees, put them into a .CAP, and created a dynamic wind effect to animate them. Looked great! But what would have been 5 different textures using warp/sine/distort effects, became 100 different textures with this hand animated technique. Not cool.

  • Here's a vid. Making this game for my daughter. This would be the first level after she saves me and I carry her on my back until the end of the game. This is supposed to look similar to GNG as its my "nightmare" level. Lots of bugs still, the music isnt mine yet - doing that last. Font is the only thing I didnt hand draw (or draw by pixel). Missing stuff and the attack pattern is just a testing one.

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