Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

In short, for simple games:

  1. Is Flash still a good option for browser-based PC clients? It still has 90%+ penetration.
  2. What is a good alternative for mobile devices? Is HTML5 + JavaScript the choice for mobile? Or does one have to learn a new native language for each target platform? (Android, Apple, Windows Phone)...

If you desire further background: There are more blogs about the official demise of mobile Flash than I can count, along with endless useless and vitriolic comments. I'm actually trying to do something practical: build simple games that can be served accross multiple platforms. Several months ago I plopped down $1100 for CS5.5 Web and am wading into Flash. Bummer. My question to people who actually develop simple games and apps: What platform should I use instead? Is Flash still a sensible platform for web-served PC users?

For example, let's say I build a simple arcade game that I would like to serve as an app to mobile users and as a browser-based game to PC users. Should I still invest the time and effort to learn and develop in Flash for the PC users, while building a parallel code set in some other language for mobile users? My games are simple enough that it would be annoying but not inconceivable to maintain parallel code sets.

share|improve this question

closed as off-topic by gnat, GlenH7, Kilian Foth, Tulains Córdova, Dan Pichelman Jan 27 '15 at 13:31

This question appears to be off-topic. The users who voted to close gave this specific reason:

  • "Questions about what language, technology, or project one should take up next are off topic on Programmers, as they can only attract subjective opinions for answers. There are too many individual factors behind the question to create answers that will have lasting value. You may be able to get help in The Whiteboard, our chat room." – gnat, GlenH7, Kilian Foth, Dan Pichelman
If this question can be reworded to fit the rules in the help center, please edit the question.

up vote 4 down vote accepted

HTML5 and Javascript all the way!

There are several 'game engines' using JS that you can download and play with. (Crafty, Impact, Melon JS, Akihabara) to name a few. Melon JS supports the 'Tiled tmx" format for platformers and top downs.

There is ongoing debate as to the 'web' technologies or native code question for mobile game / app dev and I think the concensus (and rule of thumb) is that if you need the hardware features of the physical device look towards naitive code. But if you don't need access to the hardware specific parts of the device, why not use a portible and web based solution? You will get more platforms with less effort.

As for Flash (and Silverlight) going the way of the Dodo bird, its not going be be an overnight abduction where you wake up tomorrow and they are just "gone"... There will be Flash games and site components around well after the technologies have been replaced. So there is no harm in learning flash, and will do nothing but help you as a developer, but for looking to the future of mobile games the answer is HTML5 and JS.

For an idea on what Adobe is doing, check out the Preview of Edge.

Hope that Helps.

share|improve this answer

The new element in HTML5, as well as WebGL makes javascript an excellent choice for making cross-platform games that you can play in browsers. These will work on most systems, and may eventually overcome flash as the choice for developers who create content that would need it.

Flash still has the advantage because of the toolsets that they supply, but eventually I can imagine they will develop a toolset specifically for javascript and . Until then, making games will be much easier using flash, unless you are already equipped to develop in pure javascript.

share|improve this answer
But as HTML5 features stand, there is still no conformity nor cross browser compatibility, regarding features supported and the syntax used. – Oded Nov 13 '11 at 20:47
Most browsers support HTML5 <canvas>, especially the major ones. The syntax is javascript, which browsers support as well. So simple operations are certainly cross-browser. I can't remember exactly what operations need to be called with "moz" or "chrome" with it, but I do remember there are a couple. This will change though as the features become more popular, the companies will decide on a standardized way of offering them. Or there are also libraries that will let you call one function, and let it decide which one to call based on your browser – bitrayne Nov 15 '11 at 14:01

You may want to look at using C# - on the windows mobile platforms (Windows Phone and Windows 8) it is supported.

For iOs and Android (as well as Mac and *nix and some other platforms), look at mono. A mobile platform that is based on the mono code is provided (pay for) by Xamarin.

With a good set of wrappers and preprocessor directives you should be able to go with a single codebase (or close to).

share|improve this answer
+1 for tip on iOs-supported mono. I really like programming in C#, so being able to apply my .NET skills to mobile apps would be great. – user37735 Nov 15 '11 at 0:29

I think you can go with Flash. Since you are already studying it, there is no new direction to follow. Just keep on learning. Flash will be here for some time, so don't worry.

Besides other than PC, Adobe Flash Player exists for a variety of mobile operating systems, including Android (since version 2.2), Pocket PC/Windows CE, QNX (e.g. on BlackBerry PlayBook), Symbian, Palm OS, and webOS (since version 2.0)

share|improve this answer

I assume you're bothered due to recent news of Adobe ceasing further development of the Flash Player plugin for mobile browsers.

So to make this clear: Adobe dropped the mobile browser plugin, which arguably is a good decision, because on a device where power is scarce, running an app on a VM as a plugin in a browser is a poor distribution method, especially because the typical channel are the respective app stores.
Adobe did not drop any of their tools (because that is what they are making money with). You can still use Flash to create mobile apps, be that with AIR or whatever technology used to actually run your app on the target device. Talk is that Flash will also export to HTML5/JS. Who knows.

What this really means is, that the tools you know, the APIs you learn, the workflows you find for yourself, are largely unaffected by this decision. While the future of the FlashPlayer browser plugin is uncertain beyond mobile platforms, Flash, Flash Builder, Flex and Flash Catalyst do not depend on it and will remain as good an option as they were before (at least in the foreseeable future).

Alternatives I could think of off the top of my head would be playN (Java) and NME (haXe - which is what I'd recommend using), but as I said there is no actual need for switching. If you feel you are going to be happy with the Adobe tools (which an investment of $1100 suggests), then just stick with them. If you're more of a graphical type, then Flash is arguably one of the best things you can get.

share|improve this answer

An interesting Java-based approach that is used by one of the games I have on my phone is explained here - basically the API starts with Java and as well as standard JAR files, outputs the same content in numerous other formats including Flex, HTML5 and XCode, ready for cross platform deployment.

An approach like that will be limited to what is common to all platforms, but for the basic stuff it is pretty neat.

share|improve this answer

Use HTML5 and javascript, with some components in flash or native code as needed. Mostly that comes down to performance optimization - get the algorithm working in pure javascript, then replace parts of it with calls to flash or a phonegap plugin if you need to.

Generally you won't need to do too much of this - the only area javascript really seems to have problems is dealing with large amounts of binary data. You do need to be careful with how you handle graphics, particularly around knowing which parts will use hardware acceleration, but if you get it right the performance is good enough for most purposes.

The one area where you may run into real problems with javascript is if you need to support IE - not only is its javascript engine orders of magnitude slower than other browsers, but you need to run a whole lot more code to make up for missing features. The same approach should work, though you may find yourself implementing more components in flash than you would otherwise.

share|improve this answer