# How to create a game using JavaScript?

**URL:** <https://forum.clockworkpi.com/t/how-to-create-a-game-using-javascript/1139>\
**Category:** Developers\
**Tags:** javascript\
**Created:** [August 1, 2018, 5:12pm UTC](https://forum.clockworkpi.com/t/how-to-create-a-game-using-javascript/1139 "2018-08-01T17:12:36Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![otakurzo](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/otakurzo/32/720_2.png) [@otakurzo](https://forum.clockworkpi.com/u/otakurzo)\
**Post date:** [August 1, 2018, 5:12pm UTC](https://forum.clockworkpi.com/t/how-to-create-a-game-using-javascript/1139/1 "2018-08-01T17:12:37Z")

</div>

How to do a Hello World Game using JavaScript? Some dev tools? framework, sdk?  
 ![clockwork](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex029/uploads/clockworkpi/original/1X/83760b7e446f8c38b70f6f50ac97f4ef44acd37f.png)

---

<div class="post-metadata">

**Author:** ![Abbadon](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@Abbadon](https://forum.clockworkpi.com/u/Abbadon)\
**Post date:** [August 1, 2018, 9:31pm UTC](https://forum.clockworkpi.com/t/how-to-create-a-game-using-javascript/1139/2 "2018-08-01T21:31:11Z")

</div>

Have a look at [phaser](https://phaser.io/), nice little framework for creating 2D games. For dev tools I can highly recommend vscode. It has great support for JavaScript and node.js

---

<div class="post-metadata">

**Author:** ![hpcodecraft](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/hpcodecraft/32/663_2.png) [@hpcodecraft](https://forum.clockworkpi.com/u/hpcodecraft)\
**Post date:** [August 1, 2018, 9:36pm UTC](https://forum.clockworkpi.com/t/how-to-create-a-game-using-javascript/1139/3 "2018-08-01T21:36:48Z")

</div>

+1 for phaser.

I got some older prototypes made with phaser which I’d like to test on the Gameshell, but I don’t really know where to start. I got a HTML file plus some JS assets and images. How should those be loaded?  
Launch a web browser from the launcher and load the local HTML file?  
Wrap it with electron?  
Any other ideas?

---

<div class="post-metadata">

**Author:** ![Abbadon](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@Abbadon](https://forum.clockworkpi.com/u/Abbadon)\
**Post date:** [August 1, 2018, 9:48pm UTC](https://forum.clockworkpi.com/t/how-to-create-a-game-using-javascript/1139/4 "2018-08-01T21:48:58Z")

</div>

Oh right, forgot about that part… maybe try [NW.js](https://nwjs.io/) not sure if you can get it running on an ARM platform though

Edit: apparently you can [link](https://github.com/LeonardLaszlo/nw.js-armv7-binaries)

---

<div class="post-metadata">

**Author:** ![hpcodecraft](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/hpcodecraft/32/663_2.png) [@hpcodecraft](https://forum.clockworkpi.com/u/hpcodecraft)\
**Post date:** [August 1, 2018, 10:01pm UTC](https://forum.clockworkpi.com/t/how-to-create-a-game-using-javascript/1139/5 "2018-08-01T22:01:11Z")

</div>

That could be an alternative to electron - I just checked Github, electron is available for ARM, too. One of these two (or both) might work. I’ll try to play around with that when I have some tim.

---

<div class="post-metadata">

**Author:** ![otakurzo](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/otakurzo/32/720_2.png) [@otakurzo](https://forum.clockworkpi.com/u/otakurzo)\
**Post date:** [August 3, 2018, 12:34am UTC](https://forum.clockworkpi.com/t/how-to-create-a-game-using-javascript/1139/6 "2018-08-03T00:34:23Z")

</div>

![image](https://cdck-file-uploads-canada1.s3.dualstack.ca-central-1.amazonaws.com/flex029/uploads/clockworkpi/original/1X/d52bb4b1ab4847eb28370ef18b26a90e0b159dc1.jpeg)

Thanks! I could do It 🙂

---

<div class="post-metadata">

**Author:** ![Abbadon](https://avatars.discourse-cdn.com/v4/letter/a/dfb087/32.png) [@Abbadon](https://forum.clockworkpi.com/u/Abbadon)\
**Post date:** [August 3, 2018, 7:24am UTC](https://forum.clockworkpi.com/t/how-to-create-a-game-using-javascript/1139/7 "2018-08-03T07:24:13Z")

</div>

NIce! Feel like creating a tutorial so other people can follow along?  
Oh and do you have any clue as to the performance of running JS on GS? NW.js sorta runs a browser under the hood to display your html canvas, so it’s not quite light-weight…

---

<div class="post-metadata">

**Author:** ![hpcodecraft](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/hpcodecraft/32/663_2.png) [@hpcodecraft](https://forum.clockworkpi.com/u/hpcodecraft)\
**Post date:** [August 10, 2018, 9:13pm UTC](https://forum.clockworkpi.com/t/how-to-create-a-game-using-javascript/1139/8 "2018-08-10T21:13:11Z")

</div>

Please provide a tutorial or repo of a sample app, this would be very helpful. I’ve tried different things with electron and nw.js but had no luck at all so far 😕

---

<div class="post-metadata">

**Author:** ![ManlyStump](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/manlystump/32/889_2.png) [@ManlyStump](https://forum.clockworkpi.com/u/ManlyStump)\
**Post date:** [August 10, 2018, 11:49pm UTC](https://forum.clockworkpi.com/t/how-to-create-a-game-using-javascript/1139/9 "2018-08-10T23:49:13Z")

</div>

Have you tried this? It’s not Electron, just nw.js and Phaser, but will hopefully get you somewhere!

> [@NWJS + Phaser.io game engine Tutorial](https://forum.clockworkpi.com/t/nwjs-phaser-io-game-engine-tutorial/1330):
>
> Hello fellows! GameShell is a fantastic piece of hardware and I would like to contribute my 2-cents on this community by posting a tutorial on how to make GameShell run javascript games (using a game engine like [Phaser.io](http://phaser.io) with the help of [NWJS](http://nwjs.io). I have uploaded this tutorial and related code to [GitHub](https://github.com/pleft/nwphaserjs_tutorial) but I will also post README.md here for convenience. However for the latest updates please always check my github. Hope you find it interesting and useful! [2018-08-10%2010\_13\_17-phaser] GameShe…

---

<div class="post-metadata">

**Author:** ![hpcodecraft](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/hpcodecraft/32/663_2.png) [@hpcodecraft](https://forum.clockworkpi.com/u/hpcodecraft)\
**Post date:** [August 11, 2018, 1:30am UTC](https://forum.clockworkpi.com/t/how-to-create-a-game-using-javascript/1139/10 "2018-08-11T01:30:53Z")

</div>

Nice, thank you for the hint! I’ve managed to run nwjs by myself now, the missing piece was libnss3. Anyway, for phaser this will be helpful!

nwjs running with default sample app 🙂  
 ![nwjs_01](https://canada1.discourse-cdn.com/flex029/uploads/clockworkpi/original/1X/799b5777674f01839c61bf5f1f7a919fad9292d8.png)

---

<div class="post-metadata">

**Author:** ![ugly\_cat](https://yyz1.discourse-cdn.com/flex029/user_avatar/forum.clockworkpi.com/ugly_cat/32/1371_2.png) [@ugly\_cat](https://forum.clockworkpi.com/u/ugly_cat)\
**Post date:** [November 23, 2018, 12:07am UTC](https://forum.clockworkpi.com/t/how-to-create-a-game-using-javascript/1139/12 "2018-11-23T00:07:43Z")

</div>

There is a pretty neat engine called Super Powers. It’s not just a framework but a whole editor. It also allows for collaborative editing akin to google docs.
