Game creation

Is it possible to create say a text and image, our chose your own adventure basic game with Glide App?

I suppose it could be possible. It would just be categories and subcategories (lists embedded within lists). I don’t know if there is a limit to how many levels deep you could go. I’m sure if you mapped out the story, that would give you a good idea how to set up the references. You could probably set it up in one sheet. One column would contain the reference. Another column would contain the value being referenced for each story path. All the other columns would contain images and text for the story.

How can I embed a list within a list on my app?

I’m not a big fan of settings references back to the same sheet and try to have separate sheets, but the example below uses a single sheet and would be good way to handle a choose your own adventure style of game. If you set it up correctly, glide would probably build the correct components, with the lists, but to have a list within a list, just click on the initial list item to view it’s details, then add an inline list component that uses the reference you set up.

https://docs.glideapps.com/all/guides/intermediate-techniques/categories-and-subcategories

Is there a way to create a Single Relations Column say on a Library tab to multiple tabs (books) without create a new relations column for each book?

I only ask because I would like to be able to give myself an editable access version to be able to design and write new books that would app in the readers version.

And I cant create a relation outside the login on the website.

Because its not allowing me to create multiple In-Line lists for each book.

No, you can’t point to multiple sheets with a single reference.
I think you would have to have a library sheet and a book sheet. Unfortunately all of the books would be contained in the same sheet. You would then have to set up your references with values like Book1Path1, Book1Path2, Book2Path1 and so on, for the adventure part, just so paths wouldn’t cross between books. You would have a separate reference to link library to book.

Apparently when i put an In-Line for every sheet it separates the books properly. :slight_smile:

Putting the Children=Tree:Parent:Multiple in the Google Sheet keeps failing. Just gonna create in the app itselfs

Just remember, Children is the column heading name. Tree is the name of the sheet that contains the data you are linking to. Parent is the column in the Tree sheet. Multiple just indicates that there could be multiple matches. Obviously, this only works if children, parent and tree are the actual names of your headings and sheet. The values in the children column must match at least one value in the parent column. Your example is a little confusing because the reference should always be set up on the parent and point to the children. If it’s easier, just use names that make more sense to you. An even easier option may be too set up the reference in the Data viewer tab in the app builder. It’s easier for me to visualize and layout the data when I build the references inside the sheet.

Oh… Well that I explains it. Thank you for the clarification. I was naming everything wrong

1 Like

So my choose your own destiny text based game template looks like its working beautifully

Is there a way to create a container so if I put an option for save an inventory that it can house found items.

Also is it possible to have a screen with button for say a random number or item generator that it could generate a number or item without going to the next screen and drop it in the container aka list of inventory.

Not sure about a random number generator within the app, but using my Currency example, you could add a column for quantity and have the following formula in each Item row of that column. The items would have an ever changing quantity. If you change your sheet to recalcuate every minute or every hour, then the numbers will continuously change.
=randbetween(1,5)

Thanks Jeff

1 Like

Can you share the Google Sheet for the a currency set up. Is like to take a look at the set up see if I can modify it for an inventory for my cyoa

You can copy the app. There is also a link to the sheet if you scroll to the bottom.

@Jeff_Hager

Is there a way using a modified Currency layout for the list of items to show are based on the “Children” of the “Tree” that you are currently on.

Lets say in my CYOA you are reading and you are on the Parent “Room” with an option to search the Closet, so click that and it takes you to the Children “Closet” of the Parent “Room”

If I put the Form on the Children “Closet” if there a way for the form to pull a list into choices based on the formula in Sheets knowing you are currently on “Closet” and to list only items that have the tag “Closet” in the Sheets items list?

And is there a way for the Form only shows on the Children page that its set for instead of showing on every level of the Tree.

If that makes sense.

This is one of the problems with parent and children relations all in one sheet. Glide page layouts are usually tied to a sheet, so if you make a change to a layout, it affects the look of everything that uses that sheet. I personally don’t like pointing references to the same sheet. For me it gets hard to follow the flow. I try to split up data as much as possible into multiple sheets.

What you could possibly do is create a column in your tree sheet and set it up as a reference column to a Rooms sheet. So if you are on the Closet row, you could put Closet in the reference column and it would link to a closet record in the Rooms sheet. This would allow you to set up multiple Rooms and have details specific to rooms that are different from the main story tree. Unfortunately all rooms would need to have similar page and form button layouts.

Choices get a little tricky, because although you could set up some crafty formulas to dynamically filter the list you want based on other input, I don’t think it will quite work out for what you are doing. The spreadsheet has no idea where you are in the app, so without prior input of some kind, there is no way to filter the choices on the fly. To get a different layout and different Choice components with different content, I think you would almost need a separate sheet for every Room. That way the Form Button would be unique for each room and you could set up the components independently. If you can get a different form button layout for each scenario, then you can build a choices sheet full of different Choice values in each column. For each choice component you add, you could choose whichever column you want for that specific choice component in that particular room or situation.

I’m sure it’s all doable, but would take some careful planning and trial and error. I assume you want to have multiple different adventures all built into the same spreadsheet, but it could all get a bit messy if you start having multiple sheets for each story. It’s also hard for me to completely understand what your ultimate goal is so at best I can just throw random ideas at you. It’s usually just a bunch of trying things and trying to think outside the box until something works.

Good point, I am thinking of using a formula based on options.

To if I set up a Form Button that lists to Search Room; select the Closet as the option, and submit, it should be able to fill in a cell on the Google Sheet which is attached to:

=if(A1, “Closet”(importrange(“GoogleSheet”,“Tab!Cells”)

in my Google Sheet so that it imports information from separate Google Sheets based on the form input change, if use the separate by user it should allow it to “create” a new search and pull only information requested by said User.

Do you think this would work? To allow me to create all the adventure in different Sheets and Actions from different sheets while keeping the Sheet used for the App creation a little cleaner?

So if I understand, your form submission would write a row that contains something like user email, Room name, and Closet, correct? You would then perform a lookup against another table to acquire the quantity/value of the object found in that room? Then, say you found Gold in the closet, you want the users stash of gold to increase? You should be able to use a SUM against the form responses to total up their inventory in the users table. Having trouble seeing the entire picture. Do have a sheet you can share with what you have so far? PS, might take me a few days to dive deeper.

Just beware that importrange may not work if the spreadsheet isn’t physically open on a computer. I would use a query instead if everything is contained within the same spreadsheet.

I’m only in the planning stage but once I’ve got something for you to look at I’ll send it your way.