Gamekit: Environment Features
These four main features were the ones I was most excited to get to work on, due to playing Breath of the Wild and highly liking how it handled it's weather and temperature system. The four main features are a weather system, a firespreading system, a temperature system and a day/night system.
The day/night system is probably the simplest of the four systems implemented and is just a smooth linear diagonal gradient that changes color and tints the screen as time passes. A full day cycle is 720 seconds or 12 minutes, with each segment being 180 seconds or three minutes. There are four segments, which are dawn, day, dusk and night. There is also a speed-modifier that increases the time passing at 2:1, 3:1, 4:1 and so forth ratios as in-game time:real-time second. The time is stored internally in a variable instead of using wallclocktime, just so commands and items can affect the system.
The second system is a firespreading system. Various sources can cause fires, such as lamps or lightning strikes. Fires have a chance of spreading every tick or so and will pick any of the eight directions surrounding them and may destroy flammable objects in the process. Objects have different flammability values assigned to them, so a bush will burn down more easily than a sign. Fires eventually decay and vanish if around long enough but also have a highly increased decay chance from rain based weather.
The third system is a weather system and six types of weather are currently implemented: rain, storms, snow, blizzards, fog and sandstorms. The gamekit pulls weather-data from a layout's associated XML file, which determines what kind of weather it has and the weather-chance. Every X seconds, the gamekit will roll a random number from 0-100 and if the specified XML-chance is met, it will pick one of the map's weather types to have occur. You can have more than one of the same weather type, to allow for weighted chances (i.e, snow more common than rain, fog rarest of all, so something like "snow|snow|snow|snow|rain|rain|fog")
Some weather types have special effects or occurrences with them, such as that storms have random flashes of light and may randomly cause lightning strikes rarely. Lightning strikes interact with the aforementioned firespreading system and will spawn fires that may spread if not for rain increasing a fire's decay chance.
The fourth and final system is the temperature system, which can be set to either fahrenheit or celsius via a config XML file. Various sources increase or decrease the player's temperature and each map XML file has limits set for the max/min temperature, what temperatures the player freezes or overheats at, etc. Hitting a high enough temperature or a low enough temperature will respectively cause the player to overheat or freeze. The player will incur damage over time until they remedy their temperature issue, whether with a heat source with freezing or finding a way to cool off with overheating.
Files
Get A-RPG Gamekit
A-RPG Gamekit
A Construct 2 project and is a SDK for oldschool 2D A-RPG/Zelda-like style games.
Status | In development |
Category | Tool |
Author | LaDestitute |
Tags | 2D, Action RPG, a-link-to-the-past, Construct 2, gamekit, the-legend-of-zelda, zelda, zelda-like |
More posts
- Code Optimization: Debug Mode, Command Console and Edit ModeOct 12, 2018
- Code Optimization: CombatSep 13, 2018
- Gamekit: Entity and Item MetadataMar 20, 2018
- Code Optimization: Dungeon Mechanics & Quality AssuranceJan 13, 2018
- Code Optimization: Enemy AIAug 18, 2017
- Randomizer Features and Roguelike Influences (5/26/2017)May 26, 2017
Leave a comment
Log in with itch.io to leave a comment.