Moving Sunbeams in Corona SDK - Tutorial

There’s a new tutorial on http://GameDevNation.com that shows how to create a moving sunbeam type of effect in your Corona SDK projects:

http://gamedevnation.com/game-development/moving-sunbeams-in-corona-sdk/

Even if you don’t need sunbeams the technique can be used for many different type of effects.

What’s especially cool is that it only takes about 20 lines of code.

Enjoy!

Jay
[import]uid: 9440 topic_id: 10118 reply_id: 310118[/import]

This could not be better timed. Thanks for posting it! [import]uid: 5833 topic_id: 10118 reply_id: 36942[/import]

You’re welcome!

I have the effect in my game now and I set the alpha of the sunbeam down to .1 and it really looks good. :slight_smile: Vague, shifting… enough to give the game more atmosphere, but not too much to cause distraction (I don’t think).

Jay
[import]uid: 9440 topic_id: 10118 reply_id: 36944[/import]

Exactly the effect that I am after, hopefully will have some images of the game soon now that I have an artist on board :slight_smile: [import]uid: 5833 topic_id: 10118 reply_id: 36948[/import]

Without seeing the tutorial I’m guessing this is using the new add blending in Corona. If not it probably should be. [import]uid: 12108 topic_id: 10118 reply_id: 37006[/import]

No, it’s not using the new additive blending for one reason:

  1. I almost never do anything with daily builds. I work on the latest release version for all my playing and all my development.

So in my current game I wouldn’t have been able to add this effect if I waited for the next release of Corona SDK.

When add blending comes out it may be a better way to do an effect like this, or it may not. But this way is so easy you can do it now in just a few lines of code – plus, the technique might bring to mind ideas that *wouldn’t* be possible with additive blends.

You know, as much as I want to be just a game developer, in my heart I’m a programmer. So doing stuff like this is just cool. :slight_smile:

Jay [import]uid: 9440 topic_id: 10118 reply_id: 37024[/import]