Skip to content

Instantly share code, notes, and snippets.

View bitbrain's full-sized avatar
Forging an RPG

miguel bitbrain

Forging an RPG
View GitHub Profile
bitbrain /
Last active October 17, 2023 17:12
A gd script implementing a day night cycle using maths only.
extends CanvasModulate
const NIGHT_COLOR = Color("#091d3a")
const DAY_COLOR = Color("#ffffff")
const EVENING_COLOR = Color("#ff3300")
const TIME_SCALE = 0.1
var time = 0
bitbrain /
Last active November 14, 2022 17:27
Godot 4 Tilemap tricks
## Registers a tile with the tilemap that can then be placed
## via tile_map.set_cell(layer_index, map_coord, tile_id, Vector2i(0, 0))
func register_tile_and_get_id(tile_map:TileMap, texture:Texture2D, tile_size:int) -> int:
var tileset = tile_map.tile_set
var source =
source.texture = texture
source.texture_region_size = Vector2i(tile_size, tile_size)
source.create_tile(Vector2i(0, 0))
return tileset.add_source(source)
bitbrain / fmod-gdextension-errors
Last active August 11, 2022 02:59
A few linker errors when trying to compile fmod gdextension
View fmod-gdextension-errors
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
link /nologo /WX /dll /out:bin\ /implib:bin\ /LIBPATH:C:\Users\Miguel\git\fmod-project\godot-cpp\bin /LIBPATH:C:\Users\Miguel\git\fmod-project\libs\fmod\windows\core\lib\x64 /LIBPATH:C:\Users\Miguel\git\fmod-project\libs\fmod\windows\studio\lib\x64 fmod_vc.lib fmodstudio_vc.lib src\godot_fmod.obj src\register_types.obj src\callback\event_callbacks.obj src\callback\file_callbacks.obj : error LNK2005: "public: __cdecl godot::Variant::Variant(int)" (??0Variant@godot@@QEAA@H@Z) already defined in godot_fmod.obj : error LNK2005: "public: __cdecl godot::Variant::Variant(unsigned int)" (??0Variant@godot@@QEAA@I@Z) already defined in godot_fmod.obj : error LNK2005: "pu
View PointerLockControls.js
THREE.PointerLockControls = function ( camera ) {
var scope = this;
camera.rotation.set( 0, 0, 0 );
var pitchObject = new THREE.Object3D();
pitchObject.add( camera );
var yawObject = new THREE.Object3D();
bitbrain / config
Created April 23, 2019 16:51
A sample .git/config file
View config
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
ignorecase = true
[remote "origin"]
url =
fetch = +refs/heads/*:refs/remotes/origin/*
[remote "fork"]
View AStar3D.cs
/// <summary>
/// Method that switfly finds the best path from start to end. Doesn't reverse outcome
/// </summary>
/// <returns>The end breadcrump where each .next is a step back)</returns>
private static BreadCrumb FindPathReversed(World world, Point3D start, Point3D end)
MinHeap<BreadCrumb> openList = new MinHeap<BreadCrumb>(256);
BreadCrumb[, ,] brWorld = new BreadCrumb[world.Right, world.Top, world.Back];
BreadCrumb node;
Point3D tmp;
View dafuq.xml
View gist:7046666424ef03645a03b136e28505ee
[ERROR] Failed to execute goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.3:deploy (injected-nexus-deploy) on project braingdx: Execution injected-nexus-deploy of goal org.sonatype.plugins:nexus-staging-maven-plugin:1.6.3:deploy failed: Nexus connection problem to URL [ ]: com.sun.jersey.api.client.ClientHandlerException: PKIX path validation failed: timestamp check failed: NotAfter: Tue May 16 10:22:00 UTC 2017 -> [Help 1]

Hi Amos, I'm currently implementing auto-deployment for a game. For this I wrote a deployment script which does the following:

  1. Build the game
  2. Zip it as ''
  3. Download butler executable
  4. Read itch API token from Environment and save it into temporary butler_creds file (set in Travis CI or locally)
  5. Login into butler via butler login -i "butler_creds"
  6. Itch IO claims: API error: invalid key

What shall I do?

bitbrain / output
Created January 14, 2014 12:14
Output of mono TheDungeoning.exe
View output
$ sudo mono TheDungeoningDemo0_6.exe
* Assertion at domain.c:1499, condition `mono_defaults.monotype_class != 0' not met
Native stacktrace:
mono() [0x4916ba]
/lib/x86_64-linux-gnu/ [0x7f40e491bcb0]
/lib/x86_64-linux-gnu/ [0x7f40e4582425]
/lib/x86_64-linux-gnu/ [0x7f40e4585b8b]