Impact Atmospheric System Plugin
A plugin for the Impact game engine that simulates an atmospheric weather system, day/night cycless, and seasonal cycles based on configurable date, time, and geographical coordinates.
- Configurable time speed multiplier to cycle through day and night faster or slower
- Configurable update rate to update plugin more or less frequently
- Configurable initial plugin date and time
- Configurable geographical coordinates
- Configurable brightness/darkness of nights (for those who like brighter/darker nights)
- Day/Night Cycle System
- Variable length of day and night based on day of year and geographical coordinates
- Dynamic ambient brightness during sunrise and sunset
- Seasonal Cycle System
- Variable solstice (Summer/Estival, Winter/Hibernal) and equinox (Spring/Vernal, Autumn/Autumnal) based on year
- Current season detection based on current date and time relative to year
- Weather System
- Weather conditions (clear, rain, snow, lightning, fog)
- Configurable maximum particles (snow particles, raindrops)
- Configurable frequency of lightning
Visit http://chessmasterhong.bitbucket.org/projects/impact-atmosphere for a working live demonstration of the plugin. The version of the demo at this link may not reflect the latest changes of the plugin.
If you would rather set it up yourself, located in the
demo directory is a pre-configured setup of the plugin. I also use this as my development testing grounds, so it should be up-to-date. All you need is the Impact game engine source code (sorry, batteries not included).
Installation and Setup
Download and place the file
.requires( ... )section of your main game.
initmethod of your main game, add one (and only one) of the following:
a. To use all default settings:
// Start from current date and time, updating every 60 seconds, running at 1x real time this.atmosphere = new ig.Atmosphere();
b. To specify a custom date and time, but leave the other arguments to default:
// Start from April 14, 2014 5:23:37 PM, updating every 60 seconds, running at 1x real time this.atmosphere = new ig.Atmosphere(new Date(2014, 3, 14, 17, 23, 37));
c. To specify a custom date and time and update rate, but leave the other arguments to default:
// Start from April 14, 2014 5:23:37 PM, updating every 15 seconds, running at 1x real time this.atmosphere = new ig.Atmosphere(new Date(2014, 3, 14, 17, 23, 37), 15);
d. To specify a custom date and time, update rate, and timescale:
// Start from April 14, 2014 5:23:37 PM, updating every 15 seconds, running at 6x real time this.atmosphere = new ig.Atmosphere(new Date(2014, 3, 14, 17, 23, 37), 15, 6);
updatemethod of your main game, add the following:
drawmethod of your main game, add the following after
That's it! Start up your game and enjoy!
If you are still unclear about the usage, see the
main.js file in the
demo/lib/game/ directory for additional details.
Bugs and Known Issues
See the Issue Tracker for a list of current bugs and issues.
See the Issue Tracker for a potential list of stuff to do.
- 2D Lost Garden Zelda Style Tiles by Daniel Cook, Jetrel, Saphy, Zabin, and Bertram
- Snow Emitter by ansimuz (for the base code that this plugin's snow and rain generator is based on)
I would like to emphasize that although this plugin utilizes computations from various creditable sources, its implementation is rather naive and has not been thoroughly tested for accuracy or validity. In addition, it may potentially contain computational inconsistencies or errors. The original purpose and intent was to roughly simulate a realistic atmospheric system for a potential game. As a result, I strongly discourage the use of this plugin for sensitive projects or research. Instead, please consult more creditable, well-tested sources for such purposes.
The plugin's source code is released under the MIT Licence.
All artworks are available under their own separate licences. For their licencing details, visit the respective link under the Additional Resources section of the README.