Silverlight. xNa (C #) cross-platform 3D Game R & D Note: (8) 2D cross-platform migration to Windows Phone

Source: Internet
Author: User

Silverlight 5Integrated with xNa, Windows Phone 7.1 also has the SL. xNa model. moonlight, a mono-based open-source product, can be deployed on multiple platforms. It can be seen that Silverlight is approaching the ultimate goal of cross-platform deployment.

In order to move towards a great dream, we may wish to start in-depth exploration from the two-way migration between Silverlight and Windows Phone 2D.

In the first five sections of this series, I have explained a Silverlight browser-based SLG game demo. It is no good to use this game as a seamless migration case to the Windows Phone platform, just a few simple steps:

1According to section 6To create a Windows Phone game project in SL. xNa mode.

2Open Section 5OfSLG demo game source code, Set all the classes andCodeCopy to the project in step 1.

3Run the game project (download the source code of the WP Version).


Speechless... Isn't that a joke? Is it so simple?

Yes, if you integrate the code of the two projects into one, it will become a perfect cross-platform in the true sense. To further prove the correctness of this point of view, I processed the Silverlight arpg game demo source code in another tutorial using the above method, as shown in the following code:The entire process is only a few minutes (Download WP source code):


Heaven! Earth! Ah?

Don't sigh, this cross-platform porting efficiency is exaggerated. For 2D games with low performance requirements, the cost is very good, especially for Silverlight 2D games that have optimized storyboard and dispatchertimer, its actual effect is particularly outstanding;

However, everything has to be viewed on both sides.

If the game has a large computing volume, a large number of images are displayed on the same screen, a large size, or even a large number of 3D models, this solution is absolutely not available for Windows Phone phones with low configurations. So we have to start with the SL. xNa mode in Silverlight 5 and Windows Phone to find a perfect solution.

It's time to get started. From the next section, I will shoulder the heavy lifting of building a cross-platform 3D game, this article explains how to build a high-performance 3D game framework based on Silverlight and Windows Phone.It will be available soon ~ Stay tuned.

Recommendation reference:NowpaperAnd Williams's game development blog on Windows Phone.

Related Article

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.