I asked a partial question on stackoverflow, and then realized that this would be the place to get a better answer because this is the game dev website, and you all may know more than the programmers over at stackoverflow about this subject.

So my question is: for making an online multiplayer game that runs in the browser, what would be more efficient to use? flash, javascript, html5, or anything else? Also take into consideration that whatever language is used will be using PHP to access databases and such.

Edit

Efficient as in up to date: what is used today by most people, what should be used by a group of people who aren't that experienced in programming (AKA easy, well documented) this isn't really a yes or no question, more of an opinionated answer. Some people hate flash but others love it, I'm unsure of what I should use for a Browser MMORTS and would like your opinions on it.

Just to clear this up to people who don't know: an MMO RTS usually means its a game with not too much movement, but nifty animations when you scroll over pictures. Also has pretty nice art (dealing with pixel art or whatever will be an issue...).

Also, should I use Javascript+Flash? Say most of the game was written in javascript, but certain fight animations or something were written in flash... is this plausible? Or should it be entirely done with a certain language (the visual aspect).

Questions on Game Development Stack Exchange are expected to relate to game development within the scope defined by the community. Consider editing the question or leaving comments for improvement if you believe the question can be reworded to fit within the scope. Read more about reopening questions here.
If this question can be reworded to fit the rules in the help center, please edit the question.

Same question as thedaian, "efficient" means nothing if you don't define what your goals are. It can be the development speed, the execution speed, the workflow integration with other tools, the most widely supported language, and gazillions of other. Be more specific.
–
RavacholJan 5 '12 at 15:55

1

"up to date" is completely different from the word "efficient". next time use a different word
–
jhockingJan 5 '12 at 16:59

1

@jhocking up to date is just one of the things I needed: efficiency I thought would be a better word to use.
–
GabeJan 5 '12 at 17:21

1

i don't know many finished, in production real-time multiplayer games written with the technologies you mention - so it's going to be hard and undocumented all the way :) there is real of mad god (flash), panda poet (browser) - any others you guys can think of? if you want a facebook-like async-online game: any of the technologies is good enough.
–
oberhamsiJan 15 '12 at 10:34

3 Answers
3

Java - Revived mostly due to Minecraft and Android, Java requires a plugin with about 75% market penetration (source). It's also a fairly complicated language that really isn't suited for first time programmers. There's advantages to using it, but it's probably not the best option.

Unity - Great browser plugin for developing 3d games, tons of tutorials, and support for C#, Javascript, and their own scripting language. However, the more advanced features require paying for the pro version (~$1,000), and it's not really suited to a team development environment (unless you pay for the pro version...). It also doesn't really handle 2d games very well, though it can do 2d if needed.

Flash - Market Penetration is about 95%, and a large amount of people are using Flash for their games, it's great for 2d, has recently added support for 3d, and has toolsets and libraries out there to make development quick and easy (Flashpunk and Flixel). That said, networking could be a problem (I don't know how performance is on real time networking...), and it only really supports left click (right click is massively useful for an RTS) Flash is becoming more useful for games, but most of these games are single player with high score tables, or similar sorts of things. Some mobile devices (such as Apple's, or low-end Androids) doesn't support Flash, as well.

Javascript/HTML5 - The biggest issue here is that support for HTML5 is not yet 100%. You're cutting out anyone who uses older browsers (such as IE<9). Performance is also a fairly major bottleneck, since Javascript is a bit slower than Flash or Unity plugins. Additionally, even though Javascript can be pretty easy to learn, there are a few minor/major problems with it that can cause new programmers confusion. The trick here is to find a tool or library that can help development. You can probably find some info here: http://html5games.com/

Side note: there's other options out there, but most of them have even less support or market penetration than anything listed here.

@bobobobo Good point. However, IE9 only works on Windows 7, so there's still a fair amount of people not using it. This will likely change as time goes on, but it's an issue right now.
–
thedaianJan 5 '12 at 18:46

3

Careful: "Very few mobile devices support Flash" isn't exactly true. Most mobile browsers won't run Flash Player, but Flash can run through AIR in captive runtime.
–
NemoSteinJan 5 '12 at 19:13

Mobile shouldn't be a relevant factor. With the genre that the TS (Gabe) is targetting (RTS) being rather processing intensive, HTML 5 wouldn't be able to do it on mobile either yet. Not to mention that mobile screens are probably way too small for a good experience.
–
CardinFeb 5 '12 at 2:14

First of all, quit talking about HTML 5. Whether something is HTML 5 or 4.01 is in itself irrelevant, what matters is if browsers support the features you choose to use.

To get a broad browser support you will most notably have to not use Canvas, as that is not supported in IE8.

You can however get a lot of stuff done simply using document manipulation, for oldschool 2D it works pretty good.

JavaScript and HTML may not be the easiest platform to work with, but potentially you can have the game working on pretty much any platform, don't underestimate the power of reaching all the smartphones out there.

@Lohoris Statistics not picked from a site that is only visited by web developers tend to show IE<9 being in the 20 to 25% range. Still a way too big chunk to ignore for most developers.
–
eBusinessFeb 6 '12 at 14:47

It really depends on the dynamics of the game you want to make. If you are building a turn based game, you can pretty much use whatever you like.

If you want more real time mechanics but light on reflexes, you may get away with flash remoting. You can handle the communication with flash and leave everyting else to the "native" browser facilities. Check out Red5 if you can put up with enterprisey java b.s. for a while.

Then there is always the java plugin. But we all know there can be only one plugin installed and flash has won already...

For javascript, XMPP with BOSH might be an option if you don't mind the heavy network utilization. I haven't used websockets professionally, but looks like it will be usable within a year or ten.

WebGL aces the rendering part with shader capable hardware. You can do it in java too. For netbooks, you can't do much about it. I don't know how good flash handles 3D, I don't even want to know...

You are gonna have a run off the mill web application backend, I see. There is no way you can build a playable FPS with it. Just stick with good ol' UDP for them.

Some suggestions about a game that is meant to be played inside a browser chrome:

Make it light on assests. MB's of downloads is wrong on a limited data plan.

Integrate it to the browser UI (i.e. links, history, selectable text, ctrl+f...). If it is just a desktop game confined to the browser chrome, make it a desktop game.

Make it light on battery. I can hear my friend's laptop's fan whirling furiously while playing farmville from 25 meters.

Obviously, make it fun. People forget this quite often.

Edit for edit:

Using javascript+flash is an entirely acceptable approach for a MMO RTS. Still, I would question the need for flash just for the bling where even a GIF would do just fine. Simplicity is worth more, I think.