mirror of
https://github.com/4ian/GDevelop.git
synced 2025-10-15 10:19:04 +00:00
Fix typos and linguistic errors in documentation / hacktoberfest (#7882)
Signed-off-by: Sebastien Dionne <survivant00@gmail.com>
This commit is contained in:
@@ -24,7 +24,7 @@ The rest of this page is an introduction to the main concepts of GDevelop archit
|
||||
|
||||
Extensions do have the same distinction between the "**IDE**" part and the "**Runtime**" part. For example, most extensions have:
|
||||
|
||||
- A file called [`JsExtension.js`(https://github.com/4ian/GDevelop/blob/master/Extensions/ExampleJsExtension/JsExtension.js)], which contains the _declaration_ of the extension for the **IDE**
|
||||
- A file called [`JsExtension.js`](https://github.com/4ian/GDevelop/blob/master/Extensions/ExampleJsExtension/JsExtension.js), which contains the _declaration_ of the extension for the **IDE**
|
||||
- One or more files implementing the feature for the game, in other words for **Runtime**. This can be a [Runtime Object](https://github.com/4ian/GDevelop/blob/master/Extensions/ExampleJsExtension/dummyruntimeobject.ts) or a [Runtime Behavior](https://github.com/4ian/GDevelop/blob/master/Extensions/ExampleJsExtension/dummyruntimebehavior.ts), [functions called by actions or conditions](https://github.com/4ian/GDevelop/blob/master/Extensions/ExampleJsExtension/examplejsextensiontools.ts) or by the game engine.
|
||||
|
||||
### "Runtime" and "IDE" difference using an example: the `gd::Variable` class
|
||||
|
@@ -35,7 +35,7 @@ GDevelop is composed of an **editor**, a **game engine**, an **ecosystem** of ex
|
||||
| `Core` | Core classes, describing the structure of a game and tools to implement the IDE and work with GDevelop games. |
|
||||
| `GDJS` | The game engine, written in TypeScript, using PixiJS and Three.js for 2D and 3D rendering (WebGL), powering all GDevelop games. |
|
||||
| `GDevelop.js` | Bindings of `Core`, `GDJS` and `Extensions` to JavaScript (with WebAssembly), used by the IDE. |
|
||||
| `newIDE` | The game editor, written in JavaScript with React, Electron, PixiJS and Three.js.js. |
|
||||
| `newIDE` | The game editor, written in JavaScript with React, Electron, PixiJS and Three.js. |
|
||||
| `Extensions` | Built-in extensions for the game engine, providing objects, behaviors and new features. For example, this includes the physics engines running in WebAssembly (Box2D or Jolt Physics for 3D). All the [official and experimental extensions are on this repository](https://github.com/GDevelopApp/GDevelop-extensions). [Community extensions are available here](https://github.com/GDevelopApp/GDevelop-community-list). |
|
||||
|
||||
To learn more about GDevelop Architecture, read the [architecture overview here](Core/GDevelop-Architecture-Overview.md).
|
||||
|
@@ -1,3 +1,3 @@
|
||||
This library sources is used by the [tile map extension](../../Extensions/TileMap/).
|
||||
This library's sources are used by the [tile map extension](../../Extensions/TileMap/).
|
||||
|
||||
The `npm run build` command copy the bundled library at the right place for the extension to use it.
|
||||
The `npm run build` command copies the bundled library to the right place for the extension to use it.
|
||||
|
@@ -16,9 +16,9 @@ the `build-theme-resources` script in the scripts folder. There is also an npm s
|
||||
|
||||
## Creating new themes
|
||||
|
||||
Themes are stored in [this Theme Folder](./app/src/UI/Theme). Each theme has its own subfolder containing
|
||||
Themes are stored in [this Theme Folder](./app/src/UI/Theme). Each theme has its own subfolder containing:
|
||||
|
||||
- A javascript file (`index.js`) to generate the object describing the theme that is used by the editor (class names, values to apply to Material-UI) and that also imports the css file.
|
||||
- A JavaScript file (`index.js`) to generate the object describing the theme that is used by the editor (class names, values to apply to Material-UI) and that also imports the CSS file.
|
||||
- The `theme.json` file which stores the theme details (colors, widths, etc.)
|
||||
|
||||
To create the necessary files, run the following command:
|
||||
|
@@ -95,7 +95,7 @@ Any text editor is fine, but it's a good idea to have one with _Prettier_ (code
|
||||
Cloud storage providers are set up with development keys when you're running GDevelop in development mode. For these, to work, you must execute the web-app not from the traditional `http://localhost:3000` origin, but from `http://gdevelop-app-local.com:3000`:
|
||||
|
||||
- Set up a [redirection in your hosts file](https://www.howtogeek.com/howto/27350/beginner-geek-how-to-edit-your-hosts-file/), that should look like: `127.0.0.1 gdevelop-app-local.com`.
|
||||
- Launch then the web app from `http://gdevelop-app-local:3000`.
|
||||
- Launch the web app from `http://gdevelop-app-local.com:3000`.
|
||||
|
||||
> This is only necessary if you want to have cloud storage providers working in development. If not done, GDevelop will simply display an error while trying to use them.
|
||||
|
||||
|
@@ -33,4 +33,4 @@ Latest versions of `react-sortable-hoc` seems to be breaking the lists. The exac
|
||||
|
||||
- `react-mosaic-component` is a custom version where `react-dnd` was simply upgraded to version `7.7.0`
|
||||
- `@lingui/react` is a version where Flow definitions have been fixed.
|
||||
- `pixi-simple-gesture` is a version where an extra check for `undefined` have been added to `touchStart` in `pan.js`, following traces of errors that have been inspected (though the bug could not be reproduced - but better be safe).
|
||||
- `pixi-simple-gesture` is a version where an extra check for `undefined` has been added to `touchStart` in `pan.js`, following traces of errors that have been inspected (though the bug could not be reproduced - but better be safe).
|
||||
|
@@ -8,7 +8,7 @@ A lot of elements in GDevelop can have fields which can be edited by the user. F
|
||||
* an object also has properties that are shown in the editor. They are often strings (the text to display in a text object), numbers (the number of particles), booleans (a checkbox to set if a text is displayed in bold or not) and also sometimes can be a resource (for example, the image to be displayed by a tiled sprite object or the font to be used by a text object).
|
||||
* an instance on a scene also has a bunch of properties: its X and Y coordinates, its angle, etc...
|
||||
|
||||
While some object or behaviors can have their own editor, with a custom interface written in React (find them in [`newIDE/app/src/ObjectEditor/Editors`](https://github.com/4ian/GDevelop/tree/master/newIDE/app/src/ObjectEditor/Editors) for objects and in [`newIDE/app/src/BehaviorsEditor/Editors`](https://github.com/4ian/GDevelop/tree/master/newIDE/app/src/BehaviorsEditor/Editors) for behaviors), the large majority of object/behavior editors can be automatically generated by looking at the properties of the said objects/behaviors, and creating a field for them.
|
||||
While some objects or behaviors can have their own editor, with a custom interface written in React (find them in [`newIDE/app/src/ObjectEditor/Editors`](https://github.com/4ian/GDevelop/tree/master/newIDE/app/src/ObjectEditor/Editors) for objects and in [`newIDE/app/src/BehaviorsEditor/Editors`](https://github.com/4ian/GDevelop/tree/master/newIDE/app/src/BehaviorsEditor/Editors) for behaviors), the large majority of object/behavior editors can be automatically generated by looking at the properties of the said objects/behaviors, and creating a field for them.
|
||||
|
||||
That's why object and behaviors can have "properties". A property is defined by a [class in GDCore called PropertyDescriptor](https://github.com/4ian/GDevelop/blob/master/Core/GDCore/Project/PropertyDescriptor.h).
|
||||
|
||||
|
@@ -13,11 +13,11 @@ The code of the game engine and extensions are written in TypeScript in "ES6", n
|
||||
- `Class`es,
|
||||
- but with a _cautious adoption_ of any other new features.
|
||||
|
||||
This is because neither Android 4.x nor Internet Explorer 11 are supported - but some old version of Chrome, Safari, Firefox and Edge are still used and may not support some newest features. Notably, avoid "Shorthand property names", avoid object spread, avoid array spread.
|
||||
This is because neither Android 4.x nor Internet Explorer 11 are supported - but some old versions of Chrome, Safari, Firefox and Edge are still used and may not support some newest features. Notably, avoid "Shorthand property names", avoid object spread, avoid array spread.
|
||||
|
||||
### Make simple, garbage free code
|
||||
|
||||
Games in JavaScript are very sensitive to the **issue of garbage collection**: a code that would create too much garbage variables/functions will not perform well because the JS engine will have to do too much garbage collection and will cause frame drops.
|
||||
Games in JavaScript are very sensitive to the **issue of garbage collection**: code that creates too many garbage variables/functions will not perform well because the JS engine will have to do too much garbage collection and will cause frame drops.
|
||||
|
||||
- Avoid any "clever" code that would create functions at runtime.
|
||||
- Ensure you **allocate memory** (creating objects, arrays etc...) only once at the beginning whenever possible.
|
||||
@@ -30,7 +30,7 @@ The codebase is typed using **[TypeScript](https://www.typescriptlang.org/)**.
|
||||
|
||||
It's good practice to type almost everything (i.e: avoid `any` as much as possible), so that the game engine and your extensions can have _documentation_ auto-generated, _auto-completion_ and _static type checking_ that will catch bugs and mistakes.
|
||||
|
||||
Learn how to launch [manually the type checking in GJDS README](../../GDJS/README.md).
|
||||
Learn how to [manually launch the type checking in GDJS README](../../GDJS/README.md).
|
||||
|
||||
## For the editor (`newIDE/app`)
|
||||
|
||||
@@ -40,11 +40,11 @@ All source files should use the arrow function (`=>`), `class`, `let`/`const` an
|
||||
|
||||
### What about typing?
|
||||
|
||||
The codebase is typed using **[Flow](https://flow.org/)**. It's a powerful typechecker that does not require any recompilation. It's very similar to TypeScript
|
||||
The codebase is typed using **[Flow](https://flow.org/)**. It's a powerful type checker that does not require any recompilation. It's very similar to TypeScript
|
||||
|
||||
> The IDE is using Flow and not TypeScript for historical reasons. Apart from a few differences, it should not be difficult to get used to the Flow syntax.
|
||||
|
||||
While properly typing can be seen as cumbersome, it's something that is rather quick to learn and force developers to think about what they are using. It's also an invaluable tool to do refactoring, and ensure that any addition/removal is not breaking anything. It also provides autocompletion (like in VSCode, with the Flow Language Support plugin).
|
||||
While proper typing can be seen as cumbersome, it's something that is rather quick to learn and forces developers to think about what they are using. It's also an invaluable tool for refactoring, and ensures that any addition/removal is not breaking anything. It also provides autocompletion (like in VSCode, with the Flow Language Support plugin).
|
||||
|
||||
## What about code formatting?
|
||||
|
||||
|
@@ -1,6 +1,6 @@
|
||||
# Using git to make and propose changes to GDevelop
|
||||
|
||||
GDevelop source code is hosted on GitHub, which is based on the Git version control system to handle the code source. While git can be a bit hard to learn when you're first using it, it's actually not complicated once you have a few concepts in mind. It's also very powerful.
|
||||
GDevelop source code is hosted on GitHub, which is based on the Git version control system to handle the source code. While git can be a bit hard to learn when you're first using it, it's actually not complicated once you have a few concepts in mind. It's also very powerful.
|
||||
|
||||
> If you have never used GitHub, you may first want to go on [GDevelop GitHub](https://github.com/4ian/GDevelop), and click on **Fork** to get a copy of the GDevelop source code. This will be "your" copy of the source code, where you can create new features and open **Pull Requests**, which are proposal of changes to the source code - most of the time to implement new features or fix bugs.
|
||||
|
||||
@@ -8,7 +8,7 @@ GDevelop source code is hosted on GitHub, which is based on the Git version cont
|
||||
|
||||
If it's the first time and you have just "forked" GDevelop on GitHub, clone your repository: `git clone git@github.com:your-username/GDevelop.git`. This will download your copy of the repository on your local computer.
|
||||
|
||||
- Your own repository is usually called, in git jargon, a "remote" repository, named `origin`. When you do a `git push`, `git pull`, your usually, unless specified otherwise, getting or sending code to your repository.
|
||||
- Your own repository is usually called, in git jargon, a "remote" repository, named `origin`. When you do a `git push` or `git pull`, you're usually, unless specified otherwise, getting or sending code to your repository.
|
||||
- The [GDevelop "official repository"](https://github.com/4ian/GDevelop) is also a remote, usually called `upstream`.
|
||||
|
||||
By default, when you have just "cloned" your repository, there is only the single remote `origin`. It will be useful later to have the `upstream` remote (to get the latest code from GDevelop). You can do it by entering: `git remote add upstream https://github.com/4ian/GDevelop.git`.
|
||||
@@ -17,9 +17,9 @@ By default, when you have just "cloned" your repository, there is only the singl
|
||||
|
||||
## 2. Learn about the `master` branch, branches and Pull Requests
|
||||
|
||||
In git, all the code is stored in the repository, and changes are stored in *commits*. The latest version of the source code is in a "branch", which is called `master` (it's an arbitrary convention).
|
||||
In git, all the code is stored in the repository, and changes are stored in *commits*. The latest version of the source code is in a "branch" which is called `master` (it's an arbitrary convention).
|
||||
|
||||
When you'll make new additions to GDevelop, you'll make a new "branch". Imagine a branch like the branch of a tree:
|
||||
When you make new additions to GDevelop, you'll make a new "branch". Imagine a branch like the branch of a tree:
|
||||
|
||||
- The source code is in master, which is the trunk of the tree, with tons of commits.
|
||||
- Your branch will grow from master, adding a few commits.
|
||||
|
@@ -1,7 +1,7 @@
|
||||
# Scripts files for GDevelop
|
||||
|
||||
- **ReleaseProcedure.bat**: this script compiles, generate documentation (see **GenerateAllDocs.bat**) and package GDevelop for Windows in an installer and an archive.
|
||||
- **ReleaseProcedure.sh**: compiles and package GD for Ubuntu (see _Binaries/Packaging_).
|
||||
- **CopyWindowsToLinuxReleaseFiles.sh**: Copy all files in _Binaries/Output/Release_Windows_ to _Binaries/Output/Release_Linux_. Call it after any change in _Binaries/Output/Release_Windows_.
|
||||
- **GenerateAllDocs.[bat|sh]**: Call doxygen to generate all documentations into _docs_ folder.
|
||||
- **ExtractTranslations.[bat|sh]**: Create the _source.pot_ file containing the strings to be translated using [Crowdin](https://crowdin.com/project/gdevelop).
|
||||
- **ReleaseProcedure.bat**: this script compiles, generates documentation (see **GenerateAllDocs.bat**) and packages GDevelop for Windows in an installer and an archive.
|
||||
- **ReleaseProcedure.sh**: compiles and packages GD for Ubuntu (see _Binaries/Packaging_).
|
||||
- **CopyWindowsToLinuxReleaseFiles.sh**: Copies all files in _Binaries/Output/Release_Windows_ to _Binaries/Output/Release_Linux_. Call it after any change in _Binaries/Output/Release_Windows_.
|
||||
- **GenerateAllDocs.[bat|sh]**: Calls doxygen to generate all documentation into _docs_ folder.
|
||||
- **ExtractTranslations.[bat|sh]**: Creates the _source.pot_ file containing the strings to be translated using [Crowdin](https://crowdin.com/project/gdevelop).
|
||||
|
Reference in New Issue
Block a user