Giter Site home page Giter Site logo

godotentitas's Introduction

Godot with Entitas and Zenject

godot-entitas-zenject

Godot proof of concept test project with external C# plugins created mainly for Unity:

  • Entitas - ECS framework (v1.14.1)
  • Zenject - dependency injection framework (v9.1.0)

Installation notes

Entitas

  • Download Entitas.zip and Jenny.zip.
  • Create new folder Entitas inside your Godot project and extract Entitas.zip inside it.
  • Extract Jenny.zip directly to to the root of your project.
  • Make sure to create C# project and solution of your project. You can do it by creating a C# script inside Godot.
  • In your .csproj add references to the following .dll files:
    • Entitas\DesperateDevs\DesperateDevs.Caching.dll
    • Entitas\DesperateDevs\DesperateDevs.Extensions.dll
    • Entitas\DesperateDevs\DesperateDevs.Reflection.dll
    • Entitas\DesperateDevs\DesperateDevs.Serialization.dll
    • Entitas\DesperateDevs\DesperateDevs.Threading.dll
    • Entitas\Entitas\Entitas.dll
    • Entitas\Entitas\Entitas.CodeGeneration.Attributes.dll
    • In Rider you can do it by right clicking on your project > Add > Add reference....
  • Run console command dotnet Jenny\Jenny.Generator.Cli.dll in the root folder to generate Jenny.properties.
  • Edit Jenny.properties:
    • Add Jenny and Entitas\Entitas paths to the Jenny.SearchPaths.
    • Set Jenny.Plugins.ProjectPath with your .csproj file.
    • Set Jenny.Plugins.TargetDirectory to Generated or any other folder where you want your generated files to be placed.
    • Set Entitas.CodeGeneration.Plugins.Contexts to your needs.
  • To generate code use command dotnet Jenny\Jenny.Generator.Cli.dll gen.
    • If you run into some generation errors try removing Generated folder first.
    • Use shell script _JennyGenerateScript.sh to do it automatically.
  • If you run in some other issues, check out godot-entitas-template repo by Guendeli.

Zenject

  • Download [email protected].
  • Create folder Zenject and extract .dll files there.
  • Add references to all the Zenject .dll files in your csproj.

Project notes

Check out Game/MainScene.tscn and Game/Sources folder for the example setup. In Game/Sources/Core you can find ports of the Unity Zenject scripts and an Entitas controller.

Caution

This setup worked on Windows and I haven't tried building the project yet.

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.