In Game Journal or Book

hungryhungryterrors
14 Mar 2018, 23:55

So in the game I'm working on, the player will have a journal that they can write in- I used the tutorial for how to Keep a Journal in Quest Documentation for it. The journal works fine, but now I'm trying to figure out how to let the player turn the page. Not only will the player be able to write their own entries, but they'll also be finding several pages from npc journals that give game hints and story, and after a while it's going to be really inconvenient to pull up EVERYTHING in the journal just to read something from several rooms ago. I'm considering setting the journal up like a room, and having each entry be an object the player can look at, but that's kinda clunky, and I know there's gotta be a better way to do it.


K.V.
15 Mar 2018, 02:23

Using objects may be the best way to handle it.

You can make a book. Make it openable/closable. Put page objects into it.

When the book is open, the player can enter READ BOOK and get a menu of pages. The player could also read a single page by entering READ PAGE 2 or clicking the page number in the pane when the book is open and selecting READ.


I have a library, if you have the desktop version of Quest and would like to check it out.

https://github.com/KVonGit/QuestStuff/wiki/BookLib


hegemonkhan
15 Mar 2018, 05:19

this gets into 'Data Structures' concepts of programming/coding, which I'm still learning myself, the simplest is using a linked list with iterators (but you can create 'trees' too and etc Data Structures that might be more efficient/powerful, but they're a bit more advanced designs):

some sources (not sure how good/bad they are, hadn't looked at them other than a very quick skim):

https://en.wikipedia.org/wiki/Linked_list
https://en.wikipedia.org/wiki/Iterator

https://en.wikipedia.org/wiki/Tree_structure
https://en.wikipedia.org/wiki/Tree_(data_structure)
https://en.wikipedia.org/wiki/Binary_tree

https://www.cs.cmu.edu/~tcortina/15-121sp10/Unit04B.pdf
http://www2.lawrence.edu/fast/GREGGJ/CMSC270/list.html
https://www2.hawaii.edu/~esb/2011spring.ics211/feb03.html
https://www.cs.princeton.edu/courses/archive/fall06/cos226/lectures/27iterator.pdf