A simple shader that takes a 1px tall png as a palette uniform (as you might download from lospec.com) and enforces that palette in screen space when applied to a ColorRect
.
I've moved this to its own repo here: https://github.com/kevinthompson/godot-generate-polygon-from-sprite-tool. Original gist is below.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- highscore | |
-- by @kevinthompson | |
_hs_chars="abcdefghijklmnopqrstuvwxyz " | |
_hs_max_records=10 | |
_hs_record_bytesize=5 | |
_hs_records={} | |
_hs_char_index=function(char) | |
for i=1,#_hs_chars do |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
-- Platformer Engine | |
-- by @kevinthompson | |
-- adapted from @enichan's platformer https://github.com/Enichan/Pico8Platformer | |
platformer={ | |
config={ | |
logfile="log", | |
precision=1, | |
tilesize=8, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
input = File.open('./input.txt').read.strip | |
class RecursiveString < String | |
def [](i) | |
if i >= length | |
super(i - length) | |
else | |
super(i) | |
end | |
end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
TWITTER_CONSUMER_KEY="" | |
TWITTER_CONSUMER_SECRET="" | |
TWITTER_SEARCH_STRING="#tedc15 -rt" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'open-uri' | |
require 'json' | |
## | |
# Add underscore method to string for simple JSON | |
# key manipulation. | |
class String | |
def underscore | |
self.gsub(/::/, '/'). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ./app/assets/javascripts/app.js.coffee | |
@App ||= {} | |
# ./app/assets/javascripts/app/view.js.coffee | |
class @App.View | |
@where: (params = { controller: null, action: null }) -> | |
controller = @_parseClassName(params.controller) | |
action = @_parseClassName(params.action) | |
try |
NewerOlder