views:

283

answers:

6

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). 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...

  • Can Silverlight games be developed straight out of Visual Studio (I have VS 2008), or do I need additional software (and does it cost...)
  • What limitations does Silverlight have in terms of .NET version (can I use .NET 3.5 for example?)
  • What physics engines can I use?
  • Would Flash be a better choice? Are there free development environments for it (that are any good)? (I don't care about learning curve)
  • Is Java still an option?

So I just wanted some feedback on what's the best thing for me to use for a simple 2D web-based game.

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.)? 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)
A: 
  • Silverlight MAY need additional tooling for Visual Studio, but this is a free download. Basically 2008 was made before silverlight, so you need to download the tooling for it.

  • Silverlight runs on a limited version - read the documentation.

  • 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.

  • Java - no sorry, why. I mean, theoretically yes, but if you are a .NET person, you have more knowledge there, siverlight is XAML (WPF similar experience, always nice). Why should you giv all that up for using Java?

  • Flash - DAMN, NO ;) Seriously ;) You dont want to deal with that unless you have to.

  • 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.

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. I would do it.

TomTom
I mentioned Java as I don't want to rule anything out, and I developed a game in it years ago (when it was the hot new thing), just wanted to be sure its not a viable option any more
David_001
care to give any arguments for your statements or should everyone just believe you blindly? for example, you seem to be a real flash expert, so I assume you can give plenty of good reasons why not to use flash and I am eager to hear them. also, your last statement is a little void, since it is in no relation with real world conditions: flash player installer is about 25% in size and that probably doesn't even matter, because it has about 100% penetration among the target audience.
back2dos
Read the post. The author claims daily experience with .NET / C#. Flash is a totally different kind of beast. in a later comment he claims javaa experience some years back. Flash is a totally different beast. Get it? Common sense - use what you know, plus what is good for your mid term resume. Silverlgiht will give him a lot more frine benefits than flash. Plus, the idiocies of actionscript are legendary ;) seriously ;) Who cares about 25% size, btw. - silverlight is already below the mark for being large, so 25% of that is - not a lot of gain.
TomTom
Well, I did read the post. And that leads me to wonder which part of "I don't care about learning curve" you didn't get. You don't provide any good reasons for using silverlight, other than he should stick with .NET since he knows it. This is not an opinion-exchange site. Provide facts. Arguments like "Silverlight? You MUST be kidding me ;) Everybody knows the quirks of .NET!" are hollow. Your opinion and that of your imaginary anonymous sources is irrelevant, unless backed by evidence or at least reference.
back2dos
You accuse me of empty posts? Gosh - where did you learn writing? Back2dos and "everybody knows" - great populism. get into politics ;)
TomTom
You're getting better at this. 3 more commments, and I'll get you to write just "blahblahblah". I don't see how it is relevant to the question, where I learnt writing or how you like it or which career paths you see fit for me. I appreciate your feedback. Still I asked for valid points. I am sorry if that hurts your feelings, but I really don't think it is your place to freely decide what is right or wrong or to set up "marks for being large" or to postulate other unbacked, yet absolute ivory-tower statements. P.S.: "everybody knows" is only the equivalent of "are/is legendary".
back2dos
+2  A: 

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. You can balance what extra work that might cause you against developing for Flash or Silverlight and having a very limited mobile audience. You can check out processing.js as well.

jarrett
+6  A: 

I'm also interested in web-based 2-d games. I personally favor silverlight because:

  1. I'm already familiar with c#/.net.
  2. It has a lot of capabilities, even if it's not as many as full-blown WPF. I hear that LINQ alone is awesome for games. Local storage may also be a plus. There is a rich selection of controls you can use for the gui portions of your games. Honestly, WPF loses to silverlight in terms of interesting controls.
  3. It's totally free. You need to download the silverlight toolkit for VS, but that's no issue.

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. 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).

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. It's a painless install.

In terms of physics engines, FarseerPhysics that TomTom mentioned is most popular.

There is one other thing that I thought was really cool and compelling: http://www.codeplex.com/silversprite. From the website:

Run XNA games without code changes in Silverlight 3. SpriteBatch based graphics only, no 3D. Since the game compiles into straight Silverlight code, it will run anywhere that Silverlight can. [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. However, I don't have any experience in that, so I can't comment further.

Edit in response to the OP's edit:

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. 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

Benny Jobigan
+2  A: 

If you want to go the HTML + javascript way, you can take a look at processing.js. It's a Javascript port (by John Resig) of the Processing language.

Pros:

  • Totally free.
  • Easy syntax.
  • Portability. No plugins.

Cons:

  • Still under development, some Processing functions (like the 3D functions) aren't ported yet

Also, check out John Resig's tower defense game in Processing.js.

HED
With http://luckybite.com/iprocessing/ it would even be portable to iPhones.
netzwerg
+1  A: 

IMHO Java is still an option, in particular JavaFX (http://www.javafxgame.com might be a good starting point).

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).

netzwerg
+1  A: 

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).

One cool feature of Silverlight is its ability to utilize the GPU. This should provide a nice performance boost. I don't know if Flash offers this.

The Silverlight runtime is very small (under 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). With SL4 you also gain webcam support, if that's important to your games.

David Makogon
Great points about the strengths of silverlight.
Benny Jobigan