Light Sources

raze_struckraze_struck Member, PRO Posts: 141

Hello all,

I'm trying to find a way to make several torches in a scene where you can tap on one of the torches and a small light source will appear, illuminating a small area around that torch. The entire screen is dark, with the exception of the torches being visible and light when touched.

Thank you
Raz

Comments

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • UtopianGamesUtopianGames Member Posts: 5,692
    edited March 2014

    You could have a self.boolean in the torches and when touch is pressed spawn light source at torch XY position.

    You can even choose to spawn above or below the actor or at the top or bottom of the scene.

    Darren.

  • TheGabfatherTheGabfather Member Posts: 633

    First, check out this lighting tutorial video tutorial from tshirtbooth. The video should already give you a couple hints at how to achieve what you want.

    For your game, you'll probably make use of multiple Actors that act as unlit/lit areas.

    There will be multiple ways to go about this.
    The first to come to mind would be to make use of two images, one similar to the one used in the video above (lit), and another that is also similar to the one used in the video but a lot darker (unlit) (you probably wouldn't want it pitch black).
    Or, you can play with opacity instead. It's up to you :)

  • raze_struckraze_struck Member, PRO Posts: 141

    Hey, ill definitely check out the link, its not the logic that's troubling me its the graphical aspect behind, thanks Darren, but i'm more concerned about the layering of the images.

  • raze_struckraze_struck Member, PRO Posts: 141

    How do I open the windows based file ? Its says its 1 kb?

  • TheGabfatherTheGabfather Member Posts: 633

    @razmigma89@gmail.com said:
    ...its not the logic that's troubling me its the graphical aspect behind...

    It's important to plan ahead before executing anything art-related, so I can agree with your concern.

    Will your lit areas be overlapping? It might be easier to pull this off if they won't.
    I really want to create mock images for you, but I'm using my work laptop and I don't have editing software at my disposal right now.

  • raze_struckraze_struck Member, PRO Posts: 141

    @TheGabfather said:
    I really want to create mock images for you, but I'm using my work laptop and I don't have editing software at my disposal right now.

    Thanks Gabfather, well essentially its a side scroller, so I just need to be able to provide light on a platformer perspective. So far example, when you tap the torch a light source will show up and you can see where to jump to, and then move on. That's the kind of idea.

  • raze_struckraze_struck Member, PRO Posts: 141

    When I download the file, its showing up as 1kb, how do i open the windows file in gamesalad, do I have to rename something?

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949

    Are you using Windows? You posted to the "Working with GS (Mac)" subforum so I just assumed you were using a Mac. If you Google convert windows gamesalad mac you'll see links to videos that explain how to convert from Mac to Windows.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • TheGabfatherTheGabfather Member Posts: 633
    edited March 2014

    Borrowed someone else's computer :) here you go, something like this.
    4 Actors in this rough example, but they don't overlap which makes things easier (doesn't always look the best though).

    edit: I realise you'll need to find a way to make the rest of your scene unlit. Should be easy enough to figure out from this point on.

  • raze_struckraze_struck Member, PRO Posts: 141

    @tatiang said:
    Are you using Windows? You posted to the "Working with GS (Mac)" subforum so I just assumed you were using a Mac. If you Google convert windows gamesalad mac you'll see links to videos that explain how to convert from Mac to Windows.

    Sorry, I typically use a mac, but im @ work, will do thanks

  • raze_struckraze_struck Member, PRO Posts: 141

    @TheGabfather said:
    Borrowed someone else's computer :) here you go, something like this.
    4 Actors in this rough example, but they don't overlap which makes things easier (doesn't always look the best though).

    edit: I realise you'll need to find a way to make the rest of your scene unlit. Should be easy enough to figure out from this point on.

    ahhhh, I see what you mean now, thanks !

  • willkeslingwillkesling Member, PRO Posts: 123

    Are you moving the torch around to see areas or just tapping on the torch to uncover areas?

  • raze_struckraze_struck Member, PRO Posts: 141

    @willkesling said:
    Are you moving the torch around to see areas or just tapping on the torch to uncover areas?

    Just tapping to uncover areas

  • ArmellineArmelline Member, PRO Posts: 5,369

    How many torches would be displayed at once?

Sign In or Register to comment.