Telling a story through [PROTOCOL #081] is as simple as writing an imperative function:
Code: Select all
return function()
set_cursor(2, 2)
add_text("ONE (1) NEW FILE ADDED BY [USER #341A9E | STALENHAG, SIMON]\n")
add_text("WOULD YOU LIKE TO OPEN IT? (Y/N)")
local key = wait_for_key({"y", "n"})
if key == "y" then
config.background_color = {14, 7, 8}
config.font_color = {254, 77, 79}
config.font_color_highlight = {252, 171, 171}
config.speed = 16
clear_text()
wait(3)
set_text("INFECTION DETECTED", 2, 2)
new_line()
add_text("SYSTEM LOCK-DOWN INITIALIZED")
end
wait(15)
quit()
end
The concept has some flaws, but I thought I'd to share it anyway. Maybe it's suitable for some dystopian cyberpunk choose-your-own-adventure kind of game
*Edit: Fixed a bug where love.resize was not called on start-up, causing a black screen. Thanks @bartbes for reporting!