Can Javascript be used to make games?
Yes, Javascript can be used to make games but it is not popular and well suited for typical Game Development. You can use Phaser.js, Melon.js, or PlayCanvas Game Engines to make games with Javascript, it is worth noting that Javascript is not the language of choice for developing AAA games.
You will not be making AAA-level games, but you will still be able to develop decent games that can attract the attention of many users. Javascript is better suited for Web development, Mobile app development, and Desktop app development.
Since its release by Netscape, Javascript has grown in popularity and usage in many software development fields, Javascript has grown to become the most popular, and commonly used programming language, it is also one of the most loved programming languages.
According to a Stack Overflow survey of 2022, Javascript has been the most popular, and commonly used programming language for 10 years in a row. It is loved by 61.46% of professional developers versus 38.54% of developers who dreaded it.
Apart from web development, Javascript has found uses in game development, mobile app development, desktop app development, Machine Learning, Augmented Reality, Virtual Reality, and recently in embedded devices, and robotics.
Although Javascript is popular among web developers, and app developers, it is not very popular among game developers. When Javascript is used for game development, it is mostly targeted toward web browsers and mobile games.
GAMES MADE WITH JAVASCRIPT
There are not many popular games made with Javascript, some of the notable ones include CrossCode, SlayZ, Gods will be watching, Player Killer’s Exchange, Nerd Fight, Bejeweled, HexGL, Swooop, The Wizard, Garden Invasion, Robostorm, Little Alchemy, etc. other programming languages such as C++, C#, or Lua are preferred for making games.

There are quite a number of game engines that you can use to make games with Javascript, game engines make it easy to develop and build games efficiently. some of the common ones include
- PLAYCANVAS
- PHASER
- MELON.JS
- BLEND4WEB
- A-FRAME
- BABYLON.JS
- PIXI.JS
- KIWI.JS
- COCOS2D
- GOOTECHNOLOGIES
- MATTER-JS
- STAGE.JS
- CRAFT
- COPPERCUBE
- DIM3
- ETC.
These game engines and libraries can be used to make 2D, and 3D games for the web browser, Android, iOS, Windows, macOS, and Linux.
If you plan on making powerful AAA games, using Javascript is not the best choice. Most modern game developers do not use Javascript for game development, if you seriously want to develop games efficiently, using C++, C#, or Lua is the best approach. There are a lot of resources available for these languages to help you build your games quickly and efficiently.
WHAT ARE ALTERNATIVES TO JAVASCRIPT FOR GAME DEVELOPMENT?
There are many programming languages and platforms that you can use as alternatives to Javascript for game development. Here are some of the popular ones:
UNITY (C#)
Unity is one of the most popular platforms for developing 2D and 3D games. Unity uses the C# programming languages for game logic, there are also other features that can be implemented with drag and drop.
Unity has a marketplace called Asset store, where you can download free and paid game assets to quicken your development process. Unity is regarded as a beginner-friendly platform, it is used by big companies as well as indie developers.
Some of the popular games made with Unity include Pokemon Go, Monument Valley 2, Tempo Run, Robocraft, Angry Birds, Sonic Dash, Marvel Strike Force, Iron Man VR, Lara Croft Go, Super Mario Run, and many others.
Unity supports many platforms, once you are done developing your game, you can deploy it to different platforms such as Android, iOS, tvOS, macOS, Windows, Linux, Playstations, Xbox, Nintendo, Stadia, WebGL, Oculus VR, PSVR, ARCore, Magic Leap, etc.
Unity is also used in other industries such as Film, Automotive, Architecture, Military, Engineering, Construction, etc.
UNREAL ENGINE (C++)
Unreal Engine is one of the most advanced, powerful, and popular platforms for making 2D and 3D games, it uses the C++ programming language for programming the game logic.
Unreal Engine has also a marketplace that has a lot of resources ranging from art assets to models, sounds, environments, code snippets, and more. Some of them are free while others can be paid for.
Some of the popular games made with Unreal Engine include Fortnite, Brothers in Arms, Golden Eye: Rogue Agent, Medal of Honor, Shadow Ops, Shrek 2, Star Wars, Spider-man 2, Batman Arkham City, DC Universe Online, Mortal Kombat, Transformers, Crash Bandicoot, and many others.
Unreal supports many platforms, once you are done developing your games, you can deploy to different platforms such as Android, iOS, tvOS, macOS, Windows, Linux, Playstations, Xbox, Nintendo, Stadia, WebGL, Oculus VR, PSVR, ARCore, etc.
Unreal Engine is also used in other industries such as Film & TV, Architecture, Simulations, Automotive & Transportation, Broadcast & Live Events, Engineering, medicine, etc.
GAMEMAKER STUDIO (C++, GAME MAKER LANGUAGE)
GameMaker Studio is an easy-to-use game engine for making 2D games and offers limited use of 3D graphics. It has a drag-and-drop feature that makes game development easy. You can also use programming languages like C++, and Game maker language for advanced features.
GameMaker Studio has also a marketplace that has a lot of resources ranging from animations to sounds, backgrounds, fonts, objects, paths, sprites, scripts, shaders, and more. Some of them are free while others can be paid for.
Some of the popular games made with GameMaker Studio include Undertale, Forager, Hyper Light Drifter, Samurai Gunn 2, Webbed, The Tarnishing of Juxtia, Destructivator 2, Fields of Mistria, Flynn: Son of Crimson, Katana Zero, Battleships Forever, Tower of Heaven, and many others.
GameMaker Studio supports many platforms, once you are done developing your games, you can deploy to different platforms such as Android, iOS, macOS, Windows, Tizen, Playstation, Xbox, Nintendo, WebGL, Amazon Fire TV, etc.
Other alternatives to Javascript for game development include Godot (C++, C#) Stride (C#), Amazon Lumberyard (Lua), Irrlicht (C++), CryEngine (Lua), Pygame (Python), Source 2 (Lua), and many others.
These alternatives will help you to build games for many platforms and they have a huge community of developers. Javascript does not have a big game development community compared to C#, C++, or Lua, a big community around a language is helpful in case you have challenges during development.
CONCLUSION
It can be seen that Javascript can be used to make games but it is not a popular choice for building powerful games for many platforms. Javascript lacks the features that programming languages like C++, C#, or Lua have for Game development.
Javascript is well suited for building games for the web browser. If you want to make games for many platforms and consoles efficiently, using Unity (C#), Unreal Engine (C++), or Lua is the best approach.