Hello there people,
I'm creating a dungeon crawler using SFML (of course), and basically I want to try and create a simple torch effect that is over the screen which will change in size, and brightness (alpha). At the moment I have a simple image
which is just very dark yellow on the outsides and slowly goes transparent. At the moment my code looks a like this
overlayFaderSizeChange++;
if (overlayFaderSizeChange == 10)
{
sf::Color overlayColor = overlayFader.getColor();
overlayColor.a = rand() % 10 + 245;
overlayFader.setColor(overlayColor);
float randomValue = rand() % 100;
randomValue = randomValue / 5000;
overlayFader.setScale(1 + randomValue, 1 + randomValue);
overlayFaderSizeChange = 0;
}
This as an effect, but it is so shuttle you don't really see the effect. Now I know this is kinda down to personal preference, but does anyone have a better idea on how to achieve this in my 2D world? Advice is also very good