Skip to content
This repository has been archived by the owner on Feb 10, 2023. It is now read-only.

Maybe move godot.core modules into godot module? #10

Open
al1-ce opened this issue Nov 5, 2022 · 3 comments
Open

Maybe move godot.core modules into godot module? #10

al1-ce opened this issue Nov 5, 2022 · 3 comments

Comments

@al1-ce
Copy link
Member

al1-ce commented Nov 5, 2022

Having this mishmash of "godot.c", "godot.core", "godot", "godot.d" modules really confuses if you don't know what is where.
Perhaps it'd be better to move most of them into general "godot" space so there'd be less confusion? Coz there's certainly wouldn't be any need for "godot.vector3" binding for example.

@Superbelko
Copy link
Collaborator

It definitely needs some reorganization.

Additionally I haven't touched it yet but produced bindings requires manually importing pretty much anything is used by that class, public imports should be used instead.

@al1-ce
Copy link
Member Author

al1-ce commented Nov 5, 2022

Actually if you could explain to me how the hell it all works I might step into development. Just can't figure out it on my own coz as you said "this project is a real mess for anyone else to dive in"

@Superbelko
Copy link
Collaborator

Ok, short intro

Features by packages:

  • godot.c - low level C stuff which by my understanding is purely for C ABI to make interop part happy.
  • godot.d - wrappers of godot.c for not doing bytes massaging in high level language
  • godot.core - mimics godot engine built-in types API somewhat like godot-cpp does
  • util.generator - a real mess!

Inside godot.d there is also register.d that does class registration with some help from script.d that wrap.d them in order to interact with godot engine and call its methods by using bind.d.

godot.d.bind is the main work horse, and basically all methods calls is done by ptrcall(), with some help from godot.core.variant

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants