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...
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?
I'm also interested in web-based 2-d games. I personally favor silverlight because:
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
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.
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:
Cons:
Also, check out John Resig's tower defense game in Processing.js.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With