Open ZedKay52 opened 3 weeks ago
Concerning the discussion about the tutorial, I think that the player should discover the area around him while being guided by the signs in the map to find the area unlike giving the location of the area in the tutorial box which will nullify the importance of the signs.
Implement Tutorial Section (+ Some Minor Changes)
This PR introduce the tutorial section to the game. It is turned off by default, so make sure to make it "false" in the save.json file !!
About Approach and Changes
1. I created a sub-folder 'textboxes' in the 'data' folder containing both 'dialogues.json' and 'tutorial.json'
2. dialogues.json : fixed a misspelling and changed to "intro_to_game" to more appropriate one.
3. tutorial.json : contains all the text that will be used in the tutorial text boxes.
4. save.json : added the "tutorial_status" so that if the player completed the tutorial and relaunched the game, it will not be displayed.
5. tutorial.py : the main class that manage the tutorial section.
6. enums.py : hopefully fixed a bug in which the game crashes when trying to buy something.
7. dialog.py : added "top", "left" and "dialogue_file_path" to enable flexibility considering the positions of the text boxes and the resource of the text used in those boxes.
8. groups.py : included "game_paused" condition to prevent drawing overlaps between tutorial text boxes and other menus.
9. settings.py : changed the width of the text box since it is greater than the width of the textbox image itself.
10. player.py, shop.py, cow_herding.py, level.py and game_map.py : added variables to check if the player achieved the tutorial tasks.
11. main.py : updating the "show_intro_msg" function and enable the tutorial to start when the starting cutscene is finished, added "is_game_paused" variable in the "run" function to prevent the huge amount of calls to the "game_paused" function.