[PROTOCOL #081] - experimental tool for interactive storytelling

Showcase your libraries, tools and other projects that help your fellow love users.
Post Reply
User avatar
0x25a0
Prole
Posts: 36
Joined: Mon Mar 20, 2017 10:08 pm
Contact:

[PROTOCOL #081] - experimental tool for interactive storytelling

Post by 0x25a0 »

[PROTOCOL #081] is an arguably odd tool to tell an interactive story through a Matrix Green Rain terminal.

Image

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
You can print text, wait for key presses, wait a fixed amount of time, and change things like the color scheme and the speed of the code trails on the fly. Check out the documentation in story.lua for a full overview over the available functions and variables.

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!
Attachments
PROTOCOL_081.love
(55.02 KiB) Downloaded 188 times
Last edited by 0x25a0 on Sun Oct 22, 2017 3:54 pm, edited 1 time in total.
User avatar
Bunnybacon
Prole
Posts: 20
Joined: Fri Mar 25, 2016 8:42 am

Re: [PROTOCOL #081] - experimental tool for interactive storytelling

Post by Bunnybacon »

That was great! well done!
User avatar
bartbes
Sex machine
Posts: 4946
Joined: Fri Aug 29, 2008 10:35 am
Location: The Netherlands
Contact:

Re: [PROTOCOL #081] - experimental tool for interactive storytelling

Post by bartbes »

I should probably note that the resize event wasn't triggered on startup for me, so I got a 0x0 display. A black screen, in other words. Manually calling love.resize in love.load fixed it for me.
User avatar
0x25a0
Prole
Posts: 36
Joined: Mon Mar 20, 2017 10:08 pm
Contact:

Re: [PROTOCOL #081] - experimental tool for interactive storytelling

Post by 0x25a0 »

@Bunnybacon Thanks! I'm glad you like it :)

@bartbes Oh dear! Thanks for reporting, that should hopefully be fixed now :)
Post Reply

Who is online

Users browsing this forum: Google [Bot] and 41 guests