Skip to content

Instantly share code, notes, and snippets.

View lemilonkh's full-sized avatar

Milan Gruner lemilonkh

View GitHub Profile
@lemilonkh
lemilonkh / ControlsData.gd
Created October 22, 2023 07:53
Godot 4 Controls Manager
class_name ControlsData extends Resource
@export var controls: Dictionary = {}
@lemilonkh
lemilonkh / AudioManager.gd
Last active July 27, 2023 07:16
Adaptive audio players (made for Godot 3.5 during Godot Wild Jam 49)
extends Node2D
# Meant to be used as an autoload singleton
const player_count = 32
const bus = "Effects"
const sound_folder = "res://sounds/"
const queue_limit = 64
var available_players = []
@lemilonkh
lemilonkh / privacy_policy.html
Created August 22, 2022 22:13
Pixel Garden Privacy Policy
<h1>Privacy Policy</h1>
<p>Last updated: August 22, 2022</p>
<p>This Privacy Policy describes Our policies and procedures on the collection, use and disclosure of Your information when You use the Service and tells You about Your privacy rights and how the law protects You.</p>
<p>We use Your Personal data to provide and improve the Service. By using the Service, You agree to the collection and use of information in accordance with this Privacy Policy. This Privacy Policy has been created with the help of the <a href="https://www.freeprivacypolicy.com/free-privacy-policy-generator/" target="_blank">Free Privacy Policy Generator</a>.</p>
<h1>Interpretation and Definitions</h1>
<h2>Interpretation</h2>
<p>The words of which the initial letter is capitalized have meanings defined under the following conditions. The following definitions shall have the same meaning regardless of whether they appear in singular or in plural.</p>
<h2>Definitions</h2>
<p>For the purposes of this Privacy Policy:</p>
<ul>
@lemilonkh
lemilonkh / Player.gd
Created February 17, 2021 09:02
Hookstronaut's Player Controller
extends GravityBody
class_name Player
export(float, 0, 50) var jetpack_force = 2
export(float, 0, 10) var grappling_hook_length = 50
export(float, 0, 10) var grappling_hook_force = 20
export(float, 0, 50) var mouse_sensitivity = 0.002 # rad/px
export(float, 0, 10) var controller_look_speed = 0.08
var current_planet: RigidBody
@lemilonkh
lemilonkh / parse_molecule.py
Last active June 16, 2018 13:28
Parse molecule descriptions
#!/usr/bin/python3
from ply import lex
import ply.yacc as yacc
# data storage class for parsed groups of ELEMENT and COUNT
class Atom:
def __init__(self, element, count):
self.element = element
self.count = count
@lemilonkh
lemilonkh / camera.lua
Created May 30, 2018 12:09
Milan's magic shaky cam
local camera = {x = 0, y = 0, scaleX = 1, scaleY = 1, rotation = 0, trauma = 0}
local util = require "src.util"
local settings = require "src.settings"
function camera:set()
local shakeOffsetX, shakeOffsetY, shakeAngle = self:getScreenShake()
love.graphics.push()
love.graphics.rotate(self.rotation + shakeAngle)
love.graphics.scale(self.scaleX, self.scaleY)
@lemilonkh
lemilonkh / brainmachine.c
Created November 7, 2011 11:41
Br4inM4chin3 2.0
// The Br4inM4chin3
// (c) 2011 by Milan Gruner
// Original version (c) by Mitch Altman for MakeMagazine
// chip frequency
#define F_CPU 8000000
#include <avr/io.h> // this contains all the IO port definitions
#include <util/delay.h> // for delays
#include <avr/interrupt.h> // definitions for interrupts
@lemilonkh
lemilonkh / hexamin.c
Created October 6, 2011 19:09
Hexamin - An air controlled synthesizer
// hexamin.c
// (c) 2011 by Milan Gruner
// designed for ATmega8
#define F_CPU 8000000L
#include <avr/io.h>
#include <avr/interrupt.h>
#include <util/delay.h>
@lemilonkh
lemilonkh / index.html
Created October 31, 2010 12:39
Le Milonkh's jQuery plugin for displaying clouds on a website.
<!DOCTYPE html>
<!-- http://twitter.com/lemilonkh -->
<html>
<head>
<title>Clouds</title>
<meta type="content-encoding" content="UTF-8" />
<script src="jquery.js" type="text/javascript"></script>
<script src="jquery.clouds.js" type="text/javascript"></script>
<script type="text/javascript">
$(function() {