Skip to content

Instantly share code, notes, and snippets.

@rostok
rostok / the-wall-builder-14-explained.p8
Created September 7, 2023 18:01
source code for the wall builder - a pico8 game under 1kb
pico-8 cartridge // http://www.pico-8.com
version 41
__lua__
-- The Wall Builder - a Pico1k 2023 jam entry by https://rostok.itch.io/ @von_rostock
pal({2,-8,8,14},1) -- sets the palette gradient for bricks
local x,y,l,P,Q,T,X,Y,c=61,72.5,0,0,0,0,0 -- variables
-- x,y person position on screen
-- l if 1 then person holds brick 0 doesn't
-- P,Q coordinates of current area, start area is 0,0
-- T 1/4th brick counter, if equals N wall is raised
@rostok
rostok / Javascript Date toLocaleDateString formats.js
Created February 21, 2023 17:02
debug-popup command for UbiChr
af-ZA : 2023-02-21
am-ET : 21/2/2023
ar-AE : 21‏/2‏/2023
ar-BH : ٢١‏/٢‏/٢٠٢٣
ar-DZ : 21‏/2‏/2023
ar-EG : ٢١‏/٢‏/٢٠٢٣
ar-IQ : ٢١‏/٢‏/٢٠٢٣
ar-JO : ٢١‏/٢‏/٢٠٢٣
ar-KW : ٢١‏/٢‏/٢٠٢٣
ar-LB : ٢١‏/٢‏/٢٠٢٣
@rostok
rostok / dehydrated-explained.p8
Created September 8, 2022 17:43
source code for dehydrated - a pico8 game under 1kb
pico-8 cartridge // http://www.pico-8.com
version 37
__lua__
-- Dehydrated - a Pico1k 2022 jam entry by https://rostok.itch.io/ @von_rostock
-- as the original code was heavily compressed here is the unpacked source with a brief description of what's going on
D={}E={} -- D E tables hold x and y global position values for wind dust particles, there are 129 dust particles in total
K={} -- K L M tables store map data, they are linear with total length of 128x310 it's hard to explain how they are organized
-- since tiles are of isometric shape. however basic address is expression is v+310*u with u/v being cell coordinates
-- K table hold compacted tile information
-- bits 1-4 represent height (value range 0..15), with 0 being water, and 1+ being sand
@rostok
rostok / google-drive-search.ubichr.js
Created November 3, 2021 23:50
google-drive-search command for UbiChr
// UbiChr 'drive-search' command
CmdUtils.makeSearchCommand({
name: ["drive-search","gdrive"],
description: "Google Drive search.",
icon: "https://ssl.gstatic.com/docs/doclist/images/infinite_arrow_favicon_5.ico",
url: "https://drive.google.com/drive/u/0/search?q={QUERY}",
prevAttrs: {zoom: 0.7, backgroundColor:'white', scroll: [250, 0]},
});
@rostok
rostok / plwikipedia.ubichr.js
Created October 21, 2021 17:33
plwikipedia command for UbiChr
// UbiChr 'plwikipedia' command
CmdUtils.CreateCommand({
name:"plwikipedia",
description:"Search Polish Wikipedia for the given words",
author:{},
icon:"http://pl.wikipedia.org/favicon.ico",
homepage:"",
license:"",
preview:function wikipedia_preview(previewBlock, args) {
var args_format_html = "Polish";
@rostok
rostok / napiprojekt2.py
Created September 23, 2019 22:01
poprawiony lekko skrypt do kradzieży napisow
#!/usr/bin/python
# script downloads subtitles from napiprojekt
#
# reversed napi 0.16.3.1
#
# by gim,krzynio,dosiu,hash 2oo8.
# last modified: 6-I-2oo8
# 4pc0h f0rc3
#
# 20190923 rostok
@rostok
rostok / gard-grass-1.p8
Created September 4, 2019 20:48
Initial version of "Evening summer breeze" tweetcart
pico-8 cartridge // http://www.pico-8.com
version 16
__lua__
-- make it 400 bytes long
k={1,2,4,8,9,10,7}
-- k={9,9,9,9,10,10,7}
-- k={0,5,6,7,15,14,8,2,4,9,10,11,3,12,13}
-- k={0,0,0,0,0,1,1,1,1,12,12,7}
-- k={5,6,15,9,7}
s=sin