Skip to content

Instantly share code, notes, and snippets.

View bitmammoth's full-sized avatar

Terrence Conrad bitmammoth

  • DaEarf
View GitHub Profile
@bitmammoth
bitmammoth / MaterialValuesCopier.cs
Created October 26, 2022 23:16 — forked from twobob/MaterialValuesCopier.cs
Convert With One Click a set of UMA overlays - Into HDRP - via the HDRP convertor. Requires the HDRP
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;
using System.Collections;
using UMA;
public class MaterialValuesCopier : ScriptableObject
{
[MenuItem("HDmyUMA/ SELECT A FOLDER THAT CONTAINS (OR WHOSE SUBFOLDERs CONTAINS) ALL THE OverlayDataAssets TO CONVERT")]
@bitmammoth
bitmammoth / build-templates.sh
Created January 31, 2021 08:01 — forked from need12648430/build-templates.sh
A script to build Godot export templates.
#!/bin/bash
export EMSCRIPTEN_ROOT=[path containing em++, emsdk-portable/emscripten/*]
export ANDROID_HOME=[path to android sdk, usually /home/*/Android/Sdk]
export ANDROID_NDK_ROOT=[path to android ndk, likely $ANDROID_HOME/ndk-bundle]
X11_DEBUG=false
X11_RELEASE=false
WIN_DEBUG=false
WIN_RELEASE=false
@bitmammoth
bitmammoth / gist:bccc4ae7fea06ab120bda4b066e01562
Created December 31, 2020 06:06 — forked from mohapsat/gist:7379401
rotating circle in shell script
## --> rotating circle from characters
# --> from http://stackoverflow.com/questions/10470139/creating-rotating-circle-using-characters-in-shell-script
while sleep 1; do
i=$((++i%4 + 2));
printf '\b|/-\' | cut -b 1,$i | tr -d '\n';
done
@bitmammoth
bitmammoth / Area2D_Player_Move
Created December 31, 2020 06:06 — forked from mohapsat/Area2D_Player_Move
[scaffold] Area2D - Player movement
extends Area2D
export var speed = 400
var screensize
var velocity = Vector2()
func _ready():
@bitmammoth
bitmammoth / Kinematics2D_Player_Movement
Created December 31, 2020 06:06 — forked from mohapsat/Kinematics2D_Player_Movement
Kinematics2D_Player_Movement
extends KinematicBody2D
onready var sprite = get_node("sprite")
const UP = Vector2(0, -1)
const GRAVITY = 20
const ACCELARATION = 50
const MAX_SPEED = 400
const JUMP_HEIGHT = -500
const FRICTION = 0.1
@bitmammoth
bitmammoth / parallax_bg_godot3
Created December 31, 2020 06:06 — forked from mohapsat/parallax_bg_godot3
ParallaxBg_Godot3
To get that ParallaxBackground working:
1. Create a ParallaxBackground node. (It doesn't need to be a child of the Camera2D node, but making it a child of the Camera2D node won't break it either)
2. Create a ParallaxLayer node as a child of the ParallaxBackground.
3. Add your sprite as a child of the ParallaxLayer node and make sure Centered is off.
4. Go back to the ParallaxLayer node.
5. Under Motion, set Mirroring to the size of your sprite (in the case of the Sky sprite, 640x640).
6. Under Motion, fiddle with the Scale setting. This is how fast that ParallaxLayer will move in relation to the camera. I found (0.1, 0.1) to be a good starting point for something like a sky.
7. Run your game, and you should have a background that infinitely loops and also has a parallax effect.
@bitmammoth
bitmammoth / godot generating_a_scene_tree_dynamically
Created December 31, 2020 06:06 — forked from mohapsat/godot generating_a_scene_tree_dynamically
Godot - GraphEdits, GraphNodes, and PopupMenus at runtime
# Ref : https://www.reddit.com/r/godot/comments/7bi5uf/generating_a_scene_tree_dynamically/
# Create a root Node and name is DynamicNodeGraph
extends Node
var RootNode
var SomeGraphEdit
var SomePopupMenu
var SomePopupMenuVisible = false
var RMBPressed = false
@bitmammoth
bitmammoth / instance scenes from array vars
Created December 31, 2020 06:02 — forked from mohapsat/instance scenes from array vars
[Godot 3] instance scenes from array vars
# Create 2 scenes 0.tscn and 1.tscn
# Add a Node and call it main
# Add script as below to main
extends Node
var scenes = [0,1]
func _ready():
# randomize()
@bitmammoth
bitmammoth / .block
Created January 11, 2018 01:48
TechanJS Plots
license: mit
@bitmammoth
bitmammoth / .block
Last active January 29, 2018 09:51
Pan & Zoom Axes
license: mit