C # development Wpf/silverlight animation and games series (Game Course): (a) Let the object move up ①

Source: Internet
Author: User
Tags xmlns silverlight

Preface: Since the Qxgame (WPF GAME ENGINE) game engine has been published, the idea of writing a tutorial has been the subject of intense attention from many friends. So starting today, I will take you step-by-step to learn how to use pure C # to develop Wpf/silverlight game engine, in the process I will try to open source, and the relevant tips to explain and introduce, more complex algorithm principle I will give you an absolutely feasible idea, As for how to deal with these complex algorithms, it is the beholder, and perhaps you write the algorithm better than mine.

Needless to say, no more words, the last sentence from the heart of the words: The author of this series of writing editor spent a lot of painstaking effort, no credit also have bitterness Wow, so please need to reprint friends with prominent font or color marked at the beginning of your article, your strong support is to encourage me to continue to write the momentum.

Introduction: Wpf/silverlight Vector Animation Description I will not say more, about wpf/silverlight and flash comparison on the internet is also a bunch of, here just want to tell the reader objectively below two points:

First, WPF is developing desktop applications, and since Vista, the Windows family of operating systems are a large number of mainstream graphics tools, is about to completely replace WinForm, and Windows 7 will integrate. net3.5+ Framework, what does this mean in today's Windows-series operating systems, which occupy 90% of the same market?

Second, Silverlight based on a mini. NET framework of about 4M, the current version of 2.0,3.0 Beta English version, from the development trend is absolutely to contend with Flash and in the future beyond its possibilities. The advantage of Silverlight is that it can be used in all. NET languages such as c#,vb.net,c++. NET and other development, expansion and can participate in the development of the crowd is much higher than only with as developed flash.

To get to the point, there's already a lot of tutorials on how to create Wpf/silverlight animations on the web, but they're all for animations that use the blend tool, or written directly in XAML code, which often results in many friends mistakenly thinking that wpf/ Silverlight is not a MS Flash? Admittedly, if you're really going to develop the Wpf/silverlight program, as those tutorials say, I personally don't see any point in it. This development out of the things simply can not surpass flash, then why do you have to put so much energy to learn it?

So this series of tutorials will create all the visual objects dynamically in the Pure C # programming language to build a qxgame (WPF GAME ENGINE) game engine, which is what I want to achieve in this series of tutorials.

(Note: The development tools used in this tutorial are for Visual Studio version 2008 SP1)

OK, so I'll start with the first method of dynamically creating animations, which is also the official recommended storyboard animation. This type of animation you can access the relevant information on the network to understand, here is not tired, then we go directly to the topic:

First we create a new WPF project, and then open Window1.xaml into the View Code Editor, which we write here:

<Window x:Class="WpfApplication1.Window1"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" Title="WPFGame">
<Canvas x:Name="Carrier" Width="800" Height="600" Background="Silver"
MouseLeftButtonDown="Carrier_MouseLeftButtonDown" />
</Window>

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.