Skip to content

Latest commit

 

History

History
161 lines (101 loc) · 7.25 KB

README.md

File metadata and controls

161 lines (101 loc) · 7.25 KB

GDevelop IDE

This is the GDevelop 5 editor. It is based on React, Material-UI, Pixi.js and Electron. It uses GDevelop core C++ classes compiled to Javascript to work with GDevelop games.

GDevelop editor

1) Installation 💻

Make sure to have Git and Node.js installed. Yarn is optional.

git clone https://github.com/4ian/GDevelop.git
cd GDevelop/newIDE/app
npm install # or yarn

2) Development 🤓

npm start # or yarn start

This will open the app in your web browser.

Images resources, GDJS Runtime, extensions will be copied in resources, and libGD.js will be downloaded automatically. If you wish, you can build libGD.js by yourself (useful if you modified GDevelop native code like extensions).

Note for Linux: If you get an error message that looks like this: Error: watch GD/newIDE/app/some/file ENOSPC then follow the instructions here to fix.

Development of the standalone app

You can run the app with Electron. Make sure that you've run npm start (or yarn start) in app folder before (see above).

cd newIDE/electron-app
npm install # or yarn

#For macOS:
npm run electron-mac

#For Windows:
npm run electron-win

#For Linux:
npm run electron-linux

Quick Install and Run

There is a script file that automates cloning this repository, building the newIde and running it

  • For Windows: You can download the batch script here and save it to where you want GD to be cloned to, then simply run it.

Development of UI components

You can run a storybook that is used as a playground for rapid UI component development and testing:

cd newIDE/app
npm run storybook # or yarn storybook

Tests

Unit tests, type checking and auto-formatting of the code can be launched with these commands:

cd newIDE/app
npm run test # or yarn test
npm run flow # or yarn flow
npm run format # or yarn format

Theming

It's possible to create new themes for the UI. See this file to declare a new theme. You can take a look at the default theme, including the styling of the Events Sheets.

Development of the game engine or extensions.

Make sure to have the standalone app running with Electron.

  • If you want create/modify a extensions, check the README about extensions for a step-by-step explanations to get started in 5 minutes.

  • The game engine core (GDJS) is in GDJS/Runtime folder. If you modify anything, run the import-GDJS-Runtime.js script:

    cd newIDE/app
    cd scripts
    node import-GDJS-Runtime.js

    You can then launch a preview in GDevelop (again, be sure to be using the standalone app running with Electron to be sure to have your changes reflected immediately).

Recommended tools for development

Any text editor is fine, but it's a good idea to have one with Prettier (code formatting), ESLint (code linting) and Flow (type checking) integration. Modern JavaScript is used for the editor.

👉 You can use Visual Studio Code with these extensions: Prettier - Code formatter, ESLint and Flow Language Support.

(Optional) Building and deploying the standalone app 📦

🖐 This section is only for maintainers that want to deploy the "official app" on the GDevelop website. If you're working on contributions for GDevelop, you won't need it. You can download "Nightly Builds" of GDevelop here too.

Desktop version

First, update version number in newIDE/electron-app/app/package.json.

cd newIDE/electron-app
yarn build # or npm run build

This will build and package the Electron app for Windows, macOS and Linux (according to your OS). The output are stored inside newIDE/electron-app/dist.

To build artifacts for all platforms and publish to a draft GitHub release:

GH_TOKEN=xxx yarn build --mac --win --linux tar.gz --publish always

To build beta versions, you can create archives: yarn build --mac zip --win zip --linux tar.gz.

Webapp version

cd newIDE/web-app
yarn deploy # or npm run deploy

(Optional) Updating translations

Extract translations from the editor, as well as GDevelop Core and extensions:

cd newIDE/app
yarn extract-all-translations # or npm run extract-all-translations

This will create ide-messages.po (in newIDE/app/src/locales) and gdcore-gdcpp-gdjs-extensions-messages.pot (in scripts). Upload both of them to the GDevelop Crowdin project.

To update translations, build and download the translations from Crowdin. Extract everything in newIDE/app/src/locales. And run:

yarn compile-translations # or npm run compile-translations

3) How to contribute? 😎

The editor, the game engine and extensions are always in development. Your contribution is welcome!

  • Check the the roadmap for ideas and features planned.

    You can contribute by picking anything here or anything that you think is missing or could be improved in GD5! If you don't know how to start, it's a good idea to play a bit with the editor and see if there is something that is unavailable and that you can add or fix.

  • Follow the Development section of the README to set up GDevelop and start modifying either the editor or the game engine/extensions.

  • To submit your changes, you have first to create a Fork on GitHub (use the Fork button on the top right), then create a Pull Request.

  • Finally, make sure that the tests pass (refer to this README and to the game engine README) for learning how to run tests.