Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to help? #2

Open
NickSeagull opened this issue Jun 5, 2018 · 7 comments
Open

How to help? #2

NickSeagull opened this issue Jun 5, 2018 · 7 comments

Comments

@NickSeagull
Copy link

Hey there, thanks for the initiative! 😄

I've recently discovered Godot and liked the fact that it can support native libraries.
Given that I'm a Haskeller, I'm really hyped by these repos you have made.

I saw that they are somehow recent, and I'd like to help setting this up in some of my free time.
I could help setting up a tintin documentation website (An example here and here).

What would be the first steps to use the plugin and these bindings?

Thanks again!

@KaneTW
Copy link
Collaborator

KaneTW commented Jun 5, 2018

Hi! The libraries are still an in-progress thing, and only very vaguely usable. Once I support the nativescript parts of Godot, they'll be actually usable.

Areas that need improvement are:

  • Tidying up the code generator
  • Adding docs from the Godot XML to the generated stuff
  • Making docs and usage examples

I'm currently at Lambdaconf, so it'll be a bit before I can finish up the API. Feel free to hang out in the SimulaVR gitter. I estimate around one-two weeks until these are in an alpha stage.

Thanks a lot for your interest!

@KaneTW
Copy link
Collaborator

KaneTW commented Jun 5, 2018

I can type up some examples in a bit. WiFi on my laptop isn't working for some reason right now.

@NickSeagull
Copy link
Author

Great, thanks! I'm trying to use it for the basic examples of Godot, but I'm not really sure how to include it. Any pointers? 😅

@KaneTW
Copy link
Collaborator

KaneTW commented Jun 6, 2018

Right now some extremely important things aren't available in a comfortable fashion.

There's basically a 1:1 mapping in Godot.Gdnative.Internal, but:

  • you need to know how to do low-level C stuff to fill the GDNative structs
  • there's some funky stuff with instance methods and calling conventions

Ideally just wait for a bit for me to get the high-level API finished. If you want to try out the low-level stuff anyways:

  • fill the various needed structs such as GodotInstanceCreateFunc etc (which is going to be a lot of FFI stuff)
  • call godot_nativescript_register_class/method/...
  • use the low-level API to interact with "base types", and the higher-level API to interact with stuff from the Godot docs.

There should be a relatively close correspondence with C for the low-level API, but it's not very Haskelly. Functions like type InstanceMethodFun = Ptr GodotVariant -> GodotObject -> Ptr () -> Ptr () -> CInt -> Ptr (Ptr GodotVariant) -> IO (Ptr GodotVariant) are how I have to represent struct godot_variant returns, and you need to write the GodotVariant into the first pointer, then return that pointer. Lots of stuff that can be abstracted out relatively easily, though.

@NickSeagull
Copy link
Author

Great, thanks! 😄

@juanjoman
Copy link

juanjoman commented Jun 7, 2018

HI! I would like to help to grow this up, with XML do you refer to docs about this? http://docs.godotengine.org/en/3.0/classes/class_xmlparser.html

@NickSeagull
Copy link
Author

I think that @KaneTW refers to the documentation of the classes and/or methods. What you pointed out @J2RGEZ is a class that Godot has to parse XML files :)

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

No branches or pull requests

3 participants