Skip to content

Instantly share code, notes, and snippets.

View danielytics's full-sized avatar
🚰

Dan Kersten danielytics

🚰
  • Dublin, Ireland
View GitHub Profile
@danielytics
danielytics / install scons
Last active May 5, 2019 16:47
Code snippets for "Using C++ and GDNative in Godot 3" tutorial
brew install scons
@danielytics
danielytics / clone dependency repos
Last active March 13, 2018 11:58
Code snippets for "Using C++ and GDNative in Godot 3" tutorial
git clone https://github.com/GodotNativeTools/godot_headers
git clone https://github.com/GodotNativeTools/godot-cpp
@danielytics
danielytics / generate sources and compile godot-cpp
Last active March 13, 2018 11:57
Code snippets for "Using C++ and GDNative in Godot 3" tutorial
scons godotbinpath="/Applications/Godot.app/Contents/MacOs/Godot" platform=osx use_llvm=yes
@danielytics
danielytics / changing install locations
Last active March 13, 2018 11:58
Code snippets for "Using C++ and GDNative in Godot 3" tutorial
GODOT_HEADERS=path to godot_headers
CPP_BINDINGS=path to cpp-godot
@danielytics
danielytics / simple.cpp
Created March 13, 2018 00:29
Code snippets for "Using C++ and GDNative in Godot 3" tutorial
#include <core/Godot.hpp>
#include <Reference.hpp>
#include <core/String.hpp>
#include <core/Array.hpp>
using namespace godot;
class Simple : public GodotScript<Reference> {
GODOT_CLASS(Simple);
public:
@danielytics
danielytics / SConstruct
Last active March 13, 2018 20:09
Code snippets for "Using C++ and GDNative in Godot 3" tutorial
#!python
import os
# platform= makes it in line with Godots scons file, keeping p for backwards compatibility
platform = ARGUMENTS.get("p", "linux")
platform = ARGUMENTS.get("platform", platform)
target_arch = ARGUMENTS.get('a', ARGUMENTS.get('arch', '64'))
# This makes sure to keep the session environment variables on windows,
# that way you can run scons in a vs 2017 prompt and it will find all the required tools
@danielytics
danielytics / compiling
Last active March 13, 2018 00:49
Code snippets for "Using C++ and GDNative in Godot 3" tutorial
scons platform=osx use_llvm=yes
@danielytics
danielytics / Main.gd
Created March 13, 2018 01:19
Code snippets for "Using C++ and GDNative in Godot 3" tutorial
extends Node
func _ready():
var simple = load("res://simple.gdns").new()
simple.say(simple.hello("World"))
@danielytics
danielytics / project directory structure
Last active March 19, 2018 14:05
Code snippets for "Using C++ and GDNative in Godot 3" tutorial, Part 2
tutorial root directory/
├── playerlib/
│ └── src/
└── playerdemo/
└── libs/
@danielytics
danielytics / SConstruct
Last active March 19, 2018 14:07
Code snippets for "Using C++ and GDNative in Godot 3" tutorial, Part 2
#!python
import os
# platform= makes it in line with Godots scons file, keeping p for backwards compatibility
platform = ARGUMENTS.get("p", "linux")
platform = ARGUMENTS.get("platform", platform)
target_arch = ARGUMENTS.get('a', ARGUMENTS.get('arch', '64'))
# This makes sure to keep the session environment variables on windows,
# that way you can run scons in a vs 2017 prompt and it will find all the required tools