简体   繁体   English

哪个平台开发基于网络的游戏?

[英]Which platform to develop web-based game in?

I'm thinking of writing a new web-based game, and wondered if anyone had any suggestions on which platform I should opt for. 我正在考虑编写一个新的基于网络的游戏,并想知道是否有人对我应该选择哪个平台有任何建议。

The game will be 2D sprite based, but will need to maintain a decent fps rate (there'll probably be up to 20 things moving at once). 游戏将基于2D精灵,但需要保持一个不错的fps速率(一次最多可能有20件事情)。 It'll all be controlled via the mouse. 它都将通过鼠标控制。

I use .NET daily, so Silverlight seems a natural choice for me, but I want to make sure as many people can play it as possible... 我每天使用.NET,所以Silverlight对我来说似乎是一个自然的选择,但我想确保尽可能多的人可以玩它...

  • Can Silverlight games be developed straight out of Visual Studio (I have VS 2008), or do I need additional software (and does it cost...) Silverlight游戏可以直接从Visual Studio开发(我有VS 2008),还是需要额外的软件(并且需要花费......)
  • What limitations does Silverlight have in terms of .NET version (can I use .NET 3.5 for example?) Silverlight在.NET版本方面有什么限制(我可以使用.NET 3.5吗?)
  • What physics engines can I use? 我可以使用哪些物理引擎?
  • Would Flash be a better choice? Flash会是更好的选择吗? Are there free development environments for it (that are any good)? 是否有免费的开发环境(有什么好处)? (I don't care about learning curve) (我不在乎学习曲线)
  • Is Java still an option? Java仍然是一种选择吗?

So I just wanted some feedback on what's the best thing for me to use for a simple 2D web-based game. 所以我只是希望得到一些反馈,让我对一个简单的基于2D网页的游戏使用最好的东西。

EDIT: 编辑:

can you provide more information? 你能提供更多信息吗? is this single-player/multi-player? 这个单人/多人? what kind of genre? 什么样的流派? will there be a lot of classical UI involved (lots of forms with lots of button/checkboxes, datagrids etc.)? 是否会涉及很多经典的UI(很多形式有很多按钮/复选框,数据网格等)? will there be a lot of animation and effects? 会有很多动画和特效吗?

  • Single player game, with "attack waves" of enemies 单人游戏,带有“攻击波”的敌人
  • enemies are only thing that move, player just points and clicks 敌人只是移动的东西,玩家只需点击和点击
  • no classic UI, just clicking on buttons (no lists / dropdowns etc) 没有经典的用户界面,只需点击按钮(没有列表/下拉列表等)
  • minimal animation and effects, only graphical requirements are movement of enemies (which will require little animation) 最小的动画和效果,只有图形要求是敌人的移动(这需要很少的动画)

I'm also interested in web-based 2-d games. 我也对基于网络的二维游戏感兴趣。 I personally favor silverlight because: 我个人赞成silverlight,因为:

  1. I'm already familiar with c#/.net. 我已经熟悉c#/ .net了。
  2. It has a lot of capabilities, even if it's not as many as full-blown WPF. 它具有很多功能,即使它不像完整的WPF那么多。 I hear that LINQ alone is awesome for games. 我听说LINQ本身对游戏来说太棒了。 Local storage may also be a plus. 本地存储也可能是一个加号。 There is a rich selection of controls you can use for the gui portions of your games. 您可以使用丰富的控件选择游戏的gui部分。 Honestly, WPF loses to silverlight in terms of interesting controls. 老实说,WPF在有趣的控制方面失去了银色光芒。
  3. It's totally free. 它是完全免费的。 You need to download the silverlight toolkit for VS, but that's no issue. 您需要为VS下载silverlight工具包,但这不是问题。

One cool thing is that you can do full-screen displays. 一件很酷的事情是你可以做全屏显示。 I also found it is fast enough (on my core2 duo laptop) to handle a decent amount of objects. 我还发现它足够快(在我的core2 duo笔记本电脑上)来处理大量的物体。 The fact that silverlight is going to be a big part of winmobile 7 is also a good point (though we'll have to see how that turns out). 事实上,silverlight将成为winmobile 7的重要组成部分也是一个好点(尽管我们必须看看结果如何)。

There are a number of silverlight games out there so you can see the possibilities. 有很多银色游戏,所以你可以看到可能性。

I suppose the main negative is portability and making people install "yet another plugin". 我认为主要的负面影响是可移植性,并让人们安装“又一个插件”。 Flash obviously has the broadest user base, but if your game is decent enough, people probably won't mind installing the plug-in. Flash显然拥有最广泛的用户群,但如果你的游戏足够好,人们可能不会介意安装插件。 It's a painless install. 这是一个无痛的安装。

In terms of physics engines, FarseerPhysics that TomTom mentioned is most popular. 在物理引擎方面 ,TomTom提到的FarseerPhysics最受欢迎。

There is one other thing that I thought was really cool and compelling: http://www.codeplex.com/silversprite . 还有一件我认为非常酷且引人注目的事情: http//www.codeplex.com/silversprite From the website: 来自网站:

Run XNA games without code changes in Silverlight 3. SpriteBatch based graphics only, no 3D. 在Silverlight 3中运行XNA游戏而无需更改代码 。仅基于SpriteBatch的图形,无3D。 Since the game compiles into straight Silverlight code, it will run anywhere that Silverlight can. 由于游戏编译成直接的Silverlight代码,它将运行Silverlight可以运行的任何地方。 [emphasis added] [强调补充]

The XNA-in-Silverlight approach is potentially really good (especially for more complex games that you might want to try profiting from) because that also opens you up to Xbox with minimal porting effort. XNA-in-Silverlight方法可能非常好(特别是对于您可能希望从中获利的更复杂的游戏),因为这也可以让您轻松移植到Xbox。 However, I don't have any experience in that, so I can't comment further. 但是,我没有任何经验,所以我不能进一步评论。

Edit in response to the OP's edit: 编辑以响应OP的编辑:

Since your game sounds even more simple than I had imagined, if you don't mind the learning curve or potential difficulties with doing a pure HTML+CSS+Javascript approach (which may in fact not be so great), I'm going to say maybe that's the best route after all. 由于你的游戏听起来比我想象的更简单,如果你不介意学习曲线或做纯HTML + CSS + Javascript方法的潜在困难(实际上可能不是那么好),我会去说也许这毕竟是最好的路线。 That's because of portability. 那是因为便携性。

That said, I'm lazy and don't care if a few people miss out on my game, so I'd just stick to silverlight. 那就是说,我很懒,也不在乎是否有几个人错过了我的比赛,所以我只是坚持银光。 =P = P

If you want maximum playability do it with all HTML and javascript and don't even use canvas and then the game will work basically everywhere, including mobile. 如果你想要最大的可玩性,可以使用所有HTML和javascript,甚至不使用画布,然后游戏基本上可以在任何地方使用,包括移动。 You can balance what extra work that might cause you against developing for Flash or Silverlight and having a very limited mobile audience. 您可以平衡可能导致您针对Flash或Silverlight开发的额外工作以及移动受众非常有限的工作。 You can check out processing.js as well. 您也可以查看processing.js。

If you want to go the HTML + javascript way, you can take a look at processing.js . 如果你想使用HTML + javascript方式,你可以看看processing.js It's a Javascript port (by John Resig) of the Processing language. 它是Processing语言的Javascript端口(由John Resig提供)。

Pros: 优点:

  • Totally free. 完全免费。
  • Easy syntax. 简单的语法。
  • Portability. 可移植性。 No plugins. 没有插件。

Cons: 缺点:

  • Still under development, some Processing functions (like the 3D functions) aren't ported yet 仍在开发中,一些处理功能(如3D功能)尚未移植

Also, check out John Resig's tower defense game in Processing.js. 另外,在Processing.js中查看John Resig的塔防游戏。

IMHO Java is still an option, in particular JavaFX ( http://www.javafxgame.com might be a good starting point). 恕我直言Java仍然是一个选项,特别是JavaFXhttp://www.javafxgame.com可能是一个很好的起点)。

However, your experience with a language/technology is probably more important than the choice of platform, so you should choose .NET (given that none of the suggested alternatives stands out so far). 但是,您使用语言/技术的经验可能比平台的选择更重要,因此您应该选择.NET(假设到目前为止没有任何建议的替代方案突出)。

As stated by Benny, Silverlight is a great platform if you're already familiar with .NET, and most of the tooling you need is built into Visual Studio (VS2010 has a built-in designer but the current RC version doesn't support the upcoming Silverlight 4). 正如Benny所说,如果你已经熟悉.NET,那么Silverlight是一个很好的平台,你需要的大部分工具都内置在Visual Studio中(VS2010有一个内置的设计器,但是当前的RC版本不支持即将推出的Silverlight 4)。

One cool feature of Silverlight is its ability to utilize the GPU. Silverlight的一个很酷的功能是它能够利用GPU。 This should provide a nice performance boost. 这应该提供良好的性能提升。 I don't know if Flash offers this. 我不知道Flash是否提供此功能。

The Silverlight runtime is very small (under 5MB). Silverlight运行时非常小(低于5MB)。 And you can easily enable out-of-browser support, so that your game may be launched from a desktop shortcut, for instance, without the need for launching the browser (and being online). 您可以轻松启用浏览器外支持,以便您可以从桌面快捷方式启动游戏,例如,无需启动浏览器(并在线)。 Silverlight 4 adds the ability to use elevated privileges (this gives you access to the native network stack instead of the sandboxed browser stack). Silverlight 4增加了使用提升权限的功能(这使您可以访问本机网络堆栈而不是沙盒浏览器堆栈)。 With SL4 you also gain webcam support, if that's important to your games. 使用SL4,如果这对您的游戏很重要,您还可以获得网络摄像头支持。

  • Silverlight MAY need additional tooling for Visual Studio, but this is a free download. Silverlight可能需要Visual Studio的其他工具,但这是免费下载。 Basically 2008 was made before silverlight, so you need to download the tooling for it. 基本上2008年是在silverlight之前制作的,所以你需要为它下载工具。

  • Silverlight runs on a limited version - read the documentation. Silverlight在限定版本上运行 - 阅读文档。

  • I would in geneeral advice to go .NEt 4.0, Silverlight 4.0, Visual Studio 2010 - those are aruond the corner and you wil ldevelop longer han a month anyway. 我会在一般的建议中去。直到4.0,Silverlight 4.0,Visual Studio 2010 - 这些都在角落里,无论如何你会在一个月内开发更长的汉。

  • Java - no sorry, why. Java - 不好意思,为什么。 I mean, theoretically yes, but if you are a .NET person, you have more knowledge there, siverlight is XAML (WPF similar experience, always nice). 我的意思是,理论上是的,但如果你是一个.NET的人,你有更多的知识,siverlight是XAML(WPF类似的经验,总是很好)。 Why should you giv all that up for using Java? 为什么要使用Java来提供所有这些?

  • Flash - DAMN, NO ;) Seriously ;) You dont want to deal with that unless you have to. Flash - DAMN,NO;)严肃地说;)除非必须,否则你不想处理它。

  • Physics engine - no idea. 物理引擎 - 不知道。 Need to check. 需要检查。 Not sure there is a lot for it. 不确定它有很多。 Did you google? 你有谷歌吗? http://www.codeplex.com/FarseerPhysics comes up first. http://www.codeplex.com/FarseerPhysics首先出现。

I think it is a good approach. 我认为这是一个很好的方法。 Silverlight is a small download to start - so, I dont think you loose too many people by it. Silverlight是一个很小的下载开始 - 所以,我不认为你太多人了。 I would do it. 我会做。

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

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