Fade ground to black as Terraria?

0 favourites
  • 11 posts
From the Asset Store
25 high quality isometric ground blocks + sprite sheet
  • So here's the example:

    <img src="http://ecetia.hipertextual.com/files/2013/04/Terraria-guia-enfermera-costurero.jpg" border="0" />

    As you can see in the image,

    ground is lighter near grass,

    and as it goes deeper it fades to black.

    How can I do that in C2?

    I use 2 sprites, 1 for grass tiles and 1 for ground tiles.

    Any idea?

  • martinx09,

    There are probably loads of different ways to achieve this effect - here is just one possible solution.

    dl.dropboxusercontent.com/u/184657779/ground%20shading%20example.capx

    You could probably automate the creation of alternative shading effects on layout start if you wanted - but, unless your game is massive, this should probably suffice...

    Budgie

  • martinx09,

    There are probably loads of different ways to achieve this effect - here is just one possible solution.

    https://dl.dropboxusercontent.com/u/184657779/ground%20shading%20example.capx

    You could probably automate the creation of alternative shading effects on layout start if you wanted - but, unless your game is massive, this should probably suffice...

    Budgie

    It says that I can't open the file because it was saved in r140 and I have r139 but that's the latest version in the download section :S

  • 139 is the latest Stable release, r140 is the latest Beta release. You need to get the Beta version. If you are on steam right click Construct 2 and choose to opt in to the beta releases.

  • 139 is the latest Stable release, r140 is the latest Beta release. You need to get the Beta version. If you are on steam right click Construct 2 and choose to opt in to the beta releases.

    Oh thanks!

    If I update to r140,

    I'll still be able to open files made with r139?

  • Can't open r140,

    downloaded 2 times on steam,

    steam says it can't open the file :/

  • Made a game ages ago that uses a very simple technique for that effect

    All you need to do is

    Make a new layer call it 'FOG OF WAR' or whatnot

    Place a new object sprite in that layer

    That is an Alpha blended PNG Sprite Blackout mask

    much like the following

    FOG OF WAR OBJECT

    I tend to favor a HEXAGONAL shape but you can use any shape you like (you can even put WEB GL effects on it if you like for extra cool stuff ) as long as it has a well blurred overlapping area and a solid black area of reasonable size.

    in the editor adjust its size to what ever requirements you require.

    then spend the time either duplicating it manually or use a spawning script to cover your layout at the start of the layout.

    There are plenty of easy ways to do this...

    The add a 'FADE'behavior to the sprite...and set it to

    'Active at start NO'

    Leave FADE IN AT ZERO

    Then set your delay and fade OUT times to what ever suits you

    and finally destroy on fadeout yes

    Then make a new event ..

    ->> player (or whatever you want to remove the fog of war)

    is overlapping the Fog of war object

    ->> and another condition ->>'For each' Fog of war object

    action

    ->>Fog or war -fade out Start

    and thats it

    each blob of black should fade out when your player touches it and stay gone...

    The only issue is layout out all of the objects either manually (takes a long time unless you make duplicates 'ctrl drag') or use the script to

    populate your layer via a spawning code that will overlap each Fog or war object

    Adjust the Fog of war spacing and fade timing is really all you have to perfect...

    See this capx for a very simple demo

    :)

    FOG OF WAR DEMO

    Same system can be used for any game...platformers ..8 dir anything!!

  • Try Construct 3

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

    Try Now Construct 3 users don't see these ads
  • martinx09

    Blast it! I reverted my version and re-saved it as r139 so it should work for you now. Give it and let me know if you get stuck.

    Budgie.

  • martinx09

    Blast it! I reverted my version and re-saved it as r139 so it should work for you now. Give it and let me know if you get stuck.

    Budgie.

    Thanks!

    I get it,

    my game generates the world randomly,

    so I'll need to think some way to spawn the black faded squares,

    but I think I can do that. :)

  • Hey, sorry for bumping this.. but anyone got the dropbox links above? or atleast a solution for making the terraria block shading thing?

  • i'm also interested in this

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