roguelike added by graspee on Mon May 14 19:55:42 2012
; graspee's rogue-like game. now in TZIKEN SKEEM! (load "macros.scm") (load "ansi.scm") (load "ui.scm") ;global vars (define playerx 0) (define playery 0) (define worldx 0) (define worldy 0) (define screen_width 80) (define screen_height 25) ;make an array (define goffs (new-2darray 200 200 )) ;fill array with random number from 1 to 10 (for f 0 199 ( for g 0 199 ( 2darray-put goffs f g (+ (random 10) 1) ) ) ) ;resize terminal (ansi-resize-terminal 80 25) ;clear screen (ansi-cls) ;move to origin (ansi-move-to 0 0) (ansi-use-extended-chars) ;draw world (for f worldx (+ worldx ( - screen_width 1)) ( for g worldy (+ worldx ( - screen_height 1)) ( display (case (2darray-get goffs f g) ((1) (ansi-string-fg 200 "T")) ((2 3 4) (ansi-string-fg 211 ":")) (else (ansi-string-fg 230 "." ) ) )))) (ui-frame 5 5 10 10 0)