Deciding on a language for a Web Game

I’ve been writing much lately about the web game I have in mind, and it’s time I decided on a language and started writing actual code. There is a bunch to consider, not the least of which is what languages I already know and am comfortable using. A quick perusal of job postings for game devs would suggest that C++ is the language to use for game development in general, and it is a language that I am using, but at the moment my ability in that language is limited to CLIs. For me, that leaves Ruby and JavaScript. Another option would be to use an existing game engine, of which there are many open source options available. While I do intend on learning Unreal Engine (and have it sitting installed on my computer as I write this), it feels like overkill for the game I have in mind. My target is a game that can be run in browser, accessed through my reenacting group’s website (or the website of anyone else who wants to use it). While the documentation for Unreal Engine does suggest that HTML integration is possible, it is no longer natively supported with the more recent releases.

For a web game, JavaScript seems like the ideal option. It is already supported by the vast majority of browsers, meaning it should be pain free for people to run. Going a step farther, React seems like an obvious choice for a framework to work within. The Virtual DOM will be incredibly important for writing a game, with the immediate feedback of new code allowing easy testing as I go. React also creates smooth and reactive pages, able to easily update without the need for a page refresh. React components allow for easy organization of the elements of the game (game window, navigation, instructions, sprites). I don’t need crazy graphics rendering, the entire concept can be implemented on a 2d plane (with no benefit coming from a third dimension). Redux, to handle State, will also come in handy. The game won’t include saves or user profiles, as there is not “progress” to speak of. The purpose is educational. The user experiences what is has to offer as they might experience an exhibit in a museum.

JavaScript meets our needs broadly. We have classes, allowing our components to inherit and not need to rewrite code for similar pieces. It works easily in browser, so should be easy to integrate into an existing website and for users to access, and it is a language I know, so it won’t take too much extra faffing about learning new syntax.

Well, we’ll see how this goes…

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Eli Huebner

Eli Huebner

I taught high school history for 4 years, before pivoting to software development in search of something more creative.