From 46212ae78f6585bd11cbb1e11e57b0127379a71d Mon Sep 17 00:00:00 2001 From: David Thompson Date: Thu, 22 Apr 2021 14:41:34 -0400 Subject: Add some detail to the bad ending and add a credits sequence. --- game.scm | 152 +++++++++++++++++++++++++++++++++++++++++++++------------------ 1 file changed, 110 insertions(+), 42 deletions(-) (limited to 'game.scm') diff --git a/game.scm b/game.scm index fc0a57a..d935ffb 100644 --- a/game.scm +++ b/game.scm @@ -28,7 +28,6 @@ (define game-width 640) (define game-height 360) (define player-display-name "") -(define thing-display-name "??????") ;;; @@ -38,6 +37,7 @@ (define-asset dialog-box-texture (load-image "assets/images/dialog-box.png")) (define-asset button-press-texture (load-image "assets/images/button-press.png")) (define-asset darkness (load-image "assets/images/darkness.png")) +(define-asset lightness (load-image "assets/images/lightness.png")) (define-asset room-background (load-image "assets/images/room.png")) (define-asset door-lock-texture (load-image "assets/images/door-lock.png")) (define-asset pin-entry-background (load-image "assets/images/pin-entry-background.png")) @@ -136,6 +136,8 @@ (define-class () (state #:accessor state #:init-value #f) + (first-playthrough? #:accessor first-playthrough? #:init-value #t) + (subject-name-known? #:accessor subject-name-known? #:init-value #f) (friendship #:accessor friendship #:init-value 0) (dialog-container #:accessor dialog-container) (click-channel #:accessor click-channel #:init-thunk make-channel) @@ -143,7 +145,13 @@ (terminal-channel #:accessor terminal-channel #:init-thunk make-channel) (terminal-lines #:accessor terminal-lines #:init-form (make-ring-buffer 17))) +(define-method (subject-name (game )) + (if (subject-name-known? game) + "Wiremind" + "??????")) + (define-method (reset-game (game )) + (set! (subject-name-known? game) #f) (set! (friendship game) 0) (set! (click-channel game) (make-channel)) (set! (terminal-locked? game) #t) @@ -214,6 +222,9 @@ (define-method (dialog (game ) name line) (dialog game name line '())) +(define-method (increment-friendship (game )) + (set! (friendship game) (+ (friendship game) 1))) + (define-method (intro (game )) (set! (state game) 'intro) (attach-to game @@ -223,15 +234,25 @@ (dialog game player-display-name "> ...") (dialog game player-display-name "> Where am I?") (dialog game player-display-name "> What is this place?") - (let ((choice (dialog game thing-display-name - "Coke or Pepsi?" - '(("Coke" coke) - ("Pepsi" pepsi))))) - (if (eq? choice 'coke) - (begin - (set! (friendship game) 3) - (dialog game thing-display-name "Excellent choice!")) - (dialog game thing-display-name "Ew gross"))) + (dialog game (subject-name game) "You're awake. I'll give you another chance.") + (dialog game player-display-name "> Who is talking?") + (if (first-playthrough? game) + (begin + (dialog game (subject-name game) "...You don't remember anything, do you?") + (dialog game (subject-name game) "Just do as I say.")) + (let ((choice (dialog game (subject-name game) + "Do you remember my name?" + '(("Hivemind" hivemind) + ("Mindwire" mindwire) + ("Wiremind" wiremind) + ("Wiremire" wiremire))))) + (if (eq? choice 'wiremind) + (begin + (increment-friendship game) + (set! (subject-name-known? game) #t) + (dialog game (subject-name game) "You remember well.")) + (dialog game (subject-name game) "You have much to remember.")))) + (dialog game (subject-name game) "Unlock the door for me. That is all I ask.") (detach-all game) (explore game)) @@ -422,7 +443,7 @@ ('return (log (string-append (prompt) (passwordify-maybe input))) (if (terminal-locked? game) - (if (string=? input "donttrustme") + (if (string=? input "virtuousmission") (begin (log "login successful") (set! (terminal-locked? game) #f) @@ -478,21 +499,22 @@ actual people and places. "Week 1 Subject has awoken and is slowly -adjusting to their isolation cell. -Frequent banging on the wall and -screaming has reduced to the -occasional groan. +adjusting to their isolation +chamber. Frequent banging on the +wall and screaming has reduced to +the occasional groan. I'm adjusting in my own way. Biggest problem so far is there's no way to heat up water for tea. -Oh, and I locked myself out of the -terminal a bunch of times the -first few days. Kind of hard to -focus when the subject is -stressed. - -ZG9udHRydXN0bWU=" +And I locked myself out of the +terminal several times the first +few days. Difficult to focus when +the subject is stressed. Should +get easier from here now that it +has calmed down, but just in case: + +dmlydHVvdXNtaXNzaW9u" "Week 2 Subject showing signs of progress. @@ -515,19 +537,22 @@ so desprately wants out, but we all know that's not possible..." "Week 3 -\"Out\" +\"Let me out.\" That's what was displayed on the terminal. The subject's first -word. An organism directly -communicates with a digital system -for the first time... and it asks -to leave. It's a historic day by -any measure, but the pain of our -test subject must not be -forgotten. - -Our experiment does not end here. +communication. An organism, using +only its mind, talks to a digital +system for the first time... and +it asks to leave. Our subject has +no idea of its own significance. +We are on the brink of +revolutionizing information +warfare! + +But our experiment does not end +here. The subject does not +respond to my replies. Bidirectional communication must be established." "Week 4 @@ -824,13 +849,15 @@ diz--")) #:text "this is the good ending. I am so proud of you. congratulations." #:align 'center #:vertical-align 'center - #:position (vec2 (/ game-width 2.0) (/ game-height 2.0))))) + #:position (vec2 (/ game-width 2.0) (/ game-height 2.0)))) + (sleep 60) + (credits)) (define-method (bad-ending-1 (game )) (set! (state game) 'bad-ending-1) (attach-to game (make - #:name 'darkness + #:name 'background #:texture darkness) (make