How to create a game using JavaScript?

How to do a Hello World Game using JavaScript? Some dev tools? framework, sdk?
clockwork

Have a look at phaser, nice little framework for creating 2D games. For dev tools I can highly recommend vscode. It has great support for JavaScript and node.js

2 Likes

+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?

1 Like

Oh right, forgot about that part… maybe try NW.js not sure if you can get it running on an ARM platform though

Edit: apparently you can link

2 Likes

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.

3 Likes

image

Thanks! I could do It :slight_smile:

2 Likes

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…

1 Like

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 :confused:

1 Like

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

1 Like

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 :slight_smile:
nwjs_01

2 Likes

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.

1 Like