GDevelop

repository·master·Indexed 12 days ago

https://github.com/4ian/gdevelop

An open-source, no-code game development platform for creating 2D, 3D, and multiplayer games across mobile, desktop, and web. The ecosystem includes GDevelop Core, a portable C++ library compiled for JavaScript, and various extensions for physics (including Jolt Physics 0.30.0), Firebase integration, and dialogue management via bondage.js.

Tokens
52.4K
Snippets
126
Records
208
Agent score
98%

What's inside GDevelop

  1. Use Jfxr to edit sound effects in GDevelop

    master

    GDevelop embeds the Jfxr editor (https://github.com/ttencate/jfxr) to allow users to create and edit sound effects directly within the IDE.

    To use this feature, GDevelop utilizes a bridge mechanism that opens an external editor window and handles data transfer between the GDevelop environment and the Jfxr editor. The integration is managed through several key components:

    • Editor Execution: jfxr-main.js contains the logic for running the editor.
    • Data Bridge: The communication between GDevelop and the Jfxr window is handled by LocalExternalEditorWindow.js, LocalResourceExternalEditors.js, and BrowserResourceExternalEditors.js. These files manage opening the window and passing sound data to the editor.
  2. Use Yarn Editor for Dialogue Trees in GDevelop

    master

    GDevelop embeds the Yarn editor (https://github.com/YarnSpinnerTool/YarnEditor) to allow developers to create and edit Dialogue Trees directly within the IDE.

    To use this feature, GDevelop utilizes a bridge mechanism that opens an external editor window and handles data transfer between the GDevelop engine and the Yarn editor. The integration is managed through several key components:

    • yarn-main.js: Contains the core logic for running the editor.
    • Bridge Files: The following files manage the communication bridge that opens the editor window and passes data from GDevelop to Yarn:
      • LocalExternalEditorWindow.js
      • LocalResourceExternalEditors.js
      • BrowserResourceExternalEditors.js
  3. License for GDevelop extensions

    master
    GDevelop extensions are licensed under the MIT License. This allows you to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the software, provided that the original copyright notice and permission notice are included in all copies or substantial portions of the software.
  4. Understand the GDevelop Architecture: Core, GDJS, and Extensions

    master

    GDevelop's architecture is divided into several distinct layers that separate the development environment from the game execution engine:

    • Core (Core): A C++ library used to describe and manipulate the structure of a game (the Project). It contains the definitions for scenes, objects, behaviors, and events.
    • Game Engine (GDJS): A TypeScript-based engine powered by PixiJS (WebGL) that executes the game logic at runtime.
    • Extensions (Extensions): Modular additions that provide new objects, behaviors, events, and features to the engine.
    • GDevelop.js: A bridge layer that uses Emscripten to allow the JavaScript-based IDE to interact with C++ code from the Core library via WebAssembly.
    • IDE (newIDE): The actual editor application, built with React, Electron, and PixiJS, which utilizes all the above libraries.
  5. What is GDevelop Core

    master

    GDevelop Core is the central library responsible for handling games, building platforms, managing extensions, and providing tools for the GDevelop ecosystem. It serves as the foundation for both the GDevelop editor and the game engine itself.

    Technically, it is a portable C++ library that is compiled to be used within JavaScript environments, enabling high performance within the editor and web-based platforms.

  6. How third-party editors are integrated into GDevelop

    master

    GDevelop bundles third-party editors within the newIDE/app/public/external/ directory. These editors are typically integrated into the IDE using specific import scripts located in the app/scripts folder, following a naming convention such as import-XXX-editor.js (where XXX represents the specific editor name).

    When working with these editors or adding new ones, ensure the following requirements are met for ES Modules compatibility:

    1. Lowercase filenames: All files must be in lowercase.
    2. Protocol usage: Use the gdide:// protocol to ensure the Electron environment can properly serve the ES modules.
  7. Understand the Platformer Jump Trajectory Model

    master

    The GDevelop Platformer extension uses a piece-wise polynomial model for character movement rather than strict physical laws. This model uses Verlet integration for fast sequential access and allows for more 'fun' than realistic physics.

    Core Speed Components

    The engine tracks two independent speeds:

    1. currentJumpSpeed: An absolute speed value. While it is treated as an absolute value, it is visualized as a negative value that is subtracted from the falling speed. It stays at its initial value during the jumpSustainTime, then decreases according to gravity until it reaches 0.
    2. currentFallSpeed: Starts at 0 and increases according to gravity as soon as the jump starts, until it reaches maxFallingSpeed and remains constant.

    Trajectory Phases (Piece-wise Function)

    The character's trajectory is determined by three critical time borders:

    • jumpSustainTime: The end of the jump sustaining phase.
    • maxFallingTime: When the character reaches maxFallingSpeed.
    • jumpEndTime: When the currentJumpSpeed reaches 0.

    Depending on how these borders relate, the trajectory follows different mathematical cases (sustain, common, max falling, gliding, affine, or free fall).

  8. Understand the Firebase Extension structure

    master

    The Firebase Extension for GDevelop is a wrapper around the Firebase SDK. It is organized into two main components:

    1. firebasejs: Contains the standard Firebase Web SDK.
    2. firebasetools: Contains specific wrappers designed to integrate Firebase functionality with GDevelop.

    Import Priority: To ensure correct dependency loading, files within the extension are prefixed with letters to indicate their import order:

    • A_ (Highest priority)
    • B_
    • C_
    • D_ (Lowest priority)