Skip to content

Instantly share code, notes, and snippets.

View colinbellino's full-sized avatar

Colin Bellino colinbellino

View GitHub Profile
@colinbellino
colinbellino / godot_build.cs
Created January 8, 2024 22:58
Quick way to replace the version in project.godot file
using System;
using System.IO;
// Build and run: `csc.exe /out:godot_build.exe /target:exe godot_build.cs && ./godot_build.exe`
public class Bar {
static void Main(string[] args) {
var version = "9.9.9";
var file_path = "project.godot";
var lines = File.ReadAllLines(file_path);
@colinbellino
colinbellino / build_and_deploy.sh
Last active February 2, 2024 00:14
Simple Godot build and deploy script
godot --headless --export-debug 'Windows' ./builds/Windows/game.exe
butler push ./builds/Windows colinbellino/game_name:win
godot --headless --export-debug 'Linux' ./builds/Linux/game
butler push ./builds/Linux colinbellino/game_name:linux
godot --headless --export-debug 'Mac' ./builds/Mac/game.app
butler push ./builds/Mac/builds/Linux colinbellino/game_name:linux
godot --headless --export-debug 'Web' ./builds/Web/index.html
@colinbellino
colinbellino / unique_array.js
Created October 19, 2022 14:39
Performance test to compare different ways to extract the unique items from a big array (in JavaScript)
const input = Array(7_000_000)
.fill("")
.map((_) => Math.floor(Math.random() * 5));
main();
function main() {
const count = 1000;
console.log("Running %d iterations", count);
run_test("FOR ", unique_with_for, count);
func move_cursor(direction: Vector3):
var gridmap := Globals.gridmap_node # Specific to my codebase, ignore
var cursor_position := Globals.state.cursor_position # Specific to my codebase, ignore
var next_position := cursor_position
var bound_max_x := 10
var bound_min_x := 0
var bound_max_z := 10
var bound_min_z := 0
@colinbellino
colinbellino / gamedev-resources.md
Last active September 26, 2020 14:33
Game dev resources

Design:

Programming:

@colinbellino
colinbellino / SampleTest.cs
Last active June 22, 2020 00:57
Unity Integration Tests Example. (full project: https://github.com/colinbellino/UnityIntegrationTestsExample)
using System.Collections;
using NUnit.Framework;
using UnityEngine;
using UnityEngine.TestTools;
using Zenject;
public class SampleTest : SceneTestFixture
{
[UnityTest]
public IEnumerator MovesAroundTheLevel()
@colinbellino
colinbellino / podcasts.md
Last active February 15, 2018 13:24
A list of podcasts i like to listen to (tech, game design, music and more).

Podcasts

This is a curated list of podcasts i'm following, primarily game design, UI, web development and other nerdy stuff.

Game design / dev

Lostcast

Game design, and HTML5 development.