简体   繁体   English

为Web和Windows Phone 7构建Silverlight游戏

[英]Building Silverlight Games for Web and Windows Phone 7

I want to build a game for windows phone 7 using Silverlight (it's not that complicated to require XNA). 我想使用Silverlight为Windows Phone 7构建游戏(需要XNA并不复杂)。 Can I deploy the application as both Silverlight 4 web site and Silverlight WP7 game? 我可以将应用程序同时部署为Silverlight 4网站和Silverlight WP7游戏吗? Is that a large effort? 那是很大的努力吗?

Thanks. 谢谢。

in theory it could be possible but I think the SL for windows phone and SL web are not 100% the same, in Windows Phone SL doesn't run in a browser at all. 从理论上讲这是可能的,但我认为Windows Phone的SL和SL Web并非100%相同,因为Windows Phone SL根本不在浏览器中运行。

If you engineer your application properly and put all logic to some business logic libraries, eventually you will have to support two different UIs one for web and one for Windows Phone 7. 如果您对应用程序进行适当的工程设计并将所有逻辑放入某些业务逻辑库中,那么最终您将不得不支持两种不同的UI,一种用于Web,一种用于Windows Phone 7。

Both SL implementations use XAML but I don't think it will be fully portable out of the box. 两种SL实现都使用XAML,但我认为它不是可以完全随身携带的。

Yes Theorically you can develop common application for both platforms even there are some third party common libraries for both platforms Like Facebook v5 API. 是是从理论上讲,您可以为两个平台开发通用应用程序,即使这两个平台都有一些第三方通用库,例如​​Facebook v5 API。

You should only make few tweaks/changes in your applications so that they can run well on Windows Phone and Silverlight On Browser. 您仅应在应用程序中进行一些调整/更改,以便它们可以在Windows Phone和Silverlight On Browser上良好运行。

You can have the example of those applications from create.msdn.com . 您可以从create.msdn.com获得这些应用程序的示例

From here you can see variety of sample applications having some common logic and some layer of platform specific logic in various example. 从这里您可以看到各种示例应用程序,它们在各种示例中具有一些通用逻辑和特定于平台的逻辑层。

Windows Phone provides some additional APIs to silverlight. Windows Phone为Silverlight提供了一些其他API。

I am already creatinga common universal app for both platforms . 我已经在两个平台上创建了一个通用的通用应用程序。 This simply required making few changes in UI part of Coding in you applications.Remaining parts can be reused. 只需在应用程序的编码部分中对UI部分进行少量更改即可使用,其余部分可以重复使用。

I hope this helps upto some extent 我希望这可以在一定程度上有所帮助

As I'm sure you've guessed, the answer is IT DEPENDS ! 就像您确定的那样,答案是IT DEPENDS

From a technical standpoint there isn't a lot that you can do in WP7 that you can't do in SL4. 从技术角度来看,在WP7中您无法做很多事情,而在SL4中则无法做很多事情。 These are mostly platform (phone) specific things any you wouldn't be trying to do them in SL anyway. 这些都是特定于平台(电话)的事情,无论如何,您都不会尝试在SL中进行操作。

Here are some areas where you may have possible issues though: 不过,在某些地方您可能会遇到问题:

  • Integrating with backend systems (if you centrally record high score tables etc.) - Likely only an issue if not doing this with straight HTTP(s) requests or you wanted to intgrate multiple concurrent players on different screens. 与后端系统集成(如果您集中记录高分表等)-如果不对直接HTTP请求执行此操作,或者您想在不同屏幕上集成多个并发播放器,则可能仅是一个问题。
  • Your game may require a different UI for the different size/ratio/dimension screens. 您的游戏可能需要不同的UI,才能使用不同的尺寸/比率/尺寸屏幕。
  • Your game may require different input mechanisms for the different platforms 您的游戏可能需要针对不同平台的不同输入机制

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM