Grandma’s Soup¶
-
class
quest.examples.grandmas_soup.GrandmasSoupGame[source]¶ Help Grandma find all the ingredients for her soup.
GrandmasSoupGameshows off the full range of features in the Quest framework, loading a map and letting the player explore it. Grandma and the Vegetables are subclasses ofNPC. Aquest.modal.DialogueModalis used for the conversations with Grandma. To run this example, run:$ python -m quest.examples.grandmas_soup
After you play it, check out the sorce code by clicking on “source” in the blue bar just above.
-
dialogue¶ A
Dialoguecontaining the game’s conversation.
-
modal¶ A
DialogueModalto show the dialogue.
-
items¶ A list to keep track of which items the player has collected.
-
setup_walls()[source]¶ As in other examples, assigns all sprites in the “Obstacles” layer to be walls.
-
-
class
quest.examples.grandmas_soup.Grandma(filename=None, scale=1, image_x=0, image_y=0, image_width=0, image_height=0, center_x=0, center_y=0, repeat_count_x=1, repeat_count_y=1)[source]¶ Grandma is an NPC.
-
repel_distance¶ How far back the player should be pushed after colliding with Grandma. This is necessary because otherwise when the dialogue modal closed, it would immediately reopen. Grandma is interesting, but not that interesting.
-
-
class
quest.examples.grandmas_soup.Vegetable(filename=None, scale=1, image_x=0, image_y=0, image_width=0, image_height=0, center_x=0, center_y=0, repeat_count_x=1, repeat_count_y=1)[source]¶ A vegetable is an NPC that can be picked up.
-
class
quest.examples.grandmas_soup.Carrots(filename=None, scale=1, image_x=0, image_y=0, image_width=0, image_height=0, center_x=0, center_y=0, repeat_count_x=1, repeat_count_y=1)[source]¶
-
class
quest.examples.grandmas_soup.Mushroom(filename=None, scale=1, image_x=0, image_y=0, image_width=0, image_height=0, center_x=0, center_y=0, repeat_count_x=1, repeat_count_y=1)[source]¶