The language can be used to create everything from web apps to desktop and phone apps and even databases and backend servers.
The answer is yes, and it’s not very surprising. There are several platforms, tools, and 2D and 3D libraries that programmers can use to make video games with JS. These include WebGL, Phaser, Impact.js, and Melonjs.
Learning to use these tools can be challenging, but every one of them provides some benefit. What’s more interesting is that the production costs of games can be kept low by using game engine libraries. But this doesn’t make the language inherently a good choice for game development.
This alone creates many limitations. Concepts such as collision detection and rendering require heavy calculations that typically make use of GPUs. However, since JS is confined to the browser, programmers don’t have access to as much computational power as other game rendering technologies.
For this reason, it’s plausible to say that JS in its current form is not sufficient to build AAA titles (Click for excellent game deals). It lacks the rendering pipelines, memory management, and OOP required to make AAA games.
But that’s not to say that browser games don’t have potential. Browsers are only getting more powerful by the year, and it’s only a matter of time before they are powerful enough to provide gaming experiences comparable to consoles.
It’s common knowledge that JS games aren’t lengthy and tend to have simple controls. It’s a common train of thought that these types of games could do well on the App Store.
Such frameworks also enable users to build hybrid apps that run on both iOS and Android phones. Using such frameworks can be advantageous since they remove the need for the developer to be proficient in native programming languages.
Ionic, Framework7, and PhoneGap are some of the many popular frameworks developers use to build hybrid apps.
But using these frameworks comes with its drawbacks. There are several hardware considerations, and since the WebView wrapper simulates a native-app-like experience, the performance of hybrid apps tends to suffer.
For a WebView app to work on a phone, the phone must open up a browser internally and load heavy assets – all while showing the user that it’s opening a “native” application upfront.
While many performance issues have been ironed out from most frameworks over the last few years, some hybrid apps still slow phones down. However, these frameworks also offer the advantage of building the game once and publishing anywhere.