This site requires JavaScript, please enable it in your browser!
Greenfoot back

Comments for Dynamic Lighting

Return to Dynamic Lighting

A new version of this scenario was uploaded on Mon May 27 13:36:28 UTC 2013 - Fixed a bug where blocks would have the same image of being in the light even after they were out of the light range. (Not visible in this scenario, but when the spread was increased it was visible)
Game/maniacGame/maniac

2013/5/27

the images seem to flicker
JetLennitJetLennit

2013/5/27

I thought that was purposeful
A new version of this scenario was uploaded on Mon May 27 14:12:46 UTC 2013 Fixed a bug. Made scenario start by itself.
Yes, the images flicker because that's how I set the torch to work, I wanted it to be more realistic. I'm going to update it in a few minutes where you can have a solid image, and can change the intensity and other features.
Game/maniacGame/maniac

2013/5/27

shouldn't the flickering be more delayed then and be more random
I just wanted to create a quick example of the LightActor class to show what it could do. I wasn't thinking when I made it that that people might want to see just a normal LightActor without flickering, or a more realistic torch, with better flickering.
A new version of this scenario was uploaded on Mon May 27 15:07:46 UTC 2013 - Added way to make your own lighting. Press 1 to go back to the default torch flicker. Press 2 and "w" or "s" to increase/decrease the light range. Press 3 and "w" or "s" to increase/decrease the spread. Press 4 and "w" or "s" to increase/decrease the Intensity. Press 5 and "w" or "s" to increase/decrease the background intensity. - Handy counters in the top left tell you the current stats about the light
Note: After changing the background intensity, you need to move the range of the light to include or un-include a new block, then the affect will take place.
A new version of this scenario was uploaded on Mon May 27 15:38:00 UTC 2013 Updated setBackgroundIntensity() to update all the objects outside the range.
A new version of this scenario was uploaded on Sun Jun 09 23:14:55 UTC 2013 Increased performance when working with big, scrolling worlds, or other kinds of unbounded worlds.
A new version of this scenario was uploaded on Sun Jun 09 23:20:19 UTC 2013 Fixed Background class to automatically move itself back to the center if it was moved while paused or some other way.