XNA vs Silverlight vs Flash vs C++/Windows/ASM For 2D Game

Started by
8 comments, last by Dae 15 years, 2 months ago
I want to create a simple 2D Game using lots of different sprites. At first, I considered using XNA, but the catches such as deployment issues of managed code is worrying me. Since I'm making a simple 2D game with some network stuff to store user information like high score and saved games and user information, I also considering using Flash. The problem with Flash is that I'm worried about performance. Flash apps also has a 10% chance of crashing my computer and I've never worked with it before so there's a learning curve to it. I'm also considering using Silverlight since I hear it has better performance then Flash. I already have Visual Studio w/ Silverlight Plugin. Flex really isn't an option since I don't have that program. The last option is to go the traditional route of C++/ASM/C and whatever is needed to get a simple 2D shooter game working there. I have no clue how big the learning curve since all the windows programming I've done was done using C# and windows forms. Graphics: The game will be equivalent to Diner Dash but will be a 2D space shooter type game. I'm just doing this for fun but I need a way to share the game easily. What's everyones thoughts on these platforms?
Advertisement

As much as I like XNA, I think I'd go for Flash in your situation. XNA and certainly the C++/ASM route is probably too low-level to get a game up and running quickly, so I'd go for a platform that comes with a 2D editor built in. And though Silverlight may have better performance, Flash has a larger install base and may get your game to a larger audience. I reckon there are also more resources out there to learn Flash, so it may be easier to pick up as well.
Rim van Wersch [ MDXInfo ] [ XNAInfo ] [ YouTube ] - Do yourself a favor and bookmark this excellent free online D3D/shader book!
I've created some Flash games a while ago, first using CS3, but after the demo time ran out I eventually stumbled upon haXe and swfMill. It's more programming oriented and took me some more time to set up a good workflow, but it's pretty good once you get up to speed. It's also pretty easy to port your Flash games to desktop versions by using the NME library and compiling them for the Neko VM (which can then be embedded into the resulting executable).

As far as I've seen, most Flash performance issues come from inefficient usage of standard Flash components (movieclips). I've been avoiding those in my games, I've been blitting images to a BitmapData object instead.
Create-ivity - a game development blog Mouseover for more information.
Quote:Original post by MinorMajor
Flex really isn't an option since I don't have that program.

If you can't afford to buy Adobe's Flex IDE / Eclipse plugin, you can use FlashDevelop for free with the opensource Flex SDK.
I'd recommend Flash for a simple 2D game. Go with the free flex compiler (or haXe) instead of the Flash CS3 program and you'll have an environment that is very similar to traditional game development. Like Captain P said, avoid excessive use of standard flash components in favor of blitting your sprites to the screen manually. Take a look at 8bitRocket for some tutorials on sprites in flash.

Flash wont give you access to fancy pixel shaders like XNA, but you'll be able to distribute your completed game in a browser window. No downloading required. Downloading is a huge turn-off to potential players.

Silverlight is still too new in my opinion.
What kind of networking options does Flash give me (built-in or somewhat simple to implement)? After making the game, I would like to add a multi-player option to it.

How well does flash work in full screen mode (performance wise)? It looks like if I go with flash, I'll be writing it in ActionScript 3.

Thanks Nanyko for that link. That FlashDev is a pretty nice free tool. haXe looks interesting, but what are the downsides of using it?

[Edited by - MinorMajor on January 26, 2009 12:30:40 PM]
If your goal is to make a game capable of online multiplayer, then you might want to consider XNA. Both Flash and Silverlight are very focused on security, and wont allow Peer-to-Peer hosting. Flash only allows client-to-server socket connections. That means that players wont be able to host their own servers for a Flash game. The Flash player will only allow itself to connect to a dedicated server for multiplayer.
How exactly does the Flash player know which IP is the server? Flash supports socket connections of some sort, for instance there are 3rd party tools which let your Flash app connect to any IP address running the server part of the tool.

There are restrictions on trying to access files/URLs in different domains, but I think direct socket connections are different. This link might help. Although it does suggest that the latest versions of Flash9 might be more restrictive after all... you'd have to research properly.
Well, right now, I just need to get started. How much skills can I transfer between XNA and Flash? Let's say I learn to make a game in Flash, how long would it take me to learn XNA (wild guess). What kind of differences can I look forward too?

For the most part, I was planning on hosting the server myself.
- Use Flash.
- Silverlight does not have better performance than Flash.
- Flash is more widespread.
- Flash security requires cross-domain or xmlsocket authorization (easy if you're hosting).
- Use Flash sockets, use Flash bitmapdata, etc.
- If you're trying to learn XNA I guess Silverlight would help seeing as you can use C#. If you're trying to learn programming in general it won't matter. Neither one is more preferable to XNA itself. I'm not much of a fan of XNA, besides it being an updated managed DirectX, I'd ditch the forced framework.
- Flash is simple. It's 100% event-driven. Expect to work around frames. Create your own events, register the onEnterFrame event, and fire your own events (Update/Draw). Pretty simple.

There's actually a ton of 2D shooter tutorials and source code out there. Check Google, check Google Code, and check Newgrounds (those guys are Flash game insane).
010001000110000101100101

This topic is closed to new replies.

Advertisement