To make a game, just require
jdiamond, initialize the engine, and construct your gameobjects. Create an
update callback to handle game logic, and then launch your game.
OSX or Windows is required, but Windows is not officially supported (in particular, some Windows binaries may be out of date). We might support Linux in the future.
If you don't already have node.js, install it from here. Then in your project folder, run:
$ npm install jdiamond
You also need to have SDL2, SDL2 image, SDL2 mixer, and SDL2 ttf installed. If you don't have them already, follow the instructions for your platform:
You can use our install script to automatically download and install the SDL frameworks:
$ sudo ./node_modules/jdiamond/install_deps
If you can't sudo, you can install SDL to your user directory instead:
$ ./node_modules/jdiamond/install_deps ~/Library/Frameworks
As far as we know, SDL does not have an executable installer, and we haven't made one yet. This means that, for now, you'll have to manually install all of the DLLs in
jdiamond/src/CDiamond/extern/SDL2/lib/[your architecture]/. You can copy those DLLs to your node.js directory (ex.
C:\Program Files\nodejs) and jdiamond should be able to find them. Or, you could install them to
C:\Windows\System32, but we haven't been able to do this successfully (if you're Windows-savvy, please consider contributing to the project!).
jdiamond uses node-ffi to communicate with the C++ Diamond library. See node-ffi for license details.
Diamond uses Simple DirectMedia Layer (SDL), which is Copyright (c) 1997-2014 Sam Lantinga firstname.lastname@example.org.
jdiamond is Copyright 2016 Ahnaf Siddiqui, and is licensed under the Apache License, Version 2.0 (see LICENSE file).
Artwork (such as laserShip.png and monomer.png) is Copyright 2016 Shah Akandh, all rights reserved.