Skip to content

Instantly share code, notes, and snippets.

During the past days, this great article by Sam Pruden has been making the rounds around the gamedev community. While the article provides an in-depth analysis, its a bit easy to miss the point and exert the wrong conclusions from it. As such, and in many cases, users unfamiliar with Godot internals have used it points such as following:

  • Godot C# support is inefficient
  • Godot API and binding system is designed around GDScript
  • Godot is not production ready

In this brief article, I will shed a bit more light about how the Godot binding system works and some detail on the Godot

@apsun
apsun / build.gradle.kts
Last active May 10, 2024 14:17
Documented build.gradle for publishing an Android library to Maven Central
// This is a documented version of the build.gradle file from RemotePreferences:
// https://github.com/apsun/RemotePreferences/blob/master/library/build.gradle.kts
//
// It aims to explain exactly WTF is going on when you inevitably copy-paste
// someone's build.gradle from the internet and can't figure out why it's not
// working.
//
// It contains, to the best of my knowledge, the best practices as of Oct 2023 for
// building an Android library and publishing it to OSSRH (Maven Central).
//
let you chek "github.com/shipofsea/IntelliJ-IDEA-2020.2.1-solve"
@mattyellen
mattyellen / UnityAsyncOperationAwaiter.cs
Created July 26, 2020 19:36
Allows the use of async/await (instead of yield) with any Unity AsyncOperation
public static class ExtensionMethods
{
public static TaskAwaiter GetAwaiter(this AsyncOperation asyncOp)
{
var tcs = new TaskCompletionSource<object>();
asyncOp.completed += obj => { tcs.SetResult(null); };
return ((Task)tcs.Task).GetAwaiter();
}
}
#!/bin/bash
# README: A more updated version is on the comments by (ashmna)[https://gist.github.com/ashmna]
# See at: https://gist.github.com/allangarcia/938b052a7d55d1652052e4259364260b?permalink_comment_id=4265898#gistcomment-4265898
# this is for tools required
brew update
brew install ninja
brew install cmake
@Treeki
Treeki / TurnipPrices.cpp
Last active April 5, 2024 13:55
AC:NH turnip price calculator
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
// munged from https://github.com/simontime/Resead
namespace sead
{
class Random
{
@trashbyte
trashbyte / 1_notes.md
Last active December 20, 2020 22:04
Mass importing pixel font glyphs into FontForge

First, you'll need separate images for each glyph, with transparent backgrounds. Each file should have a name matching its character, e.g. a.png. Depending on the format your font is in, this could be pretty tedious. Don't worry, this is the worst part.

Once you have your font images, you'll run pixel2svg on them. You could run it on every image in a directory with something like this:

for f in imgfolder/*.png; do python pixel2svg.py $f; done

Then you should have an svg for each glyph. Open FontForge and create a new font. Choose File > Execute Script and paste in the following:

@stevedonovan
stevedonovan / shared.rs
Created April 14, 2017 13:49
An ergonomic way of saying Rc<RefCell>
use std::rc::Rc;
use std::cell::{RefCell,Ref, RefMut};
use std::ops::Deref;
use std::fmt;
#[derive(Clone)]
struct Shared<T> {
v: Rc<RefCell<T>>
}
@kibotu
kibotu / javadoc.gradle
Last active May 25, 2021 21:10
Gradle generate javadoc for Android.
// build a jar with source files
task sourcesJar(type: Jar) {
from android.sourceSets.main.java.srcDirs
classifier = 'sources'
}
task javadoc(type: Javadoc) {
failOnError false
source = android.sourceSets.main.java.sourceFiles
@cachapa
cachapa / gif_creator.sh
Last active April 1, 2022 12:07
Shell script to generate high-quality animated gifs from a video file
#!/bin/bash
# Based on http://blog.pkh.me/p/21-high-quality-gif-with-ffmpeg.html
# Requires ffmpeg
filename="${1%.*}"
palette="/tmp/palette.png"
filters="scale=320:-1:flags=lanczos"
ffmpeg -v warning -i "$1" -vf "$filters,palettegen" -y $palette
ffmpeg -v warning -i "$1" -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y "$filename.gif"