4 ms·
Interesting. Each of the games is defined within a single json file¹ that's parsed by the game engine², with a scripting language³ of sorts mixed in. ¹) https:
by rednab 11y ago
Interesting. Each of the games is defined within a single json file¹ that's parsed by the game engine², with a scripting language³ of sorts mixed in.
¹) https://github.com/kesiev/Wright/tree/master/tapes https://github.com/kesiev/Wright/tree/master/tapes , look for tape.json in each of the subdirectories.
²) https://github.com/kesiev/Wright/blob/master/js/wright.js https://github.com/kesiev/Wright/blob/master/js/wright.js
³) For example, https://github.com/kesiev/Wright/blob/master/tapes/tentris/tape.json#L24 https://github.com/kesiev/Wright/blob/master/tapes/tentris/t...
- justifier 11y agowhen first i saw this post(o) i fleshed out a concept that did something similar the 'engine' in this case was a transpiler that took my scripting language and wrote, and compiled if necessary, code for complex algorithms with simple parts simultaneously into whatever languages i implemented it would do a lookup of an on disk copy of this document, ideally normalised but i only implemented two languages so the data was already agreeably normal, to determine how the output code should be implemented i only had it writing in python and c, doing: if statements, for and while loops, unoptimised typing, basic operators; before i realised i was having too much fun on altering the engine to tweak the resultant code than doing the algo work that i set out to do but each time i think 'i should look into such and such language', i muse on digging up that old commit as a fun aside, workaround to languages' different approaches to memory each of the output programs utilised an array as a faux stack that could handle object implements with an accompanying algo that could take the stack and read from or write to valid, though a subset of, json (o) http://rigaux.org/language-study/syntax-across-languages/ http://rigaux.org/language-study/syntax-across-languages/