Skip to content

Instantly share code, notes, and snippets.

@jmdejong
jmdejong / linkworlds.md
Created February 15, 2018 20:42
design of linkworlds game(s)

Linkworlds (WIP name) is a tildetown project to link several games together and pass player data around.

Let's say that there are different rooms. Each room is it's own independent webpage.

A player can move and play within a room, and when entering some kind of portal, the player goes to another room, giving that room the current player data.

Example setup (pseudo-javascript):

@jmdejong
jmdejong / evilcadastre.md
Created February 19, 2018 19:03
Evil Cadastre concept rules

Evil Cadastre concept rules

This is the idea I had for a turn based strategy game for tilde.town

It is just a concept and I would love some feedback on this idea! Tell me if anything here wou not make the game fun, is too complicated, or has other problems. Also tell me if you have suggestions that would make the game more fun (and not too complicated).

General

$ ./LINUX_INSTALL.sh
Checking python3 is installed: YES
Checking pip3 is installed: YES
Checking PyInstaller is installed: YES
Installing Dependencies...
Collecting git+https://github.com/pyqtgraph/pyqtgraph (from -r requirements.txt (line 5))
Cloning https://github.com/pyqtgraph/pyqtgraph to /tmp/pip-req-build-nrvnx_yq
Requirement already satisfied (use --upgrade to upgrade): pyqtgraph==0.11.0.dev0+g51b3201 from git+https://github.com/pyqtgraph/pyqtgraph in /home/troido/.local/lib/python3.7/site-packages (from -r requirements.txt (line 5))
Requirement already satisfied: numpy==1.16.2 in /home/troido/.local/lib/python3.7/site-packages (from -r requirements.txt (line 1)) (1.16.2)
Requirement already satisfied: PyOpenGL==3.1.0 in /usr/lib/python3.7/site-packages (from -r requirements.txt (line 2)) (3.1.0)
{
"speakers":["player","npc"],
"dialog":[
{"speaker": "npc", "text":"Hello"},
{"speaker": "npc", "text":"Can I help you?"},
{"speaker": "player", "label":"ask", "text":"", "choice": {
"Who are you?": "who",
"How are you?": "how",
"I need money!": "money",
"I want weapons!": "weapons",
speakers: [player, npc]
dialog:
-
speaker: npc
text: Hey there
choice:
"[Give dead rat]": trade
"Hello": hello
-
label: hello
# mainloop pseudopython
while True:
for character in room.characters:
Queue unhandled_actions
unhandled_actions.push(character.decide_action())
while unhandled_actions not empty:
action = unhandled_actions.pop()
execute(action)
for reaction in get_reactions(action):
/usr/bin/ld: lib/libgeogram.a(process.cpp.o): in function `(anonymous namespace)::OMPThreadManager::run_concurrent_threads(std::vector<GEO::SmartPointer<GEO::Thread>, std::allocator<GEO::SmartPointer<GEO::Thread> > >&, unsigned int)':
process.cpp:(.text+0xa7): undefined reference to `GOMP_parallel'
/usr/bin/ld: lib/libgeogram.a(process.cpp.o): in function `(anonymous namespace)::OMPThreadManager::~OMPThreadManager()':
process.cpp:(.text+0x104): undefined reference to `omp_destroy_lock'
/usr/bin/ld: lib/libgeogram.a(process.cpp.o): in function `(anonymous namespace)::OMPThreadManager::~OMPThreadManager()':
process.cpp:(.text+0x134): undefined reference to `omp_destroy_lock'
/usr/bin/ld: lib/libgeogram.a(process.cpp.o): in function `(anonymous namespace)::OMPThreadManager::run_concurrent_threads(std::vector<GEO::SmartPointer<GEO::Thread>, std::allocator<GEO::SmartPointer<GEO::Thread> > >&, unsigned int) [clone ._omp_fn.0]':
process.cpp:(.text+0x2fc): undefined reference to `GOMP_loop_nonmonotonic_dynamic_start'
// helper function for counting the number of adjacent mines
// This is a function of one argument that returns a function of one argument
// This is actually an interesting syntax to make curryable functions in javascript
f=i=>x=>s+=(c[i+x]|0)+(c[i-x]|0);
// board size
// The board is actually one column wider to prevent edge wrapping
// this variable will be used to know how many fields should be cleared before you won
m=256;
for(i=272;i--;)
{
# macros that translate directly to builtin commands (but know the amount of arguments)
!putchar(c){c .putchar}
!putint(i){i .putint}
!add(a b){a b .add}
!mult(a b){a b .mult}
!mod(a b){a b .div}
!mod(a b){a b .mod}
!exit(code){code .exit}
@jmdejong
jmdejong / kill_sticky.js
Created August 7, 2021 19:26
Remove sticky elements on a webpage
javascript:(function()%7B(function%20()%20%7Bvar%20i%2C%20elements%20%3D%20document.querySelectorAll(%27body%20*%27)%3Bfor%20(i%20%3D%200%3B%20i%20%3C%20elements.length%3B%20i%2B%2B)%20%7Blet%20style%20%3D%20getComputedStyle(elements%5Bi%5D)%3B%20if%20(style.position%20%3D%3D%3D%20%27fixed%27%20%7C%7C%20style.position%20%3D%3D%3D%20%27sticky%27)%20%7Belements%5Bi%5D.parentNode.removeChild(elements%5Bi%5D)%3B%7D%7D%7D)()%7D)()