diff --git a/bashit/.bashit.scoreboard b/bashit/.bashit.scoreboard new file mode 100644 index 0000000..d65116a --- /dev/null +++ b/bashit/.bashit.scoreboard @@ -0,0 +1,10 @@ +10 Anonymous +0 Anonymous +0 anonymous +0 anonymous +0 anonymous +0 anonymous +0 anonymous +0 anonymous +0 anonymous +0 anonymous diff --git a/bottleblaster/bottleblaster.lua b/bottleblaster/bottleblaster.lua deleted file mode 100644 index 2587144..0000000 --- a/bottleblaster/bottleblaster.lua +++ /dev/null @@ -1,189 +0,0 @@ --- Store operating system commands in a variable. -function os.capture(cmd, raw) - local f = assert(io.popen(cmd, 'r')) - local s = assert(f:read('*a')) - f:close() - if raw then - return s - end - s = string.gsub(s, '^%s+', '') - s = string.gsub(s, '%s+$', '') - s = string.gsub(s, '[\n\r]+', ' ') - return s -end - --- Speak with appropriate tool. -local function speak(text) - if os.capture("uname") == "Linux" then - os.execute('spd-say "' .. text .. '"') - else - os.execute('say "' .. text .. '"') - end -end - --- Window related variables. -local gameName = "Bottle Blaster" - -local SDL = require "SDL" -local mixer = require "SDL.mixer" -local ret, err = SDL.init { SDL.flags.Video } -if not ret then - error(err) -end - -local function trySDL(func, ...) - local t = { func(...) } - - if not t[1] then - error(t[#t]) - end - - return table.unpack(t) -end - -local function exit_game(SDL, mixer) - SDL.quit() - mixer.quit() - return false -end - -local win, err = SDL.createWindow { - title = gameName, - width = 320, - height = 320 -} - -if not win then - error(err) -end - -trySDL(mixer.openAudio, 44100, SDL.audioFormat.S16, 2, 1024) --- Load all game sounds here: --- Format: local variableName = trySDL(mixer.loadWAV, "path/to/file") --- Supported file types flac, ogg, wav -local bottle = -{ - trySDL(mixer.loadWAV, "sounds/glass1.ogg"), - trySDL(mixer.loadWAV, "sounds/glass2.ogg"), - trySDL(mixer.loadWAV, "sounds/glass3.ogg") -} -local gun = -{ - trySDL(mixer.loadWAV, "sounds/gun1.ogg"), - trySDL(mixer.loadWAV, "sounds/gun2.ogg"), - trySDL(mixer.loadWAV, "sounds/gun3.ogg"), - trySDL(mixer.loadWAV, "sounds/gun4.ogg"), - trySDL(mixer.loadWAV, "sounds/gun5.ogg") -} -local empty = trySDL(mixer.loadWAV, "sounds/empty.ogg") -local load = {} -load[3] = trySDL(mixer.loadWAV, "sounds/load3.ogg") -load[4] = trySDL(mixer.loadWAV, "sounds/load3.ogg") -load[5] = trySDL(mixer.loadWAV, "sounds/load5.ogg") - -local function play_sound(sound, channel, loop) - channel = channel or -1 - loop = loop or 0 - sound:playChannel(channel, loop) -end - -local function play_at_location(sound, xPosition, yPosition) - channel = channel or -1 - loop = loop or 0 - xPosition = xPosition or 0 - yPosition = yPosition or 0 - mixer.SetPanning(-1, 255, 127) - sound:playChannel(-1, 0) -end - -local function game_intro() - local sound = trySDL(mixer.loadWAV, "sounds/game-intro.ogg") -sound:playChannel(-1, 0) - while mixer.playing(-1) > 0 do - SDL.delay(100) - end -end - --- Game variables -local direction = "" -local holdKey = {} -local keyName = "" -local loaded = true -local playerPosition = math.random(0, 30) -local running = true -local weapon = 1 - --- game functions. -local function player_move(position, direction) - if direction == "Left" and position > 0 then - position = position - 1 - end - if direction == "Right" and position < 30 then - position = position + 1 - end - return position -end - -game_intro() --- Main game loop. -while running do - -- Need a timer to make holding arrows move at a slower speed. for player_move() - playerPosition = player_move(playerPosition, direction) - -- Iterate over all events, this function does not block. - for e in SDL.pollEvent() do - if e.type == SDL.event.KeyUp then --chrys just recognice the keyup and free the loop - keyName = SDL.getKeyName(e.keysym.sym) - holdKey[keyName] = false - direction = "" - -- speak(playerPosition) - end - if e.type == SDL.event.Quit then - running = false - elseif e.type == SDL.event.KeyDown and not holdKey[keyName] then -- chrysif not already down ( see below) - keyName = SDL.getKeyName(e.keysym.sym) - holdKey[keyName] = true --chrys mark the remember the keydown - if keyName == "Q" then - running = exit_game(SDL, mixer) - elseif keyName == "Left Shift" or keyName == "Right Shift" then - if weapon >= 3 and loaded == false then - -- Need to not allow firing until loading is complete. - play_sound(load[weapon]) - end - loaded = true - elseif keyName == "Space" then - if loaded == true then - play_sound(gun[weapon]) - play_sound(bottle[math.random(1, #bottle)]) - else - play_sound(empty) - end - if weapon >= 3 then - loaded = false - end - elseif keyName == "Left" or keyName == "Right" then - direction = keyName - elseif tonumber(keyName) == nil then -- make sure keyName can be converted to a number for remaing if statements to avoid a crash. - keyName = "0" - elseif tonumber(keyName) >= 1 and tonumber(keyName) <= 5 then - weapon = tonumber(keyName) - if weapon >= 3 then - loaded = false - else - loaded = true - end - if weapon == 1 then - speak("pistal") - elseif weapon == 2 then - speak("beretta") - elseif weapon == 3 then - speak("boomstick shotgun") - elseif weapon == 4 then - speak("pump action shotgun") - elseif weapon == 5 then - speak("bo and arrow") - end - end - end - end -end - diff --git a/bottleblaster/sounds/bottle.ogg b/bottleblaster/sounds/bottle.ogg deleted file mode 100644 index d107835..0000000 Binary files a/bottleblaster/sounds/bottle.ogg and /dev/null differ diff --git a/bottleblaster/sounds/empty.ogg b/bottleblaster/sounds/empty.ogg deleted file mode 100644 index a18f5be..0000000 Binary files a/bottleblaster/sounds/empty.ogg and /dev/null differ diff --git a/bottleblaster/sounds/game-intro.ogg b/bottleblaster/sounds/game-intro.ogg deleted file mode 100644 index dc372e9..0000000 Binary files a/bottleblaster/sounds/game-intro.ogg and /dev/null differ diff --git a/bottleblaster/sounds/glass1.ogg b/bottleblaster/sounds/glass1.ogg deleted file mode 100644 index 8a6a183..0000000 Binary files a/bottleblaster/sounds/glass1.ogg and /dev/null differ diff --git a/bottleblaster/sounds/glass2.ogg b/bottleblaster/sounds/glass2.ogg deleted file mode 100644 index 5507c91..0000000 Binary files a/bottleblaster/sounds/glass2.ogg and /dev/null differ diff --git a/bottleblaster/sounds/glass3.ogg b/bottleblaster/sounds/glass3.ogg deleted file mode 100644 index 8698ebf..0000000 Binary files a/bottleblaster/sounds/glass3.ogg and /dev/null differ diff --git a/bottleblaster/sounds/gun1.ogg b/bottleblaster/sounds/gun1.ogg deleted file mode 100644 index b9fbf3e..0000000 Binary files a/bottleblaster/sounds/gun1.ogg and /dev/null differ diff --git a/bottleblaster/sounds/gun2.ogg b/bottleblaster/sounds/gun2.ogg deleted file mode 100644 index 41ca37d..0000000 Binary files a/bottleblaster/sounds/gun2.ogg and /dev/null differ diff --git a/bottleblaster/sounds/gun3.ogg b/bottleblaster/sounds/gun3.ogg deleted file mode 100644 index 87de4f1..0000000 Binary files a/bottleblaster/sounds/gun3.ogg and /dev/null differ diff --git a/bottleblaster/sounds/gun4.ogg b/bottleblaster/sounds/gun4.ogg deleted file mode 100644 index 52953b3..0000000 Binary files a/bottleblaster/sounds/gun4.ogg and /dev/null differ diff --git a/bottleblaster/sounds/gun5.ogg b/bottleblaster/sounds/gun5.ogg deleted file mode 100644 index d05e1e1..0000000 Binary files a/bottleblaster/sounds/gun5.ogg and /dev/null differ diff --git a/bottleblaster/sounds/load3.ogg b/bottleblaster/sounds/load3.ogg deleted file mode 100644 index af7819c..0000000 Binary files a/bottleblaster/sounds/load3.ogg and /dev/null differ diff --git a/bottleblaster/sounds/load4.ogg b/bottleblaster/sounds/load4.ogg deleted file mode 100644 index af7819c..0000000 Binary files a/bottleblaster/sounds/load4.ogg and /dev/null differ diff --git a/bottleblaster/sounds/load5.ogg b/bottleblaster/sounds/load5.ogg deleted file mode 100644 index 0ff00a4..0000000 Binary files a/bottleblaster/sounds/load5.ogg and /dev/null differ diff --git a/game-menu.sh b/game-menu.sh index 06ef8b1..cd49c43 100755 --- a/game-menu.sh +++ b/game-menu.sh @@ -21,6 +21,8 @@ done) --stdout)" if [[ "$game" != "exit" && -n "$game" ]]; then cd "${gameList[$game]}" ./$game"" +echo +read -n1 -p "Press any key to continue" continue else break fi diff --git a/pybottle/bottle-blaster.py b/pybottle/bottle-blaster.py deleted file mode 100755 index c9b8f8f..0000000 --- a/pybottle/bottle-blaster.py +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/python -# -*- coding: utf-8 -*- -# Shoot the bottles as fast as possible. - -from storm_games import * - -sounds = initialize_gui("Bottle Blaster") - -# loop forever (until a break occurs) -while True: - # wait for an event - event = pygame.event.wait() - # if the event is about a keyboard button that have been pressed... - if event.type == pygame.KEYDOWN: - sounds['bottle'].play(-1) - speak("This is a test.") - if event.type == pygame.KEYUP: - sounds['bottle'].stop() - # and if the button is the "q" letter or the "escape" key... - if event.key == pygame.K_ESCAPE: - # ... then exit from the while loop - break - time.sleep(.001) diff --git a/pybottle/sounds/bottle.ogg b/pybottle/sounds/bottle.ogg deleted file mode 100644 index d107835..0000000 Binary files a/pybottle/sounds/bottle.ogg and /dev/null differ diff --git a/pybottle/sounds/empty.ogg b/pybottle/sounds/empty.ogg deleted file mode 100644 index a18f5be..0000000 Binary files a/pybottle/sounds/empty.ogg and /dev/null differ diff --git a/pybottle/sounds/game-intro.ogg b/pybottle/sounds/game-intro.ogg deleted file mode 100644 index dc372e9..0000000 Binary files a/pybottle/sounds/game-intro.ogg and /dev/null differ diff --git a/pybottle/sounds/glass1.ogg b/pybottle/sounds/glass1.ogg deleted file mode 100644 index 8a6a183..0000000 Binary files a/pybottle/sounds/glass1.ogg and /dev/null differ diff --git a/pybottle/sounds/glass2.ogg b/pybottle/sounds/glass2.ogg deleted file mode 100644 index 5507c91..0000000 Binary files a/pybottle/sounds/glass2.ogg and /dev/null differ diff --git a/pybottle/sounds/glass3.ogg b/pybottle/sounds/glass3.ogg deleted file mode 100644 index 8698ebf..0000000 Binary files a/pybottle/sounds/glass3.ogg and /dev/null differ diff --git a/pybottle/sounds/gun1.ogg b/pybottle/sounds/gun1.ogg deleted file mode 100644 index b9fbf3e..0000000 Binary files a/pybottle/sounds/gun1.ogg and /dev/null differ diff --git a/pybottle/sounds/gun2.ogg b/pybottle/sounds/gun2.ogg deleted file mode 100644 index 41ca37d..0000000 Binary files a/pybottle/sounds/gun2.ogg and /dev/null differ diff --git a/pybottle/sounds/gun3.ogg b/pybottle/sounds/gun3.ogg deleted file mode 100644 index 87de4f1..0000000 Binary files a/pybottle/sounds/gun3.ogg and /dev/null differ diff --git a/pybottle/sounds/gun4.ogg b/pybottle/sounds/gun4.ogg deleted file mode 100644 index 52953b3..0000000 Binary files a/pybottle/sounds/gun4.ogg and /dev/null differ diff --git a/pybottle/sounds/gun5.ogg b/pybottle/sounds/gun5.ogg deleted file mode 100644 index d05e1e1..0000000 Binary files a/pybottle/sounds/gun5.ogg and /dev/null differ diff --git a/pybottle/sounds/load3.ogg b/pybottle/sounds/load3.ogg deleted file mode 100644 index af7819c..0000000 Binary files a/pybottle/sounds/load3.ogg and /dev/null differ diff --git a/pybottle/sounds/load4.ogg b/pybottle/sounds/load4.ogg deleted file mode 100644 index af7819c..0000000 Binary files a/pybottle/sounds/load4.ogg and /dev/null differ diff --git a/pybottle/sounds/load5.ogg b/pybottle/sounds/load5.ogg deleted file mode 100644 index 0ff00a4..0000000 Binary files a/pybottle/sounds/load5.ogg and /dev/null differ diff --git a/pybottle/storm_games.py b/pybottle/storm_games.py deleted file mode 100755 index a72c20d..0000000 --- a/pybottle/storm_games.py +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/python -# -*- coding: utf-8 -*- -"""Standard initializations and functions shared by all games.""" - -from espeak import espeak -import os -from os import listdir -from os.path import isfile, join -import pygame -import time - -def speak(text, interupt = True): - if interupt == True: espeak.cancel() - espeak.set_voice("en-us") - espeak.synth(text) - -def initialize_gui(gameTitle): - # start pygame - pygame.init() - # start the display (required by the event loop) - pygame.display.set_mode((320, 200)) - pygame.display.set_caption(gameTitle) - # Load sounds from the sound directory and creates a list like that {'bottle': 'bottle.ogg'} - soundFiles = [f for f in listdir("sounds/") if isfile(join("sounds/", f)) and (f.split('.')[1].lower() in ["ogg","wav"])] - #lets make a dict with pygame.mixer.Sound() objects {'bottle':} - soundData = {} - for f in soundFiles: - soundData[f.split('.')[0]] = pygame.mixer.Sound("sounds/" + f) - return soundData diff --git a/soundboard/soundboard b/soundboard/soundboard deleted file mode 100755 index c0f60e4..0000000 --- a/soundboard/soundboard +++ /dev/null @@ -1,19 +0,0 @@ -#!/bin/bash - -if [ $# -ne 1 ] ; then - echo "Usage: soundboard name, where name is the name of a soundboard you want to load." - exit 1 -fi - -if ! [ -d sounds/$1 ] ; then - echo "soundboard $1 not found." - exit 1 -fi - -while [ 1 -gt 0 ] ; do -read -sn1 key -if [ -f sounds/$1/$key.ogg ] ; then -play -qV0 sounds/$1/$key.ogg& -fi -done -exit 0 diff --git a/soundboard/sounds/drums/c.ogg b/soundboard/sounds/drums/c.ogg deleted file mode 100644 index d7f077f..0000000 Binary files a/soundboard/sounds/drums/c.ogg and /dev/null differ diff --git a/soundboard/sounds/drums/d.ogg b/soundboard/sounds/drums/d.ogg deleted file mode 100644 index 934decc..0000000 Binary files a/soundboard/sounds/drums/d.ogg and /dev/null differ diff --git a/soundboard/sounds/drums/e.ogg b/soundboard/sounds/drums/e.ogg deleted file mode 100644 index c3b8b18..0000000 Binary files a/soundboard/sounds/drums/e.ogg and /dev/null differ diff --git a/soundboard/sounds/drums/f.ogg b/soundboard/sounds/drums/f.ogg deleted file mode 100644 index 90e5852..0000000 Binary files a/soundboard/sounds/drums/f.ogg and /dev/null differ diff --git a/soundboard/sounds/drums/i.ogg b/soundboard/sounds/drums/i.ogg deleted file mode 100644 index 88560aa..0000000 Binary files a/soundboard/sounds/drums/i.ogg and /dev/null differ diff --git a/soundboard/sounds/drums/j.ogg b/soundboard/sounds/drums/j.ogg deleted file mode 100644 index ec4dc7a..0000000 Binary files a/soundboard/sounds/drums/j.ogg and /dev/null differ diff --git a/soundboard/sounds/drums/k.ogg b/soundboard/sounds/drums/k.ogg deleted file mode 100644 index 4efad24..0000000 Binary files a/soundboard/sounds/drums/k.ogg and /dev/null differ diff --git a/soundboard/sounds/drums/l.ogg b/soundboard/sounds/drums/l.ogg deleted file mode 100644 index 13c664b..0000000 Binary files a/soundboard/sounds/drums/l.ogg and /dev/null differ diff --git a/soundboard/sounds/drums/o.ogg b/soundboard/sounds/drums/o.ogg deleted file mode 100644 index 7b6a6b7..0000000 Binary files a/soundboard/sounds/drums/o.ogg and /dev/null differ diff --git a/soundboard/sounds/drums/q.ogg b/soundboard/sounds/drums/q.ogg deleted file mode 100644 index 2e11482..0000000 Binary files a/soundboard/sounds/drums/q.ogg and /dev/null differ diff --git a/soundboard/sounds/drums/r.ogg b/soundboard/sounds/drums/r.ogg deleted file mode 100644 index a0f3bb2..0000000 Binary files a/soundboard/sounds/drums/r.ogg and /dev/null differ diff --git a/soundboard/sounds/drums/t.ogg b/soundboard/sounds/drums/t.ogg deleted file mode 100644 index 48e1a4b..0000000 Binary files a/soundboard/sounds/drums/t.ogg and /dev/null differ diff --git a/soundboard/sounds/drums/u.ogg b/soundboard/sounds/drums/u.ogg deleted file mode 100644 index d29f074..0000000 Binary files a/soundboard/sounds/drums/u.ogg and /dev/null differ diff --git a/soundboard/sounds/drums/v.ogg b/soundboard/sounds/drums/v.ogg deleted file mode 100644 index d7f077f..0000000 Binary files a/soundboard/sounds/drums/v.ogg and /dev/null differ diff --git a/soundboard/sounds/drums/w.ogg b/soundboard/sounds/drums/w.ogg deleted file mode 100644 index 8aa925d..0000000 Binary files a/soundboard/sounds/drums/w.ogg and /dev/null differ diff --git a/soundboard/sounds/drums/y.ogg b/soundboard/sounds/drums/y.ogg deleted file mode 100644 index f0c6110..0000000 Binary files a/soundboard/sounds/drums/y.ogg and /dev/null differ diff --git a/soxsynth/soxsynth b/soxsynth/soxsynth index 5013357..7706c06 100755 --- a/soxsynth/soxsynth +++ b/soxsynth/soxsynth @@ -255,6 +255,9 @@ noteLength="0.75" ;; "=") noteLength="1.00" +;; +$'\e') +exit 0 esac if [ "$instrument" == "12" ] ; then play -qn -V0 synth pl ${note}$(($octave + 1)) pl ${note}${octave} delay 0 0.02 remix - $effect fade 0 $noteLength vol $volume &> /dev/null & diff --git a/zombie-dice/sounds/Running sound effect.webm b/zombie-dice/sounds/Running sound effect.webm deleted file mode 100644 index f156513..0000000 Binary files a/zombie-dice/sounds/Running sound effect.webm and /dev/null differ diff --git a/zombie-dice/sounds/brain.ogg b/zombie-dice/sounds/brain.ogg deleted file mode 100644 index 12303c0..0000000 Binary files a/zombie-dice/sounds/brain.ogg and /dev/null differ diff --git a/zombie-dice/sounds/die.ogg b/zombie-dice/sounds/die.ogg deleted file mode 100644 index 5c26a91..0000000 Binary files a/zombie-dice/sounds/die.ogg and /dev/null differ diff --git a/zombie-dice/sounds/intro.ogg b/zombie-dice/sounds/intro.ogg deleted file mode 100644 index f75a475..0000000 Binary files a/zombie-dice/sounds/intro.ogg and /dev/null differ diff --git a/zombie-dice/sounds/lose_turn.ogg b/zombie-dice/sounds/lose_turn.ogg deleted file mode 100644 index 3432b19..0000000 Binary files a/zombie-dice/sounds/lose_turn.ogg and /dev/null differ diff --git a/zombie-dice/sounds/runner.ogg b/zombie-dice/sounds/runner.ogg deleted file mode 100644 index b382e25..0000000 Binary files a/zombie-dice/sounds/runner.ogg and /dev/null differ diff --git a/zombie-dice/sounds/shotgun.ogg b/zombie-dice/sounds/shotgun.ogg deleted file mode 100644 index 7db77f4..0000000 Binary files a/zombie-dice/sounds/shotgun.ogg and /dev/null differ diff --git a/zombie-dice/zombie-dice b/zombie-dice/zombie-dice deleted file mode 100755 index 6d5aaaf..0000000 --- a/zombie-dice/zombie-dice +++ /dev/null @@ -1,72 +0,0 @@ -#!/bin/bash - -check_dependancies() -{ - if [ $# -eq 0 ] ; then - if [[ $(bash --version | head -n 1 | cut -f 1 -d "." | tr -d "[:alpha:]") < "4" ]] ; then - echo "This game requires bash version 4 or higher. Earlier versions may not be able to successfully run this code." - fi - if ! hash sox &> /dev/null ; then - echo "The program sox is required but does not appear to be installed on your system. Please install sox and try -again." - exit 1 - fi - fi - for i in $@ ; do - if ! hash $i &> /dev/null ; then - echo "The program $i is required but does not appear to be installed on your system. Please install $i and try -again." - exit 1 - fi - done -} - -initialize_players() -{ - i=1 - while [ $i -le $1 ] ; do - player[$i]=0 - let i++ - done -} - -play_sound() -{ -play -qV0 sounds/$@ -} - -check_dependancies -check_dependancies rolldice -#get terminal width -columns=$(tput cols) -play_sound intro.ogg -#find out how many players there are -if [ $# -gt 1 ] ; then - echo "Usage: $0 or $0 number of players." - exit 1 -fi -if [ $# -eq 1 ] ; then - if ! [[ "$1" =~ ^[0-9]+$ ]] ; then - echo "The number of players must be a number, 2 or greater." - exit 1 - fi - if [ $1 -lt 2 ] ; then - echo "The number of players must be a number, 2 or greater." - exit 1 - fi - totalPlayers=$1 -else - totalPlayers=2 - cpu=true -fi -initialize_players $totalPlayers -#determine who goes first. -playerIndex=$(rolldice 1d${#player[@]}) -while [ $playerIndex -gt 0 ] ; do - score_keeper $playerIndex - let playerIndex++ - if [ $playerIndex -gt ${#player[@]} ] ; then - playerIndex=1 - fi -done -exit 0