Godot_v4.1.1
This is my first game, so I thought I’d make a short and simple baking simulation game. How I want it to work is that your main goal is to create a dessert that matches one of the randomly generated tags of the day. For simplicity reasons I’ll only list 3 tags; spicy, sweet, and sour. Making your dessert involves two steps: mixing the ingredients and then adding toppings, with both categories of items having various levels of spiciness, sweetness, and sourness.
So lets say you need to use the sour tag. You add (ingredient) lemon to the mixture, which has 5 sourness points. Then when you go to decorating you add (topping) limecustard which adds another 5 points. You need 10 points over all to be able to use the sour tags, so now you’ve met your goal.
It seemed super simple in my head, but now that I’m trying to write down just the dictionary I am struggling (probably because it’s my first time, so no worries I know I’ll figure it out if I give myself some patience). I was thinking of using a nested dictionary like this
var Item = Dictionary : { “Ingredient” : { “lemon”, “sugar”, “cinnamon” }, “topping” : { “limecustard”, “strawberry_icing”, “somethingspicy” } }
But then I realized that I don’t know how to give the individual toppings and ingredients the sour variable. So then I thought of ditching the item dictionary maybe using classes?
class_name Item
var name
var desc
var sweetpoints
var sourpoints
var spicypoints
var Ingredient1 = Item.new
Ingredient1.name = “Lemon”
Ingredient1.desc = “A roundish, yellow, and sour fruit”
Ingredient1.sweetpoints = 0
Ingredient1.sourpoints = 5
Ingredient1.spicypoints = 0
var Topping1 = Item.new
Topping1.name = “Lemon”
Topping1.desc = “A roundish, yellow, and sour fruit”
Topping1.sweetpoints = 0
Topping1.sourpoints = 5
Topping1.spicypoints = 0