Skip to content

Instantly share code, notes, and snippets.

@rostok
rostok / caves-21.p8
Created September 21, 2025 17:31
Caverns of the Souleater
pico-8 cartridge // http://www.pico-8.com
version 43
__lua__
-- "Caverns of the Souleater"
-- Father told you these caverns hold a great treasure. But all you've found are endless tunnels and venomous snakes. As your torch burns low, you wonder if the gold was ever real. And why he didn't share this with your brother?!
-- compress code into rom with v1.2.5c shrinko8 --input-count -c -m -oc -f tiny-rom caves-20.p8 caves-20.rom
-- RENDERMAP should output grid that creates a full map, use image magick to stich it
-- magick map-*.png -transpose miff:- | magick montage - -tile 5x9 -geometry +0+0 miff:- | magick - -transpose miff:- | magick - caves-map.png
@rostok
rostok / heat-signature-24.p8
Created September 9, 2024 18:44
heat signature pico1k 2024 jam game source
pico-8 cartridge // http://www.pico-8.com
version 42
__lua__
-- "Heat signature"
-- You hide behind the rubble and watch the kid, who listens for drones. Vigilant, focused, and obedient; not curious or joyful like kids used to be. Was it worth it, leaving a broken homeland? The border is close, just one more push. Just avoid the machines.
--
-- game by rostok / @von_rostok / rostok.itch.io
--
-- O all objects,
-- x,y pos
@rostok
rostok / imdb-names.ubichr.js
Created August 25, 2024 21:13
imdb-names command for UbiChr
// UbiChr 'imdb-names' command
CmdUtils.CreateCommand({
name:"imdb-names",
description:"Searches for actors on IMDb",
author:{},
icon:"http://www.imdb.com/favicon.ico",
homepage:"",
license:"",
preview:async function define_preview(pblock, {text: text}) {
pblock.innerHTML = "Searches for movies on IMDb";
@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