With the assessment in the previous section, I am sure you have been impressed by the use of GPU hardware acceleration in Silverlight to improve performance. Silverlight game development, we need to use a variety of forms of animation and related graphics processing skills, at this time if the full and reasonable use of GPU hardware acceleration function, with the most cost-effective function implementation, which will create a monarch-class high-performance Ria Web game to lay a solid foundation.
The protagonist in the game is the wizard, appears most frequently the same is the wizard; So, I modified and made a new demo on the basis of the previous section. This demo is a collection of the current mainstream Silverlight Game Wizard configuration environment, the following is the specific details of my test:
Machine configuration:
or the test machine in the previous section, for the different configurations of the elves in the game, the impact of the hardware acceleration of the GPU on the overall performance is evaluated as follows:
1 Effects of different moving modes on performance
GPU Acceleration |
How to move |
Action mode |
Toggle Interval |
Moving speed |
Number of Elves |
Sprite size |
Fps |
CPU consumption (%) |
Memory Footprint (M) |
Whether |
Storyboard |
Rotate pictures |
150 |
4 |
200 |
150*150 |
4.48 |
84 |
65 |
Is |
Storyboard |
Rotate pictures |
150 |
4 |
200 |
150*150 |
46.82 |
55 |
86 |
Whether |
DispatcherTimer |
Rotate pictures |
150 |
4 |
200 |
150*150 |
4.08 |
88 |
65 |
Is |
DispatcherTimer |
Rotate pictures |
150 |
4 |
200 |
150*150 |
42.31 |
55 |
91 |
Although the storyboard movement from the data is almost the same as the performance of the DispatcherTimer movement, we will find that the storyboard is smoother and smoother than the dispatchertimer in the actual operation. Especially in GPU hardware acceleration.
2 effect of different frame-cutting modes on performance
The mainstream animation implementation in Silverlight is image rotation and rectangular interception, they need a different layout structure of the material, similar to the following (such as the two methods of material and implementation of logical Code of interest to friends can download this section of the source of their own research):