Silverlight 2.5D RPG Game skills and special effects: (4) weather system

Source: Internet
Author: User

Like dynamic light and shade, the weather system is2.5D RPGOne of the indispensable elements of a game. From a visual perspective, the weather system makes the game scenario have a clear hierarchy and a more three-dimensional sense. from a user perspective, the weather system gives the game a more realistic experience. Imagine that the weather system is moving with the wind, from a functional perspective, different climate conditions have different effects on roles and magic effects, this greatly improves the game's interest.

particle system is essential to simulate relatively real weather effects, rain, snow, lightning, and clouds in the weather can all be seen as a collection of large particles. Therefore, we first create a particle class named particle , create a new weather object weather , in this section, I wrote common weather 6 the weather conditions are as follows: rain, wind, snow, lightning, clouds, and weather. The implementation of each type of weather is similar, with special emphasis on randomness and simulation. The focus is on grasping the moving track of particles and destruction processing. In addition, the location of the weather layer should be determined at the beginning of the game design. If you only want to make some simple weather effects, such as rain and snow that do not move with the scene, you only need to place weather In the game window. If you want to make a global model, such as cloud walk, thunder and lightning, weather must be placed in the scenario space. Of course, all weather particles are in the scene space and the effect will be the most authentic, but the performance overhead is too large. After all, you need to fill the whole map size with these particles layout, not just the screen width and height.

Therefore, we have to clearly divide the layers of the scenes and their relationships to make it easier to perform special scene effects rendering. My ideas are as follows:

On the weather layerHLSLThe effects of day-and-night alternation and dream-back finally make the entire weather status system extremely authentic and rich.Of course, currentlySilverlight 4Not availableHLSLEffectGPUHardware acceleration is not far away. After allMoonlightThis feature has been implemented in the last few months. All Weather in this section includes two modes: simple/Simulation: in the simulation mode, weather particles will be more modified and processed to stay close to the real situation, such as rotation, scaling, twisting, and blinking. Of course, the performance overhead will also be much larger. However, when you feel the evenly distributed and well-known rain, the fallen leaves are scattered and flushed with the wind, and the stars are scattered to the snow of the dust; you may think this is all worth it when it's time to hide and wander around, or when it's a shocking lightning strike:


 

 

 

 

 

 

In addition, for a rich range of weather systems, if they can match the corresponding game attributes, the effect will be better. Everyone can open their minds. For example, they can't use fire magic when it's raining; ice magic can be added when it's snowing; moving speed slows down when the wind is blowing; cloud weather can affect players' sight; thunder and lightning randomly generate damage. A good design is often to grasp the details that are easy to ignore. Once discovered by players and explore new gameplay, the fun and playability of the game will be self-evident.

Finally, if you want to continue exploring the perfect rendering of weather system scenarios, make water ripple for each rain on the ground like "tianyao"; create a stack of mountains for each snow grain on the ground; let all objects dance in the air. That's right. The design idea is in your hands. Don't be restrained,Silverlight 2.5D RPGFrom now on, you will be the master!

To download the source code of this Section, go to the directory.

Online Demo address:Http://cangod.com

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.