ShadowApex / godot-go

Go language bindings for the Godot Engine's GDNative API.
MIT License
363 stars 31 forks source link

Update API & convert.go to 3.0_stable (fixes Pong example) #33

Closed worrel closed 6 years ago

worrel commented 6 years ago

Addresses #31

I pulled 3.0_stable branch & generated a fresh godot_api.json & ran generate.sh. Fixed 2 methods in convert.go that referred to now-missing methods. I'm not 100% the fixes are correct (my C knowledge is v minimal).

With these changes the pong example now launches w/o error. However, I did notice that uncommenting some of the debugging log statements in there causes segfaults - in particular Node.GetName() and Object.GetClass() don't work. Haven't had time to debug if that's related to the string changes I made.

Also, due to the security changes to go get in go1.9.4 I had to build like this (I'm on OSX):

CGO_LDFLAGS_ALLOW="-Wl,-undefined,dynamic_lookup" go build ...etc..

BTW I'm super excited to have found this library. I was mucking about trying to figure out how to do this with Go the last few weeks & I was starting to give up.

ShadowApex commented 6 years ago

Thanks @worrel !

I worked on these bindings for a while, then was waiting for the stable release of Godot 3.0, because there was a lot of API changes when I was trying to get it to work. Now that it's been released, I guess it's time to work on these more!

If you have any questions about anything, let me know! I'm also on the Godot Discord channel pretty often in the gdnative room.