Development Document


Below is a copy of documentation of my thoughts while making this. It involves design, but goes more into me grappling with Java, HTML, and Twine. Thanks for reading.

My initial plan was to have a paragraph of text appear whenever the user clicked on a word. To compensate for this, I would separate them by using two lines instead of one, providing room to replace them with lengthier strings. However, I decided this would be too difficult to implement, since I would have to spend time measuring out exactly how much space certain strings would require, something that may not even be the same depending on the resolution of the monitor being used. Instead, it could be much more effective to simply add to the original description of the room, adding to the player’s overall vision instead of narrowing it down to single bits and pieces.

This would have to be implemented with Java, and after some research, I knew it would involve heavy use of arrays. I knew how to apply a function to clicking on text, but that wouldn’t work by itself. So I created a second function that the first would call when clicked. The first would remove the item from the screen, while the second would add to the description of the room.
I at first thought a for loop would be able to add to the description string well enough. However, that would only add strings from an array in a set order. A much simpler solution would be to pass the number for which part of the array I want to add.  

I had been hoping I would be able to arrange items by using a number of spaces. However, Twine automatically removes excessive spaces. So, in order to scatter the items, I would change the alignment. This only puts them in three separate columns, but due to time constraints, I can’t find a better solution.

I was really worried I’d need a new array to keep track of what items were observed or not. However, I realized I could simply replace the item in the array with an empty string, so it would no longer add to the description string. This does not enable me to permanently remove items from screens; it turns out to work in the game’s favor, since these items technically don’t go away.

This all resulted in the text for each room being stored in a series of arrays in the javascript on the first passage. It’s a gargantuan wall of text that doesn’t look good, but this text had to go somewhere I suppose.

Files

Project Clutterbox.html Play in browser
Sep 24, 2019

Leave a comment

Log in with itch.io to leave a comment.