GithubHelp home page GithubHelp logo

woldie / jade Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 870 KB

Justin and Dave's Engine - A 2D Game Engine

License: Creative Commons Attribution Share Alike 4.0 International

JavaScript 98.19% HTML 1.19% Shell 0.61%

jade's Introduction

JaDE

Justin and Dave's Engine - A 2D Game Engine
(C) 2018, Woldrich, Inc.

Licensed under the Creative Commons Attribution-ShareAlike 4.0 International license.

Installing Tools

To create your JaDE game, you will need tools for creation:

  • Inky
  • Tiled

And, you will need compilation tools:

  • JavaScript build tools: nvm, Node.js, npm, lerna, gulp, ...
  • Inklecate compiler
  • Tiled command line compiler tools

Inky editor

JaDE uses Inky for editing dialogue files. It also uses a windows application embedded in the Inky folders to compile the .ink files you edit and save with Inky into .json files that JaDE will be able to load at runtime.

Download a copy of Inky from https://github.com/inkle/inky/releases and unzip to a folder on your local. Inky is an editor that you can use to edit .ink files found in your game project. For more information on Inky and Ink, checkout the homepage

On Linux, the mono-devel package may need to be installed for the Inky app for the preview panel to function:

sudo dnf install mono-devel.x86_64

Inklecate compiler

The Inky editor also ships with a command-line compiler called inklecate that the build scripts need. You need to find the Inky editor on your file system and make an environment variable that points to the inkjs_compatible windows .exe. In my Windows environment, this environment variable was set to:

INKLECATE_COMPILER=C:/Progra~1/Inky-win32-x64/resources/app.asar.unpacked/main-process/ink/inkjs-compatible/inklecate_win.exe

In my Linux environment, this environment variable was set to:

INKLECATE_COMPILER=~/Inky_linux/Inky-linux-x64/resources/app.asar.unpacked/main-process/ink/inkjs-compatible/inklecate_win.exe

On Linux, the Wine windows emulator must be installed to run inklecate_win.exe. Make sure Wine is installed before trying to run the JaDE build scripts.

sudo dnf install wine.x86_64

Tiled editor

I built Tiled from source. In my Linux environment, I followed the instructions for Fedora:

sudo dnf builddep tiled
qmake-qt5
make

Your Linux package manager may also have a prebuilt Tiled package you can install. The Tiled website has downloadable installers for Windows systems.

Installing Node.js

Node.js and npm are used to host the JaDE build tools. Please ensure you have a recent version of Node.js and npm installed.

On Windows, the best you can do currently is to download a current version of Node from https://nodejs.org for Windows

On Linux, I use the Node Version Manager (nvm) to manage the Node installations I have on my local. Follow these instructions for installing nvm.

Then use nvm to install the current version of Node.js and nvm for your local:

nvm alias default node
nvm install-latest-npm

Additional Node tooling

JaDE's build scripts use command-line tools that run atop Node.js and npm to build the JaDE engine along with all data files that make up your game's content. Use these commands before attempting to build JaDE:

npm install --global gulp-cli
npm install --global lerna
lerna bootstrap

IMPORTANT NOTE: Any time you edit any package.json files in the game folder or other folders, you must run lerna bootstrap again.

Building JaDE

We provide a 'hot' development mode that automatically rebuilds and reloads files as you edit and save them in your text editor and creation tools:

./dev

The progress of JavaScript unit tests and Inklecate compilations can be observed on the command-line. And, you may visit an auto-updating copy of your running JaDE game on your local at: http://localhost:8888/ If the auto-update function does not work, you can always hit Refresh on your browser.

If you want to build a distribution of your game {COMING SOON}, run:

./dist

And all of the compiled files you need to play your game will be saved to the dist folder.

Game Development Recipes

Creating a handmade area map

  • In Tiled, select File | New ...
    • In the New dialog, select Orthogonal, CSV, Right Down, and then set your map height and width to the desired size and the pixel height/width of the tiles in the map to 16x16.
  • In the Tilesets pane, create a new tileset by loading a .png containing your tile graphics. Your .png should be 384 pixels wide (24 tiles in width) and some multiple of 16 pixels high.
    • By convention, save your tileset .png files and any other javascript or JSON related to each tileset to the tilesets/ folder.
  • When saving your handmade area maps from Tiled, use File | Save ...
    • In the Save dialog, use the dropdown for indicating file format and select JSON Map Files.
    • By convention, save your map JSON files to the maps/ folder.

jade's People

Contributors

dwoldrich avatar woldie avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.