3 ms·
I always found the parallel-arrays (or rather parallel-lists) structure of Dunnet aggravating. Isn't there a better textual representation for an adventure gam
by kragen 8y ago
I always found the parallel-arrays (or rather parallel-lists) structure of Dunnet aggravating. Isn't there a better textual representation for an adventure game map than this?
(setq dungeon-map '(
; no so ea we ne se nw sw up do in ot
( 96 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;0
( -1 -1 2 -1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;1
( -1 -1 3 1 -1 -1 -1 -1 -1 -1 -1 -1 ) ;2
( -1 -1 -1 2 4 6 -1 -1 -1 -1 -1 -1 ) ;3
( -1 -1 -1 -1 5 -1 -1 3 -1 -1 -1 -1 ) ;4
( -1 -1 -1 -1 255 -1 -1 4 -1 -1 255 -1 ) ;5
This predecessor version has it even a bit worse: https://github.com/Quogic/DunnetPredecessor/blob/master/foo.lsp#L264 https://github.com/Quogic/DunnetPredecessor/blob/master/foo....
- RonnieSchnell 8y agoI considered a more textual representation, but obfuscation of this serves a purpose. I don't mind people cheating if they must, but it doesn't have to be easy. And sometimes people enjoy reading the code but don't want everything spoiled.
- kragen 8y agoOH. I never even considered that possibly this was intended to be an obfuscated representation. Is it compiled from some other, more direct representation?