Skip to content

Instantly share code, notes, and snippets.

@pfirsich
pfirsich / tweakables_v2.lua
Created February 22, 2015 20:25
Second incarnation of the tweakable-system in SudoHack
local tweakables = {}
function tweak(defaultVal, name)
if not tweakables[name] then tweakables[name] = defaultVal end
return tweakables[name]
end
local fileList = {}
function buildFileList(dir, includeDirs)
local lfs = love.filesystem
@pfirsich
pfirsich / tweakLoader.lua
Created February 22, 2015 20:26
Package loader for tweakables without "name"-argument, discarded for SudoHack
do
local compiler = function(filename, codeString)
local counter = 0
filename = filename:gsub("\\", "/")
codeString = codeString:gsub("func%(",
function()
counter = counter + 1
return 'func("' .. filename .. "_" .. tostring(counter) .. '"'
end)
print(codeString)
@pfirsich
pfirsich / GitHub Atom shortcuts
Last active August 29, 2015 14:16
A reminder of the Atom shortcuts I think are the most useful (and I will print out and put beside my computer)
Important:
ctrl+shift+p - everything
ctrl+t - fuzzy file opener (alternative: ctlr+b - search open files)
ctrl+, - settings
ctrl+f - search
ctrl+shift+f - search entire project
esc - close search pane
ctrl+r - search symbols in current file
@pfirsich
pfirsich / sudohack_changelog.md
Last active August 29, 2015 14:16
Changelog for SudoHack (see http://theshoemaker.de/) (primarily for me, but also for anyone interested in the game). Most of the older messages are not as descriptive and may be strange.

SudoHack Changelog

Unreleased

Added

  • Bullets make a sound when they hit a wall
  • Image gets color shifted, desaturated and noisy if player has too few bits
  • Added doors
  • Player names (non-editable yet)
  • "Tutorial rooms" - very short, stripped down rooms, which aim to make certain game play concepts/mechanics clear
  • A way to choose input type at the start of the program
  • A lot more maps
@pfirsich
pfirsich / MERA.py
Created May 5, 2015 15:52
"Simulation"/"exploration" script for determining prefactors for calculations done by a friend
import re
import sys
from collections import defaultdict
class Node:
def __init__(self, string, parent = None):
self.string = string
self.parent = parent
self.children = []
@pfirsich
pfirsich / autoexec.cfg
Last active January 15, 2021 07:53
CS:GO autoexec.cfg
// Launch options: -console -novid -threads 4 -high -nojoy
echo " ___ _ _ ___ _
echo " |_ | | |( ) / _ \ | | "
echo " | | ___ ___ | ||/ ___ / /_\ \ _ _ | |_ ___ ___ __ __ ___ ___ "
echo " | | / _ \ / _ \| | / __| | _ || | | || __| / _ \ / _ \\ \/ / / _ \ / __|"
echo "/\__/ /| (_) || __/| | \__ \ | | | || |_| || |_ | (_) || __/ > < | __/| (__ "
echo "\____/ \___/ \___||_| |___/ \_| |_/ \__,_| \__| \___/ \___|/_/\_\ \___| \___|"
echo ""
echo "Saved in <Steam Library>\SteamApps\common\Counter-Strike Global Offensive\csgo\cfg"
@pfirsich
pfirsich / practice.cfg
Last active October 22, 2015 22:32
CS:GO practice config
sv_cheats 1
bot_kick
bot_stop 1
mp_autokick 0
mp_freezetime 0
mp_roundtime 60
mp_roundtime_defuse 60
mp_roundtime_hostage 60
mp_limitteams 0
@pfirsich
pfirsich / entry_mirage_A_ramp.cfg
Created August 29, 2015 13:17
Helper script/config to make entry fragging practice configs (placing bots in common spots to practice clearing a site). Included example output config for de_mirage A site from ramp.
mp_respawn_on_death_ct 1
bot_stop 1
say Please execute bot_kick before executing this file. 10 bots will be placed
bot_add_ct
bot_add_ct
bot_add_ct
bot_add_ct
bot_add_ct
@pfirsich
pfirsich / radiopanel.txt
Created September 13, 2015 13:22
Custom radio panels (used in conjunction with my autoexec) for CS:GO. Found in csgo/resource/ui. It's a little messy, since toggle, incrementvar, exec and some other commands are prohibited from being executed from a radio command.
"RadioPanel.txt"
{
//"SFUI_StandardRadio"
//"SFUI_GroupRadio"
//"SFUI_ReportRadio"
"Groups"
{
"standard"
{
@pfirsich
pfirsich / spacewalk.lua
Created November 5, 2015 23:02
Simple example of an entity type description file for Screwdriver (shown in my blog). The beginning for a hypothetical full remake of Spacewalk.
entityTypes["levelGeometry"] = {
label = "Level geometry",
components = {
{
id = "core",
componentType = "Core", -- every entity type has to have a core component
},
{
id = "transforms",
componentType = "Transforms",