Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

Are JavaScript games exclusive to modern smartphones, or are older phone models also able to play games written in JavaScript?

share|improve this question
3  
"Regular cellphone" is kind of ambiguous. There are smart phones that run on java, but it would depend on the phone if they were able to run javascript. I think you can expect it to be unlikely that a javascript game would work. Non-smartphones are not typically known for their ability to load additional apps. –  Byte56 Mar 24 '13 at 18:44
    
Have you tried it? –  Sean Middleditch Mar 24 '13 at 19:24
    
@Byte56, Thanks, ok. Yes, I meant regular mobile phones (not smartphones). –  Lana Tisdel Mar 24 '13 at 19:33
    
I edited the question to make the distinction a little clearer. It's still a fuzzy boundary though. How old of a phone are we talking? Also, Japanese gara-kei "Galapagos phones" are another boundary altogether! :) –  Anko Mar 24 '13 at 22:06
2  
Nokia Series 40 would be a typical edge case. It's positioned below Nokia's Windows 8 smartphones, but does have Webkit and thus javascript. –  MSalters Mar 25 '13 at 12:36
show 1 more comment

3 Answers

up vote 4 down vote accepted

If the cellphone has a JavaScript interpreter or web browser built in, it is possible but not likely. Most non-smartphones don't come with necessary software especially not the phones of yesteryear.

It's more common for older models to come with Java, which will allow you to run applications based on that platform.

All in all, you can definitely find "dumbphones" that will run JavaScript today so I wouldn't say they're exclusive to smartphones.

share|improve this answer
    
Thanks Xerosigma. –  Lana Tisdel Mar 24 '13 at 19:34
    
-1 for confusing Java and JavaScript. It makes your answer pointless. –  eBusiness Mar 24 '13 at 21:00
    
I confused something? Your statement seems a bit more pointless. I clearly answered the question and provided some additional knowledge on what is a more common case. But since it seems to have confused you, I'll modify it a bit to appeal your perception. –  Xerosigma Mar 24 '13 at 21:16
3  
C++ interpreters? No, C++ is compiled, certainly in the smartphone world. as far as they have webbrowsers, they're typically limited in functionality and have no JS engine. –  MSalters Mar 25 '13 at 12:31
2  
Actually xerosigma didn't confuse anything he was just saying that usually the phones platform is java as if to suggest using java to get what you need done is more probable than being able to use JavaScript. Let's all get along guys no need to fling insults. –  Digital Architect Mar 25 '13 at 14:34
show 4 more comments

I have only tested on my own Samsung B2700, which is a relatively new dumb-phone, other phones may provide different results.

The issue:

Basically almost any reasonably new phone, even a cheap one, is a pretty decent computer, it can run a browser, it can draw 2D graphics in real time, and do a lot of other stuff. Thus there is no doubt that the hardware is capable of running games, if such phones are incapable of running JavaScript games it must be because the phone has a poor or lacking JavaScript implementation. There are two issues that seem likely to arise:

  1. The browser doesn't run JavaScript at all.
  2. The JavaScript implementation lack a proper routing of keyboard input.

Testing my own phone:

My phone seems capable of basic dom manipulation (and thus it does run JavaScript), and it generates standard events when the 12 keys on the numeric keypad are pressed. It also seems reasonably responsive on my simple test page, but I don't know how good the performance is. In any case the graphics quality is heavily limited by small low-res screen.

While it is hard to judge the viability from my simple test I have no doubt that a simple Tetris clone or similar is at least possible, and it would probably play reasonably well.

I made the following page to test keyboard input, it is blank when loaded, but should fill basic information about keyboard events on the screen as the keys are pressed: http://ebusiness.hopto.org/phonetest.htm

share|improve this answer
    
I tried it, eBusiness, but I'm still a Newbie. I feel shamed asking this, but ...how did you make this page (if it's not too complicated to explain). The page works; I tried it. How does this page relate to the topic? –  Lana Tisdel Mar 26 '13 at 0:11
    
@LanaTisdel As for how I did, look at the source, it is a pretty normal keyboard event capturing scheme. It is interesting for mobile phones as input is the one area where they are truly different from PCs, you have got no mouse and a completely different keyboard. You need the input from this keyboard in order to make a proper game, thus determining how to get that input is vital to a game project, and that is what my page tries to determine. You'd of course have to load it in a mobile phone to test that phone. –  eBusiness Mar 26 '13 at 15:53
add comment

Definitely it just depends on what version of html your game is written in and what your phones browser/interpreter will support

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.