Skip to content

Instantly share code, notes, and snippets.

View fire's full-sized avatar

K. S. Ernest (iFire) Lee fire

View GitHub Profile

Efficiently handling level/world partitioning in Godot Engine (ai assisted):

Here are the updated and consistently ranked definitions with the added point:

  1. Divide the Game World into Smaller Chunks: Split the game world into manageable sections, called cells or chunks, to improve performance and resource management.

  2. Add a "Use World Partition" Property to Node2D/Node3D: Create a property that allows you to specify whether an asset should be part of the world partition system or not.

  3. Map Assets' Global Positions to World Cells: Assign each asset to its corresponding world cell based on its global position within the game world.

/*
MIT License
Copyright (c) 2014-2022 Eron Gjoni
Copyright (c) 2019-2022 K. S. Ernest (iFire) Lee
Copyright (c) 2021 Rafael Martinez Gordillo.
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
@fire
fire / blender
Last active April 21, 2022 14:38
$ cat /usr/local/bin/blender
#!/usr/bin/env bash
/usr/bin/flatpak run org.blender.Blender "$@"
@fire
fire / 3d-formats.md
Created March 30, 2022 18:45 — forked from meshula/3d-formats.md
3d file formats, last mile vs. interchange
@fire
fire / clean_all_svgs.sh
Created March 27, 2022 14:46 — forked from j3j5/clean_all_svgs.sh
Apply SVG Cleaner to all the SVGs on a given folder
# https://github.com/RazrFalcon/svgcleaner/ must be installed
find . -type f -name "*.svg" | sudo xargs -I file svgcleaner file file
@fire
fire / gltf_merge_anim.py
Created March 3, 2022 07:07 — forked from scurest/gltf_merge_anim.py
Quick code to convert a glTF with multiple non-overlapping animations to one with a single animation.
#!/bin/env python
"""Merge mutiple glTF 2.0 animations into one."""
import json
import sys
def merge(gltf):
# Maps (node, path) to (input, output, interpolation)
target_to_sampler = {}
for animation in gltf.get('animations', []):
for channel in animation['channels']:
#
https://github.com/elixir-desktop/deployment
Get Erlang 24:diode/beta http://github.com/diodechain/
Get Elixir 1.11.4 https://elixir-lang.org/install.html
## Get msys2 https://www.msys2.org/ - And a whole bunch of deps: pacman -Syu pacman -S --noconfirm pacman-mirrors pkg-config pacman -S --noconfirm --needed base-devel autoconf automake make libtool mingw-w64-x86_64-toolchain mingw-w64-x86_64-openssl mingw-w64-x86_64-libtool git
// https://github.com/ERGO-Code/HiGHS/blob/master/examples/call_highs_from_cpp.cpp
//
// HiGHS is designed to solve linear optimization problems of the form
//
// Min (1/2)x^TQx + c^Tx + d subject to L <= Ax <= U; l <= x <= u
//
// where A is a matrix with m rows and n columns, and Q is either zero
// or positive definite. If Q is zero, HiGHS can determine the optimal
// integer-valued solution.
//
Id SepalLengthCm SepalWidthCm PetalLengthCm PetalWidthCm Species
1 5.1 3.5 1.4 0.2 Iris-setosa
2 4.9 3.0 1.4 0.2 Iris-setosa
3 4.7 3.2 1.3 0.2 Iris-setosa
4 4.6 3.1 1.5 0.2 Iris-setosa
5 5.0 3.6 1.4 0.2 Iris-setosa
6 5.4 3.9 1.7 0.4 Iris-setosa
7 4.6 3.4 1.4 0.3 Iris-setosa
8 5.0 3.4 1.5 0.2 Iris-setosa
9 4.4 2.9 1.4 0.2 Iris-setosa
@fire
fire / machine.js
Created November 18, 2021 05:14
Generated by XState Viz: https://xstate.js.org/viz
// Available variables:
// - Machine
// - interpret
// - assign
// - send
// - sendParent
// - spawn
// - raise
// - actions