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
bitbrain / DayNightCycle.gd
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
bitbrain / godot4_tilemap_tricks.gd
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 = TileSetAtlasSource.new()
source.texture = texture
source.texture_region_size = Vector2i(tile_size, tile_size)
source.create_tile(Vector2i(0, 0))
return tileset.add_source(source)
@bitbrain
bitbrain / fmod-gdextension-errors
Last active August 11, 2022 02:59
A few linker errors when trying to compile fmod gdextension
scons: Reading SConscript files ...
scons: done reading SConscript files.
scons: Building targets ...
link /nologo /WX /dll /out:bin\libGodotFmod.windows.release.64.dll /implib:bin\libGodotFmod.windows.release.64.lib /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 libgodot-cpp.windows.release.64.lib fmod_vc.lib fmodstudio_vc.lib src\godot_fmod.obj src\register_types.obj src\callback\event_callbacks.obj src\callback\file_callbacks.obj
libgodot-cpp.windows.release.64.lib(Variant.obj) : error LNK2005: "public: __cdecl godot::Variant::Variant(int)" (??0Variant@godot@@QEAA@H@Z) already defined in godot_fmod.obj
libgodot-cpp.windows.release.64.lib(Variant.obj) : error LNK2005: "public: __cdecl godot::Variant::Variant(unsigned int)" (??0Variant@godot@@QEAA@I@Z) already defined in godot_fmod.obj
libgodot-cpp.windows.release.64.lib(Variant.obj) : error LNK2005: "pu
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
bitbrain / config
Created April 23, 2019 16:51
A sample .git/config file
[core]
repositoryformatversion = 0
filemode = false
bare = false
logallrefupdates = true
ignorecase = true
[remote "origin"]
url = git@github.com:bitbrain/itch-i18n.git
fetch = +refs/heads/*:refs/remotes/origin/*
[remote "fork"]
/// <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;
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
[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 [http://nexus.k40s.net ]: com.sun.jersey.api.client.ClientHandlerException: javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path validation failed: java.security.cert.CertPathValidatorException: 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 'game.zip'
  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: itch.io API error: invalid key

What shall I do?

@bitbrain
bitbrain / output
Created January 14, 2014 12:14
Output of mono TheDungeoning.exe
$ 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/libpthread.so.0(+0xfcb0) [0x7f40e491bcb0]
/lib/x86_64-linux-gnu/libc.so.6(gsignal+0x35) [0x7f40e4582425]
/lib/x86_64-linux-gnu/libc.so.6(abort+0x17b) [0x7f40e4585b8b]