{"id":19084389,"url":"https://github.com/pawsanie/novelist","last_synced_at":"2025-08-16T17:06:20.894Z","repository":{"id":158646531,"uuid":"556178656","full_name":"Pawsanie/Novelist","owner":"Pawsanie","description":"This repository contains the source code to create a Visual Novel game based on minimal edits using Python if it needed. And just setting up a few json files.","archived":false,"fork":false,"pushed_at":"2024-09-17T16:03:24.000Z","size":1088,"stargazers_count":11,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-09-17T20:11:21.460Z","etag":null,"topics":["game","game-development","pygame","python","python-3","python3","visual-novel"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Pawsanie.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-23T08:39:04.000Z","updated_at":"2024-06-01T08:27:44.000Z","dependencies_parsed_at":"2023-08-29T15:22:11.997Z","dependency_job_id":"8899a5ec-a2b8-4dff-84dd-123597594148","html_url":"https://github.com/Pawsanie/Novelist","commit_stats":null,"previous_names":["pawsanie/novelist"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pawsanie%2FNovelist","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pawsanie%2FNovelist/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pawsanie%2FNovelist/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Pawsanie%2FNovelist/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Pawsanie","download_url":"https://codeload.github.com/Pawsanie/Novelist/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":223780003,"owners_count":17201287,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["game","game-development","pygame","python","python-3","python3","visual-novel"],"created_at":"2024-11-09T02:51:09.760Z","updated_at":"2025-08-16T17:06:20.849Z","avatar_url":"https://github.com/Pawsanie.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Novelist Engine:\n\nThis repository contains the source code to create a Visual Novel game based on minimal edits using Python if it needed.\u003cbr/\u003e\nAnd just setting up a few json files.\n\nAnd also elements of the basic Novelist game engine.\n\nI was inspired to develop this code by the inability to use [RenPy](https://www.renpy.org/) to create a game in the form in which I want.\u003cbr\u003e\nAs well as not wanting to learn RenPy scripting language.\n\nIn addition, writing your own game, almost from scratch, is quite interesting.\n\n:warning:Please note that some non-game features are not fully implemented.:warning:\u003cbr\u003e\n:wink:Cloning without to give it a :star:? Nah, I’m not that lazy.:wink:\n\n## Disclaimer:\n:warning:**Using** some or all of the elements of this code, **You** assume **responsibility for any consequences!**\u003cbr\u003e\n\n:warning:The **licenses** for the technologies on which the code **depends** are subject to **change by their authors**.\u003cbr\u003e\u003cbr\u003e\n\n## Contents:\n### Required:\nContains information about dependencies and how to install them.\n* [Required](#Required)\n\n### Novelist console utilities:\nThis section describes step by step how to create a game using the engine, at the level of console utilities.\u003cbr\u003e\nJust like scenes and texture data need to be described, without using any scripting languages, so that the game can be assembled.\n* [Screenplay Parser](#Screenplay-Parser)\n\n### Visual Novel game application source code:\nThe paragraphs in this section describe in sufficient detail how the game is structured and how to control it at the level of the contents of the configuration files.\n* [How to run the application](#How-to-run-the-application)\n* [Settings of scenes](#Settings-of-scenes)\n* [Characters and their sprites](#Characters-and-their-sprites)\n* [Backgrounds and its sprite](#Backgrounds-and-its-sprites)\n* [User Interface](#User-Interface)\n* [Text and Localization](#Text-and-Localization)\n* [The name and icon of the game window](#The-name-and-icon-of-the-game-window)\n* [GamePlay](#GamePlay)\n* [Default game settings](#Default-game-settings)\n* [Sound System](#Sound-System)\n* [How the program works](#How-the-program-works)\n* [Logging](#Logging)\n* [Save and Load system](#Save-and-Load-system)\n\n### Other paragraphs:\nThis section contains information on solving typical problems and plans for further development.\n* [What needs to be completed](#What-needs-to-be-completed)\n* [Known Problems](#Known-Problems)\n\n___\n\u003cbr\u003e\n\n## Required:\nThe application code is written in python and obviously depends on it.\u003cbr\u003e\n**Python** version 3.6 [Python Software Foundation License / (with) Zero-Clause BSD license (after 3.8.6 version Python)]:\n* :octocat:[Python GitHub](https://github.com/python)\n* :bookmark_tabs:[Python internet page](https://www.python.org/)\n\n## Required Packages:\n**PyGame** [GNU LGPL version 2.1]:\n* :octocat:[PyGame GitHub](https://github.com/pygame/pygame)\n* :bookmark_tabs:[Pygame internet page](https://www.pygame.org/news)\n\nUsed to create windows, surfaces and draw them on top of each other.\u003cbr\u003e\nAlso for flipping the screen and drawing the window icon.\n\n## Installing the Required Packages:\n```bash\npip install pygame\n```\nIf you want you can change this library by first downloading it from the repository and installing your version using the command.\n```bash\npip install ./path/to/modified/lib\n```\n\n# Novelist console utilities:\n\n## Screenplay Parser:\n\nFor convenience, this utility is equipped with shell scripts that simplify its call, and a file with an example scene.\n\n**Files location:**\u003cbr\u003e\n**./**:open_file_folder:Source_code\u003cbr\u003e\n   └── :file_folder:Utilities\u003cbr\u003e\n            └── :file_folder:Screenplay_parser\u003cbr\u003e\n                     ├── :file_folder:Screenplay_source\u003cbr\u003e\n                      |       └── :page_facing_up:example_scene_config.ini\u003cbr\u003e\n                     ├── :page_facing_up:Screenplay_Source_Parser.py\u003cbr\u003e\n                     ├── :page_facing_up:ScreenplaySourceParser_execute.ps1\u003cbr\u003e\n                     └── :page_facing_up:ScreenplaySourceParser_execute.sh\n\n### How to create scene config:\nLet's start with how to design the scene for this script.\u003cbr\u003e\nAn example of the scene is in the 'example_scene_config.ini' file.\u003cbr\u003e\n\nIn order to create your own scene, you need to create a file with any name and ini extension, and either add it to the '**Screenplay_source folder**'.\u003cbr\u003e\nOr to any directory in which you want to store your scenes.\u003cbr\u003e\nYou can store several scenes in one file, or just one.\n\nLet's take a closer look at the components of the scene settings:\n* **Basic Scene Settings:**\n    ```text\n    [example_scene_name]\n    \n    scene_type = reading|choice\n    past_scene = scene_name|START\n    ```\n  * **example_scene_name** - This scene name will be used inside the game.\u003cbr\u003e\n  It should be written in square brackets.\u003cbr\u003e\n  And all subsequent rows assigned to this scene must be under this title.\n  * **scene_type** - keep gameplay type.\u003cbr\u003e\n  Can be **reading** or **choice**.\n  * **past_scene** - keep name of previous scene.\u003cbr\u003e\n  This should be a name similar to what you write in square brackets at the beginning of the scene settings.\u003cbr\u003e\n  For another configured scene - respectively.\u003cbr\u003e\n  The first scene in your visual novel must have '**START**' written on it.\n\n* **Background:**\n    ```text\n    background_sprite_sheet = background_01\n    background_animation = animation_01\n    ```\n  * **background_sprite_sheet** - keep background sprite texture image and texture settings file.\u003cbr\u003e\n  To create a texture you can use \"Texture_Source_Parser\" utility.\n  * **background_animation** - here you need to specify the name of the animation or static frame.\n\n* **Reading scene settings:**\n    ```text\n    next_scene = scene_name|FINISH\n    speaker_name_color = #ffffff\n    speech_text_color = #ffffff\n    ```\n    * **next_scene** - keep name of next scene for reading gameplay.\u003cbr\u003e\nThis should be a name similar to what you write in square brackets at the beginning of the scene settings.\u003cbr\u003e\nFor another configured scene - respectively.\u003cbr\u003e\nThe last scene in your visual novel must have '**FINISH**' written on it.\n    * **speaker_name_color** and **speech_text_color** - keeps hex-code the color of the name of the character speaking in the scene and the color of the text that he speaks.\u003cbr\u003e\n    You don't have to specify colors.\u003cbr\u003e\n    They will be set to #ffffff by default.\n\n* **Choice scene settings:**\n    ```text\n    scene_choice.choice_01 = scene_03\n    scene_choice.choice_02 = scene_02\n    choice_text_color.choice_02 = #ffffff\n    ```\n  * **scene_choice** - stores the name of the scene to be switched to as a value.\u003cbr\u003e\n  Please note that in this case the key consists of 2 parts '**scene_choice**' and choice name as example '**choice_01**' and '**choice_02**'.\u003cbr\u003e\n  This should be a name similar to what you write in square brackets at the beginning of the scene settings.\u003cbr\u003e\n  For another configured scene - respectively.\u003cbr\u003e\n  * **choice_text_color** - is designed on the same principle as '**scene_choice**'.\u003cbr\u003e\n  Keeps hex-code the color of choice text.\u003cbr\u003e\n  You don't have to specify colors. They will be set to #ffffff by default.\n\n* **Characters settings:**\n    ```text\n    # Left Character:\n    left_character_animation = animation_01\n    left_character_sprite_sheet = left_character\n    left_character_plan = background_plan|first_plan\n    \n    # Middle Character:\n    middle_character_animation = animation_01\n    middle_character_sprite_sheet = middle_character\n    middle_character_plan = background_plan|first_plan\n    \n    # Right Character:\n    right_character_animation = animation_01\n    right_character_sprite_sheet = right_character\n    right_character_plan = background_plan|first_plan\n    ```\n    You can leave the characters unspecified if you want the scene to remain empty.\u003cbr\u003e\n    Or you can use one, two or three character type actors on scene.\u003cbr\u003e\n    At the beginning of each key you need to indicate what type of character you want to describe:\u003cbr\u003e\n    **left\\_**, **middle\\_** or **right\\_**. As example **right_character_animation**.\u003cbr\u003e\n    Next, the keys will be listed **without** this **prefix**:\n    * **character_sprite_sheet** - keep character sprite texture image and texture settings file.\u003cbr\u003e\nTo create a texture you can use \"Texture_Source_Parser\" utility.\n    * **character_animation** - here you need to specify the name of the animation or static frame.\n    * **character_plan** - can only have '**background_plan**' or '**first_plan**' as value.\u003cbr\u003e\nObviously, the setting is responsible for how the character will be drawn.\u003cbr\u003e\nIn the foreground or background.\n\n* **Optional scene settings:**\n    ```text\n    # Special effects can be sent like list as example: \"rain,noise_artifacts,snow\"...\n    scene_special_effects = rain|noise_artifacts|false\n    music = music_file|false\n    sound = sound_file|false\n    voice = voice_file|false\n    ```\n  * **scene_special_effects** - the option is currently under development.\n  * **music** - name of music file or **false**\u003cbr\u003e\n  This file will play in a loop during this scene\n  * **sound** - name of sound file or **false**\u003cbr\u003e\n  This file plays once per scene, a moment after the switch is made.\n  * **voice** - name of voice file or **false**\u003cbr\u003e\n  This file plays once per scene, a moment after the switch is made.\n\n### How to assemble a game screenplay from scene configurations:\nIn order to use this utility, you need to call it directly, or through a shell **ScreenplaySourceParser_execute** script that simplifies working with it.\u003cbr\u003e\nAs an argument, you can pass the absolute path to the folder with your scene settings, if it differs from the default one.\u003cbr\u003e\nAs example:\n```shell\n./ScreenplaySourceParser_execute.sh /home/User/Example_Path\n```\nIf the folder is standard you can simply call the script.\n```shell\npowershell -File ScreenplaySourceParser_execute.ps1\n```\nBelow is a detailed description of how to run the utility on different operating systems:\n\n* **Windows:**\n  * Hold down '**Win**' and '**R**' keys on your keyboard.\n  * Enter '**cmd**' in the window that opens and press '**Enter**'.\n  * Enter the drive letter where the program was downloaded and '**:**'.\u003cbr\u003e\n  As example for 'D drive':\n  ```shell\n  D:\n  ```\n  * Enter '**cd**' and absolute path to the script through the folder where you downloaded the program.\u003cbr\u003e\n  As example for downloaded path 'D:\\Git\\Novelist':\n  ```shell\n  cd D:\\Git\\Novelist\\Source_code\\Utilities\\Screenplay_parser\n  ```\n  * Run \"**ScreenplaySourceParser_execute**\" powershell script.\n  ```shell\n  powershell -File ScreenplaySourceParser_execute.ps1\n  ```\n\n* **MacOS:**\n  * Hold down '**Command**' and '**Space**' keys on your keyboard.\n  * Enter '**Terminal**' in the window that opens and press '**Enter**'.\n  * Enter '**cd**' and absolute path to the script through the folder where you downloaded the program.\u003cbr\u003e\n  As example for downloaded path '/home/User/Git/Novelist':\n  ```shell\n  cd /home/User/Git/Novelist/Source_code/Utilities/Screenplay_parser\n  ```\n  * Please note that to run a script on Unix-like operating systems, you must first explicitly make it executable with the command:\n  ```shell\n  chmod +x ./ScreenplaySourceParser_execute.sh\n  ```\n  * Run \"**ScreenplaySourceParser_execute**\" Bash script.\n  ```shell\n  ./ScreenplaySourceParser_execute.sh\n  ```\n\n* **Other Unix type OS:** - Ubuntu, Fedora, etc.\n  * Open the Terminal of your operating system.\n  * Enter '**cd**' and absolute path to the script through the folder where you downloaded the program.\u003cbr\u003e\n  As example for downloaded path '/home/User/Git/Novelist':\n  ```shell\n  cd /home/User/Git/Novelist/Source_code/Utilities/Screenplay_parser\n  ```\n  * Please note that to run a script on Unix-like operating systems, you must first explicitly make it executable with the command:\n  ```shell\n  chmod +x ./ScreenplaySourceParser_execute.sh\n  ```\n  * Depending on your security settings, you may need to enter the sudo command.\u003cbr\u003e\nAnd enter the password when requested if necessary.\n  ```shell\n  sudo chmod +x ./ScreenplaySourceParser_execute.sh\n  ```\n  * Run \"**ScreenplaySourceParser_execute**\" Bash script.\n  ```shell\n  ./ScreenplaySourceParser_execute.sh\n  ```\n\n# Visual Novel game application source code:\n\n## How to run the application:\nTo run the application, you need to run the 'Visual_novel_game.py' script with your shell.\u003cbr\u003e\n**Example of shell command:**\u003cbr\u003e\n```shell\npython -B Visual_novel_game.py\n```\n**File location:**\u003cbr\u003e\n**./**:open_file_folder:Source_code\u003cbr\u003e\n   └── :file_folder:Application\u003cbr\u003e\n            └── :page_facing_up:Visual_novel_game.py\n\n\n## Settings of scenes:\n\n### Scene order:\nTo adjust the scene order, you need to change the json file **'screenplay.json'**.\u003cbr\u003e\nAt the same time, the first scene **must** have the 'past_scene' key value as **'START'**.\u003cbr\u003e\nIn the last scene 'next_scene' key **must** be **'FINISH'**.\u003cbr\u003e\n\n**File location:**\u003cbr\u003e\n**./**:open_file_folder:Source_code\u003cbr\u003e\n   └── :file_folder:Application\u003cbr\u003e\n            └── :file_folder:Assets\u003cbr\u003e\n                     └── :file_folder:Scripts\u003cbr\u003e\n                              └── :file_folder:Json_data\u003cbr\u003e\n                                       └── :page_facing_up:screenplay.json\u003cbr\u003e\n\n**Example of screenplay.json file:**\n```json\n{\n  \"test_scene_01\": {\n    \"gameplay_type\": \"reading\",\n    \"background\": {\n      \"background_sprite_sheet\": \"back_ground_01\",\n      \"background_animation\": \"default\"\n    },\n    \"past_scene\": \"START\",\n    \"actors\": {\n      \"Character_02\": {\n        \"character_animation\": \"1\",\n        \"character_plan\": \"first_plan\",\n        \"character_start_position\": \"middle\"\n      },\n      \"Character_01\": {\n        \"character_animation\": \"3\",\n        \"character_plan\": \"background_plan\",\n        \"character_start_position\": \"right\"\n      }\n    },\n    \"next_scene\": \"test_scene_02\",\n    \"speaker_name_color\": \"#00ffff\",\n    \"speech_text_color\": \"#ffffff\",\n    \"special_effects\": [\n      \"rain\",\n      \"noise_artifacts\"\n    ],\n    \"sounds\": {\n      \"music_channel\": false,\n      \"sound_channel\": \"blank\",\n      \"voice_channel\": false\n    }\n  },\n  \"test_scene_02\": {\n    ...\n    \"choices\": {\n      \"choice_01\": {\n        \"branching\": \"test_scene_01\",\n        \"text_color\": \"#ffffff\"\n      },\n      \"choice_02\": {\n        \"branching\": false,\n        \"text_color\": \"#ff0000\"\n      },\n      \"choice_03\": {\n        \"branching\": \"test_scene_03\",\n        \"text_color\": \"#ffffff\"\n      }\n    },\n    ...\n}\n```\n**Gameplay Type:**\u003cbr\u003e\nPlease note that a '**gameplay_type**' key value must be **reading|choice** strings.\u003cbr\u003e\u003cbr\u003e\n\n**Background:**\u003cbr\u003e\nThe '**background**' key have information about background sprite.\u003cbr\u003e\nThe '**background_sprite_sheet**' key must have backgrounds name keys from 'backgrounds_sprites.json' as a value.\u003cbr\u003e\nThe '**background_animation**' key must have a relevant animation name from background texture json file data.\u003cbr\u003e\nMore about this further in «[Backgrounds and its sprite](#Backgrounds-and-its-sprites)» paragraph.\u003cbr\u003e\u003cbr\u003e\n\n**Past Scene:**\u003cbr\u003e\nThe '**past_scene**' key contains information about the previous scene.\u003cbr\u003e\nThe **first scene** must have the '**START**' key value.\u003cbr\u003e\u003cbr\u003e\n\n**Actors:**\u003cbr\u003e\nPlease note that an **actors** characters keys must match certain values:\u003cbr\u003e\n**character_animation** - can be any key from the dictionary 'characters_sprites.json'. \u003cbr\u003e\nMore about this further in «[Characters and their sprites](#Characters-and-their-sprites)» paragraph.\u003cbr\u003e\n**character_plan** - may have values **background_plan|first_plan**.\u003cbr\u003e\n**character_start_position** - may have values **right|middle|left**.\u003cbr\u003e\u003cbr\u003e\n\n:eye_speech_bubble:**Specific for Reading GamePlay:**\u003cbr\u003e\n* **Next Scene:**\u003cbr\u003e\nThe '**next_scene**' key value contains information about the next scene to be switched to.\u003cbr\u003e\nLast scene must have the '**FINISH**' key value.\u003cbr\u003e\nPlease note that this only switches the reading gameplay scene.\u003cbr\u003e\nAs example 'test_scene_01' scene.\u003cbr\u003e\u003cbr\u003e\n\n* **Speaker Name Color:**\u003cbr\u003e\nThe **hex-code** value of the **speaker_name_color** key obviously contains a color setting that will be assigned to the speaker's name while scene rendered.\u003cbr\u003e\u003cbr\u003e\n\n* **Speech Text Color:**\u003cbr\u003e\nThe **hex-code** value of the **speech_text_color** key obviously contains a color setting that will be assigned to the speach text while scene rendered.\u003cbr\u003e\u003cbr\u003e\n\n:speech_balloon:**Specific for Choice GamePlay:**\u003cbr\u003e\n* **Choices:**\u003cbr\u003e\nThe '**choices**' key value contains links to text localisation as keys.\u003cbr\u003e\nThe '**branching**' work like 'next_scene' key for reading gameplay.\u003cbr\u003e\nPlease note that this only switches the choice gameplay scene.\u003cbr\u003e\nThe '**text_color**' key control color of text on choice button.\u003cbr\u003e\nAs example 'test_scene_02' scene.\u003cbr\u003e\n\nMore information about reading and choice gameplay text is specified in the «[Text and Localization](#Text-and-Localization)» paragraph.\u003cbr\u003e\u003cbr\u003e\n\n**Special Effects:**\u003cbr\u003e\nCurrently under development.\u003cbr\u003e\u003cbr\u003e\n\n**Sounds:**\u003cbr\u003e\nThe nested dictionary of the **\"sounds\"** key contains the keys and values of the sound effects and music\u003cbr\u003e\nthat will be played at the start of the scene and will be interrupted at the transition to the next one.\u003cbr\u003e\nPlease note that the keys **\"voice_channel\"**, **\"sound_channel\"** and **\"music_channel\"** can contain either a string with a name, without a file extension, or **false** as values.\u003cbr\u003e\n\n## Characters and their sprites:\nInformation about the characters is stored in a 'characters_sprites.json 'file.\u003cbr\u003e\nIt needs to list the names by which the game will look for characters.\u003cbr\u003e\n**Please note** that the name specified here is how the key is used in the **actors** key in **'screenplay.json'** file!\u003cbr\u003e\nAnd this name is in no way related to the one you can set in the dialogs!\u003cbr\u003e\nTexture data file name and animations available to the character from this file.\u003cbr\u003e\n**File location:**\u003cbr\u003e\n**./**:open_file_folder:Source_code\u003cbr\u003e\n   └── :file_folder:Application\u003cbr\u003e\n            └── :file_folder:Assets\u003cbr\u003e\n                     └── :file_folder:Scripts\u003cbr\u003e\n                              └── :file_folder:Json_data\u003cbr\u003e\n                                       └── :page_facing_up:characters_sprites.json\u003cbr\u003e\n**Example of 'characters_sprites.json' file:**\n```json\n{\n  \"Character_01\": {\n    \"texture\": \"blank_pink\",\n    \"animations\": {\n      \"1\": \"animation_1\",\n      \"2\": \"animation_2\",\n      \"3\": \"animation_3\"\n    }\n  },\n  \n  \"Character_02\": {\n    \"texture\": \"blank\",\n    \"animations\": {\n       \"1\": \"black\",\n       \"2\": \"pink\",\n       \"3\": \"blue\",\n       \"4\": \"green\"\n    }\n  }\n}\n```\nIn this case, two options for implementing a character sprite are indicated:\u003cbr\u003e\n**Character_01** is the character with an animated sprite.\u003cbr\u003e\n**Character_02** is the character without animations.\u003cbr\u003e\nThe difference is that in the **animation** key for a static sprite, static poses are actually specified, not animations that will be played frame by frame.\u003cbr\u003e\u003cbr\u003e\n\nRegardless of the type of animations the character has.\u003cbr\u003e\nYou must set the **texture** key value to the name of the texture image and the texture storyboard settings.\u003cbr\u003e\nPlease note the names of these two files must match!\u003cbr\u003e\u003cbr\u003e\n\nLet's first discuss the sprite **texture settings sprite sheet files**.\u003cbr\u003e\n**Files location:**\u003cbr\u003e\n**./**:open_file_folder:Source_code\u003cbr\u003e\n   └── :file_folder:Application\u003cbr\u003e\n            └── :file_folder:Assets\u003cbr\u003e\n                     └── :file_folder:Scripts\u003cbr\u003e\n                              └── :file_folder:Json_data\u003cbr\u003e\n                                       └── :file_folder:Texture_data\u003cbr\u003e\n                                                └── :file_folder:Characters\u003cbr\u003e\n                                                         └── :page_facing_up:*.json **(Can be your sprite sheet json)**\u003cbr\u003e\n\nFor static sprites, the following settings are typical:\u003cbr\u003e\n* **sprite_sheet** value is **False**.\u003cbr\u003e\n* **statick_frames** simply contains the name of the frames with their x|y coordinates.\u003cbr\u003e\nThe coordinates for each frame are specified as the top left corner and the bottom right corner, respectively.\u003cbr\u003e\n\n**Example of such a 'statick_sprite_sheet.json' file:**\n```json\n{\n  \"sprite_sheet\": false,\n  \"statick_frames\": {\n     \"black\": {\n       \"top_left_corner\": {\n         \"x\": 25,\n         \"y\": 49\n          },\n       \"bottom_right_corner\": {\n         \"x\": 280,\n         \"y\": 618\n       }\n     },\n     \"pink\": {\n       \"top_left_corner\": {\n         \"x\": 344,\n         \"y\": 49\n          },\n       \"bottom_right_corner\": {\n         \"x\": 568,\n         \"y\": 618\n       }\n     }\n  }\n}\n```\n\nFor animation sprites, the following settings are typical:\u003cbr\u003e\n* **sprite_sheet** value is **True**.\u003cbr\u003e\n* **animations** value contains not just frames but settings for each animation.\n    * **time_duration** -animation playback time as float.\n    * **frames** - list of frames with their x|y coordinates.\u003cbr\u003e\n    The coordinates for each frame are specified as the top left corner and the bottom right corner, respectively.\u003cbr\u003e\n\n**Example of such a 'animation_sprite_sheet.json' file:**\n```json\n{\n  \"sprite_sheet\": true,\n  \"animations\": {\n    \"animation_1\": {\n      \"time_duration\": 1.0,\n      \"frames\": {\n        \"1\": {\n          \"top_left_corner\": {\n            \"x\": 21,\n            \"y\": 21\n          },\n          \"bottom_right_corner\": {\n            \"x\": 342,\n            \"y\": 940\n          }\n        }\n      }\n    },\n\n    \"animation_2\": {\n      \"time_duration\": 1.0,\n      \"frames\":{\n        \"1\": {\n          \"top_left_corner\": {\n            \"x\": 21,\n            \"y\": 1000\n          },\n          \"bottom_right_corner\": {\n            \"x\": 342,\n            \"y\": 1919\n          }\n        }\n\n      }\n    }\n\n  }\n}\n```\n\nSprite images must be in **png** format and stored in a 'Characters' folder.\u003cbr\u003e\n**Folder location:**\u003cbr\u003e\n**./**:open_file_folder:Source_code\u003cbr\u003e\n   └── :file_folder:Application\u003cbr\u003e\n            └── :file_folder:Assets\u003cbr\u003e\n                     └── :file_folder:Images\u003cbr\u003e\n                              └── :file_folder:Characters\u003cbr\u003e\n                                       └── :framed_picture:*.png **(Can be your image file)**\u003cbr\u003e\n\n## Backgrounds and its sprites:\nInformation about the backgrounds and its sprites must be entered into the 'backgrounds_sprites.json' file.\u003cbr\u003e\nThe names that will be given here are used to create scenes in 'screenplay.json' fie.\n\n**File location:**\u003cbr\u003e\n**./**:open_file_folder:Source_code\u003cbr\u003e\n   └── :file_folder:Application\u003cbr\u003e\n            └── :file_folder:Assets\u003cbr\u003e\n                     └── :file_folder:Scripts\u003cbr\u003e\n                              └── :file_folder:Json_data\u003cbr\u003e\n                                       └── :page_facing_up:backgrounds_sprites.json\u003cbr\u003e\n**Example of 'backgrounds_sprites.json' file:**\n```json\n{\n  \"back_ground_01\": {\n    \"texture\": \"blank\",\n    \"animation\": \"default\"\n  },\n  \n  \"settings_menu\": {\n    \"texture\": \"blank\",\n    \"animation\": \"default\"\n  }\n}\n```\nAs you can see from the example, names are also used for game menus.\u003cbr\u003e\nAll menu, except for gameplay, have their background plans.\u003cbr\u003e\n\nAll settings are similar to the settings described above for the characters.\u003cbr\u003e\nYou also need to specify the path to the file with the settings and the image of the texture.\u003cbr\u003e\nTheir names should also match.\u003cbr\u003e\nAnd you also need to set the name of the animation from the settings file.\u003cbr\u003e\n\n**Files location:**\u003cbr\u003e\n**./**:open_file_folder:Source_code\u003cbr\u003e\n   └── :file_folder:Application\u003cbr\u003e\n            └── :file_folder:Assets\u003cbr\u003e\n                     └── :file_folder:Scripts\u003cbr\u003e\n                              └── :file_folder:Json_data\u003cbr\u003e\n                                       └── :file_folder:Texture_data\u003cbr\u003e\n                                                └── :file_folder:Backgrounds\u003cbr\u003e\n                                                         └── :page_facing_up:*.json **(Can be your sprite sheet json)**\u003cbr\u003e\n**Example of statick background_sprite_sheet_texture_data.json file:**\n```json\n{\n  \"sprite_sheet\": false,\n  \"statick_frames\": {\n     \"default\": {\n       \"top_left_corner\": {\n         \"x\": 0,\n         \"y\": 0\n          },\n       \"bottom_right_corner\": {\n         \"x\": 1916,\n         \"y\": 865\n       }\n     }\n  }\n}\n```\nYou can read more about how the texture files are arranged in the «[Characters and their sprites](#Characters-and-their-sprites)» paragraph.\u003cbr\u003e\n\nImages must be in **jpg** format and stored in a 'Backgrounds' folder.\u003cbr\u003e\n**Folder location:**\u003cbr\u003e\n**./**:open_file_folder:Source_code\u003cbr\u003e\n   └── :file_folder:Application\u003cbr\u003e\n            └── :file_folder:Assets\u003cbr\u003e\n                     └── :file_folder:Images\u003cbr\u003e\n                              └── :file_folder:Backgrounds\u003cbr\u003e\n                                       └── :framed_picture:*.jpg **(Can be your image file)**\u003cbr\u003e\n\nHowever, you can change the sprite's format requirement by modifying it in the code.\n\n## User Interface:\nInformation about the standard user interface is contained in 'ui_buttons_data.json' files and 'ui_menu_text_data.json'.\u003cbr\u003e\nInformation about localisation of standard interface in «[Text and Localization](#Text-and-Localization)» paragraph.\n\n**Below** examples with **json`s** describes the code that needs to be changed if you want to supplement the standard menus with your own.\n\n**Files locations:**\u003cbr\u003e\n**./**:open_file_folder:Source_code\u003cbr\u003e\n   └── :file_folder:Application\u003cbr\u003e\n            └── :file_folder:Assets\u003cbr\u003e\n                     └── :file_folder:Scripts\u003cbr\u003e\n                              └── :file_folder:Json_data\u003cbr\u003e\n                                       └── :file_folder:User_Interface\u003cbr\u003e\n                                                 ├── :page_facing_up:ui_sprites.json\u003cbr\u003e\n                                                 ├── :file_folder:UI_Buttons\u003cbr\u003e\n                                                 │       ├── :page_facing_up:ui_buttons_data.json\u003cbr\u003e\n                                                 │       └── :file_folder:Buttons_config_files\u003cbr\u003e\n                                                 │                └── :page_facing_up:ui_\\*\\_buttons.json **(Can be your button file)**\u003cbr\u003e\n                                                 └── :file_folder:UI_Menu_texts\u003cbr\u003e\n                                                          ├── :page_facing_up:ui_menu_text_data.json\u003cbr\u003e\n                                                          └── :file_folder:Text_config_files\u003cbr\u003e\n                                                                   └── :page_facing_up:ui_\\*_menu_text.json **(Can be your menu text file)**\u003cbr\u003e\n\n**User Interface Buttons:**\u003cbr\u003e\u003cbr\u003e\nAll button configurations are initially described in the 'ui_buttons_data.json' file.\u003cbr\u003e\nThis file contains an array that lists the names of configuration files for all menu buttons.\u003cbr\u003e\n**Example of buttons in ui_buttons_data.json file:**\n```json\n[\n    \"ui_exit_menu_buttons\",\n    \"ui_game_menu_buttons\",\n    \"ui_gameplay_buttons\",\n    \"ui_load_menu_buttons\",\n    \"ui_save_menu_buttons\",\n    \"ui_settings_menu_buttons\",\n    \"ui_settings_status_buttons\",\n    \"ui_start_menu_buttons\",\n    \"ui_back_to_start_menu_status_menu_buttons\",\n    \"ui_creators_menu_buttons\"\n]\n```\n\n**Example of buttons in ui\\_\\*\\_buttons.json file:**\n```json\n{\n  \"start_menu_new_game\": {\n    \"type\": \"start_menu\",\n    \"index_number\": 0,\n    \"sprite_name\": \"game_menu_buttons\",\n    \"font\": null,\n    \"color\": \"#000000\"\n  },\n  \"start_menu_continue\": {\n    \"type\": \"start_menu\",\n    \"index_number\": 1,\n    \"sprite_name\": \"game_menu_buttons\",\n    \"font\": null,\n    \"color\": \"#000000\"\n  }\n}\n```\n'**index_number**' key contains the horizontal or vertical menu order of button as value.\u003cbr\u003e\nNumbers can be negative.\u003cbr\u003e\nFinding the order of the buttons and how it will be described in the 'UI_Button.py' file 'Button' class.\u003cbr\u003e\nIn 'coordinates' method of 'Button' class also uses the '**type**' key value.\u003cbr\u003e\nIf you want to add your own menus, please note that the key values are **hardcoded**.\u003cbr\u003e\n\nPlease note that the '**sprite_name**' key contains the name of the sprite, as the value.\u003cbr\u003e\nSprites must be in **png** format and stored in a 'Buttons' folder.\u003cbr\u003e\n**Folder location:**\u003cbr\u003e\n**./**:open_file_folder:Source_code\u003cbr\u003e\n   └── :file_folder:Application\u003cbr\u003e\n            └── :file_folder:Assets\u003cbr\u003e\n                     └── :file_folder:Images\u003cbr\u003e\n                              └── :file_folder:User_Interface\u003cbr\u003e\n                                       └── :file_folder:Buttons\u003cbr\u003e\n\nThe button sprite texture images must be described in the 'ui_sprites.json' file.\u003cbr\u003e\n**Example of buttons in ui_sprites.json file:**\n```json\n{\n  \"Buttons\": [\n    \"dialogues_choice_button\",\n    \"exit_menu_buttons\",\n    \"fast_forward\",\n    \"game_menu\",\n    \"game_menu_buttons\",\n    \"hide_interface\",\n    \"next_scene\",\n    \"past_scene\"\n  ],\n\n  \"Menu_Substrate\": [\n    \"blank_big\"\n  ],\n\n  \"Save_System\": [\n    \"screen_preview_empty\"\n  ],\n\n  \"Text_Canvas\": [\n    \"text_canvas\"\n  ]\n}\n```\n* **Buttons** - list of textures that can be assigned to buttons.\n* **Menu_Substrate** - list of textures on top of which text in the menu can be written.\n* **Save_System** - despite the fact that this is an array, there is only one possible texture option for empty save cells.\n* **Text_Canvas** - similar but for the text that the player reads during reading gameplay.\nThey are treated as static images and are loaded as is, meaning each file should contain a complete image of the object.\u003cbr\u003e\n\n**User Interface Menu Text:**\u003cbr\u003e\u003cbr\u003e\nAll text configurations are initially described in the 'ui_menu_text_data.json' file.\u003cbr\u003e\nThis file contains an array that lists the names of configuration files for all menu texts.\u003cbr\u003e\n**Example of buttons in ui_buttons_data.json file:**\n```json\n[\n    \"ui_back_to_start_menu_status_menu_text\",\n    \"ui_exit_menu_text\",\n    \"ui_settings_status_menu_text\",\n    \"ui_creators_menu_text\"\n]\n```\n\n**Example of 'ui_exit_menu_text.json' file:**\n```json\n{\n  \"type\": \"exit_menu\",\n  \"text\": \"exit_menu_text\",\n  \"coordinates\": {\n    \"x\": 1,\n    \"y\": 1\n  },\n  \"font\": null,\n  \"color\": \"#FFFFFF\",\n  \"substrate\": \"blank_big\"\n}\n```\n* **text** key contains as value link to text in localisation.\n* **coordinates** key contains as value dictionary with multipliers for the coordinates on which the text will be positioned, from the center.\n* **color** key contains as value color like string.\n\nPlease note that the '**substrate**' key contains the name of the sprite, as the value.\u003cbr\u003e\nSprites must be in **png** format and stored in a 'Menu_Substrate' folder.\u003cbr\u003e\n**Folder location:**\u003cbr\u003e\n**./**:open_file_folder:Source_code\u003cbr\u003e\n   └── :file_folder:Application\u003cbr\u003e\n            └── :file_folder:Assets\u003cbr\u003e\n                     └── :file_folder:Images\u003cbr\u003e\n                              └── :file_folder:User_Interface\u003cbr\u003e\n                                       └── :file_folder:Menu_Substrate\u003cbr\u003e\n\n**Learn more about coding your own interface:**\u003cbr\u003e\n\n**Files locations:**\u003cbr\u003e\n**./**:open_file_folder:Source_code\u003cbr\u003e\n   └── :file_folder:Application\u003cbr\u003e\n            └── :file_folder:Assets\u003cbr\u003e\n                     └── :file_folder:Scripts\u003cbr\u003e\n                              └── :file_folder:User_Interface\u003cbr\u003e\n                                       ├── :page_facing_up:Interface_Controller.py\u003cbr\u003e\n                                       ├── :page_facing_up:UI_Menu_Text.py\u003cbr\u003e\n                                       ├── :page_facing_up:UI_Button_Factory.py\u003cbr\u003e\n                                       ├── :file_folder:UI_Buttons\u003cbr\u003e\n                                        |       ├── :page_facing_up:UI_Base_Button.py\u003cbr\u003e\n                                        |       └── :page_facing_up:UI_\\*\\_Button.py **(Can be your button file)**\u003cbr\u003e\n                                       └── :file_folder:UI_Menus\u003cbr\u003e\n                                                └── :page_facing_up:UI_*_menu.py **(Can be your menu file)**\u003cbr\u003e\n\n**Buttons for new menu:**\u003cbr\u003e\nTo create new buttons, in any case, you need to update the collections of the **ButtonFactory** class from 'UI_Button_Factory.py' file.\u003cbr\u003e\nIf you want to use **standard button coordinates**.\u003cbr\u003e\nSimply update the lists under the **\"Interface collections\"** comment.\u003cbr\u003e\n**Example:**\n```python\n# Interface collections:\n_yes_no_menus: tuple = (\n    'exit_menu',\n    'settings_status_menu',\n    'back_to_start_menu_status_menu'\n)\n_long_buttons_menus: tuple = (\n    'game_menu',\n    'settings_menu',\n    'start_menu',\n    'creators_menu'\n)\n```\nIn **this case**, all settings will be applied **automatically**.\n\nIf your menu will hase a different way of calculating button positions, then\nyou need to create a **new button class** and make it inherit from the **BaseButton** abstract class.\u003cbr\u003e\nYou will also need to update the **\"button_collections\"** dictionary.\u003cbr\u003e\n**Example:**\n```python\n# Buttons collection:\n_button_collections: dict = {\n    'yes_no_menus': {\n        'button_object': YesNoButton,\n        'allowable_menus': _yes_no_menus\n    },\n    'long_buttons_menus': {\n        'button_object': LongButton,\n        'allowable_menus': _long_buttons_menus\n    }\n}\n```\nWhere is your **\"button_object\"** key value is your new class.\u003cbr\u003e\nAnd **\"allowable_menus\"** key value is tuple from under **\"Interface collections\"** comment.\n\n**New menu objects:**\u003cbr\u003e\nYou will need to modify the menus_collection dictionary of '**InputCommandsReactions**' in 'Reactions_to_input_commands.py' file.\u003cbr\u003e\nAdd a new item with menu settings to the dictionary.\u003cbr\u003e\n**Example:**\n```python\n_menus_collection: dict = {\n    'exit_menu': {\n        'object': ExitMenu(),\n        'menu_file': 'ui_exit_menu_buttons',\n        'text_file': 'ui_exit_menu_text'\n    },\n    'settings_menu': {\n        'object': SettingsMenu(),\n        'menu_file': 'ui_settings_menu_buttons',\n        'text_file': None\n    }\n}\n```\nAs a key for your menu collection element will act **\"type\"** key in your menus json file.\u003cbr\u003e\nPlease note that **None** key is reserved for reading gameplay UI.\u003cbr\u003e\nIn a nested dictionary, the **'object'** key value is your menu object.\u003cbr\u003e\nIf your menu does not have static text, set the value of the '**text_file**' key to 'None'.\n\nYou will also need to add your buttons to 'ui_localizations_data.json', and localization.json 'eng.json' as example.\u003cbr\u003e\nAnd create and fill a new 'ui_*_menu_buttons.json' file, for your menu.\n\nFinally, you will need to program your menu to work in a new python file.\u003cbr\u003e\nThe 'UI_Start_menu.py' as example.\n\n**Informative text for new menu:**\u003cbr\u003e\nIf you need to add static text, with or without a background, to your new menu then a new menu needs to be added to 'text_menu_localization.csv'.\u003cbr\u003e\nMore information about it «[Text and Localization](#Text-and-Localization)» paragraph.\n\nYou will also need to add a new menu to 'UI_Menu_Text.py' **MenuText** class '**scale**' method`s list.\u003cbr\u003e\nOr you can use the standard coordinates by adding a list for such text at the beginning of the MenuText class.\u003cbr\u003e\n**Example:**\n```python\n# Set menu lists:\n_yes_no_menu_text_list: list[str] = [\n    'back_to_start_menu_status_menu',\n    'exit_menu',\n    'settings_status_menu',\n]\n_back_menu_text_list: list[str] = [\n    'creators_menu'\n]\n```\n\n## Text and Localization:\n\nFor convenience, all text localizations are made in the form of files with tables in CSV format.\u003cbr\u003e\nThis approach allows you to simply add a column for each new language.\u003cbr\u003e\nDue to the specific nature of game text, tabulation is used as a separator.\u003cbr\u003e\nPlease pay **attention** to this fact.\u003cbr\u003e\nThis means that you **cannot** use the **Tab** character in any text, names or titles.\u003cbr\u003e\u003cbr\u003e\n\n**Files locations:**\u003cbr\u003e\n**./**:open_file_folder:Source_code\u003cbr\u003e\n   └── :file_folder:Application\u003cbr\u003e\n            └── :file_folder:Assets\u003cbr\u003e\n                     └── :file_folder:Localisation\u003cbr\u003e\n                              └── :file_folder:Main\u003cbr\u003e\n                                       ├── :page_facing_up:button_menu_localization.csv\u003cbr\u003e\n                                       ├── :page_facing_up:screenplay_localization.csv\u003cbr\u003e\n                                       └── :page_facing_up:text_menu_localization.csv\u003cbr\u003e\n\n**Button menu localization:**\u003cbr\u003e\nExample:\n\n| button_id           | eng      | ru         |\n|---------------------|----------|------------|\n| start_menu_new_game | New game | Новая игра |\n| start_menu_continue | Continue | Продолжить |\n| start_menu_load     | Load     | Загрузить  |\n| start_menu_settings | Settings | Настройки  |\n| start_menu_creators | Creators | Создатели  |\n| start_menu_exit     | Exit     | Выйти      |\n\n* **button_id** keep button id from ui_*menu_buttons.json files.\u003cbr\u003e\n* **eng** and **ru** are examples of string values which will be displayed on the buttons depending on the language settings.\u003cbr\u003e\n\n**Screenplay localization:**\u003cbr\u003e\nExample:\n\n| scene_id      | scene_type | choice_id | eng                     | ru                         |\n|---------------|------------|-----------|-------------------------|----------------------------|\n| test_scene_01 | reading    | Null      | Test Chan::Hello World! | Тестовая Тян::Привет Мир!  |\n| test_scene_02 | choice     | choice_01 | Go to Scene 01          | Перейти к сцене 01         |\n| test_scene_02 | choice     | choice_02 | ERROR!                  | ОШИБКА!                    |\n| test_scene_02 | choice     | choice_03 | Go to Scene 03          | Перейти к сцене 03         |\n| test_scene_03 | reading    | Null      | Test Chan::New Scene!   | Тестовая Тян::Новая Сцена! |\n\n* **scene_id**\u003cbr\u003e\nKeep the scene names for 'screenplay.json' file.\u003cbr\u003e\nPlease note that the values in this column may be repeated depending on the gameplay.\n\n* **scene_type**\u003cbr\u003e\nCan have value reading|choice.\u003cbr\u003e\nScenes with \"**reading**\" type have only one line.\u003cbr\u003e\nScenes with \"**choice**\" can have multiple lines.\u003cbr\u003e\nTheir number depends on the number of options to choose from.\u003cbr\u003e\nIt is not recommended to make the selection text too large to avoid bugs.\n\n* **choice_id**\u003cbr\u003e\nValue can be Null or choice id from 'screenplay.json' file.\u003cbr\u003e\n**Null** for reading gameplay type scenes. **Choice id** name for choice gameplay scenes.\n\n* **eng** and **ru** are examples of string values which will be displayed on the choice buttons or text canvas depending on the language settings.\u003cbr\u003e\nPlease note the combination of symbols \"**::**\" in this case is a separator for the name and text that the character says in the **Reading** gameplay type scene.\u003cbr\u003e\nThis means that you **cannot use this combination of characters** in either text or character names for reading gameplay.\n\n**Text menu localization:**\u003cbr\u003e\nExample:\n\n| text_id                             | eng                                                                            | ru                                                                                |\n|-------------------------------------|--------------------------------------------------------------------------------|-----------------------------------------------------------------------------------|\n| back_to_start_menu_status_menu_text | Would you like to return to the main menu?\\nAll unsaved progress will be lost! | Вы хотите вернутся в главное меню?\\nВесь несохраненный прогресс будет потерян!    |\n| exit_menu_text                      | Would you like to exit the game?\\nAll unsaved progress will be lost!           | Вы хотите выйти из игры?\\nВесь несохраненный прогресс будет потерян!              |\n| settings_status_menu_text           | Would you like to change the game settings?                                    | Вы желаете изменить настройки игры?                                               |\n| creators_menu_text                  | Character artist - ...\\nBackground artist - ...\\nProgramming - ...             | Художник по персонажам - ...\\nХудожник задних планов- ...\\nПрограммирование - ... |\n\n* **text_id** - id for \"**text**\" key in 'ui_*_menu_text.json' file.\n* **eng** and **ru** are examples of string values which will be displayed depending on the language settings.\u003cbr\u003e\nPlease note that the standard line break character \"**\\n**\" is used here and is written together between lines.\n\n## The name and icon of the game window:\nIn order to change the program name, you need to change the value of the variable '**app_name**' in 'Visual_novel_game.py'.\u003cbr\u003e\n**File location:**\u003cbr\u003e\n**./**:open_file_folder:Source_code\u003cbr\u003e\n   └── :file_folder:Application\u003cbr\u003e\n            └── :page_facing_up:Visual_novel_game.py\n\n**Example of app_name variable:**\n```python\napp_name: str = \"Visual Novel\"\n```\n\nIn order to change the program window icons, please replace the icon files in the '**Icons**' folder.\u003cbr\u003e\nIcons images must be in **png** format and have the default size and titles.\u003cbr\u003e\n**Folder location:**\u003cbr\u003e\n**./**:open_file_folder:Source_code\u003cbr\u003e\n   └── :file_folder:Application\u003cbr\u003e\n            └── :file_folder:Assets\u003cbr\u003e\n                     └── :file_folder:Images\u003cbr\u003e\n                              └── :file_folder:User_Interface\u003cbr\u003e\n                                       └── :file_folder:Icons\u003cbr\u003e\n\n## GamePlay:\nAll gameplay code is stored in the folder 'GamePlay'.\u003cbr\u003e\nIf you need to program your gameplay element, add it to the constructor of class '**GamePlayAdministrator**' from 'GamePlay_Administrator.py' file.\u003cbr\u003e\n'**gameplay_input**' method of this class control of gameplay.\n\n**Files locations:**\u003cbr\u003e\n**./**:open_file_folder:Source_code\u003cbr\u003e\n   └── :file_folder:Application\u003cbr\u003e\n            └── :file_folder:Assets\u003cbr\u003e\n                     └── :file_folder:Scripts\u003cbr\u003e\n                              └── :file_folder:GamePlay\u003cbr\u003e\n                                       ├── :page_facing_up:GamePlay_Administrator.py\u003cbr\u003e\n                                       └── :page_facing_up:GamePlay_*.py **(Can be your gameplay file)**\u003cbr\u003e\n\n## Default game settings:\nThe default settings are stored in a file **'user_settings'**.\u003cbr\u003e\nThe game reads them at startup and saves them there, with the consent to change by the user, after setting.\n\n**File location:**\u003cbr\u003e\n**./**:open_file_folder:Source_code\u003cbr\u003e\n   └── :file_folder:Application\u003cbr\u003e\n            └── :file_folder:Assets\u003cbr\u003e\n                     └── :page_facing_up:user_settings\u003cbr\u003e\n\n## Sound System:\nThe **SoundDirector** class is responsible for working with sound.\u003cbr\u003e\nInside, it works with three audio channels responsible for character speech, music and sound effects.\u003cbr\u003e\nAll sounds and music files **must be** in **MP3** format.\u003cbr\u003e\nYou can read more about installing audio tracks to game scenes in paragraph «[Settings of scenes](#Settings-of-scenes)».\u003cbr\u003e\n\nYour sound files should be located in their appropriate directories.\u003cbr\u003e\nHowever, there is a condition if you have multiple voice covers.\u003cbr\u003e\nIn this case, you will have to change the value of the **\"single_voiceover_language\"** attribute in the **Sound_Director** class from **True** to **False**.\u003cbr\u003e\nAfter this, you will need to add a sub folder for your voice acting to the **Voice** folder.\u003cbr\u003e\nAnd place sound files in it.\u003cbr\u003e\nWhen this option is enabled, the audio track select from folder stored in the **\"voice_acting_language\"** attribute of the **SettingsKeeper** class will be automatically selected.\u003cbr\u003e\nThis attribute can be changed in the settings menu, or in the settings file.\u003cbr\u003e\nNaturally, this voice acting does not have to be voice localization. But it is important to consider changes in the storage principle when enabling the option.\n\n**Files locations:**\u003cbr\u003e\n**./**:open_file_folder:Source_code\u003cbr\u003e\n   └── :file_folder:Application\u003cbr\u003e\n            └── :file_folder:Assets\u003cbr\u003e\n                     ├── :file_folder:Sounds\u003cbr\u003e\n                      |       ├── :file_folder:Effects\u003cbr\u003e\n                      |        |       └── :musical_note:\\*.mp3 **(Can be your sound file)**\u003cbr\u003e\n                      |       ├── :file_folder:Music\u003cbr\u003e\n                      |        |       └── :musical_note:\\*.mp3 **(Can be your music file)**\u003cbr\u003e\n                      |       └── :file_folder:Voice\u003cbr\u003e\n                      |                ├── :musical_note:\\*.mp3 **(Can be your sound file)**\u003cbr\u003e\n                      |                └── :file_folder:eng **(Optional!!!: Can be your localization folder)**\u003cbr\u003e\n                      |                         └── :musical_note:\\*.mp3 **(Optional!!!:Can be your sound file)**\u003cbr\u003e\n                     └── :file_folder:Scripts\u003cbr\u003e\n                              ├── :file_folder:Application_layer\u003cbr\u003e\n                               |       └── :page_facing_up:Sound_Director.py\u003cbr\u003e\n                              └── :file_folder:Json_data\u003cbr\u003e\n                                       └── :page_facing_up:menu_sound_settings.json\n\nTo install sounds and music in the menus, you need to modify the \"*menu_sound_settings.json*\" file.\u003cbr\u003e\n**Example of menu sound settings.:**\u003cbr\u003e\n```json\n{\n  \"start_menu\": {\n    \"music_channel\": \"blank\",\n    \"sound_channel\": false\n  }\n}\n```\nThe values of the sound and music keys must also be either **false** or the **name of the file** located in the corresponding folder.\u003cbr\u003e\nIf you add a sound effect, it will only play once.\n\n## How the program works:\n\n'Visual_novel_game.py' initializes game and call 'GameMaster' class.\u003cbr\u003e\nDuring the initiation process, the script creates the '**SettingsKeeper**' object that is responsible for the game settings.\u003cbr\u003e\nThe **GameMaster** class control game loop and generates lower-level entities that control the gameplay.\u003cbr\u003e\n* **StageDirector** - Controls the actions on the stage.\u003cbr\u003e\nControls who and what will say as well as the appearance of the characters.\u003cbr\u003e\nManages the scene background.\u003cbr\u003e\nGenerates a '**Character**', '**Background**' and '**DialoguesWords**' objects used to control staging.\n* **SoundDirector** - Play music, sound effects and speech for the scene if necessary.\n* **SceneValidator** - controls the order of the scenes.\u003cbr\u003e\nStores inside itself information about the type of scene with which the StageDirector and the SoundDirector.\n* **InterfaceController** - controls all interface with which the player can interact.\u003cbr\u003e\nGenerates '**Button**' instances with **'ButtonFactory'** and make menus from them.\n* **InputCommandsReactions** - catches user commands inside the game and passes them inside the loop to other entities.\u003cbr\u003e\nGenerates '**GamePlayAdministrator**' and all **menus** objects.\n* **Render** - renders the image after the calculations.\n\nSimplified: the **InputCommandsReactions** processes user commands.\u003cbr\u003e\nThe **SceneValidator** checks for changes.\u003cbr\u003e\nThe **StageDirector** builds a scene.\u003cbr\u003e\n**Or** the **InterfaceController** switches menu.\n\n**Files locations:**\u003cbr\u003e\n**./**:open_file_folder:Source_code\u003cbr\u003e\n   └── :file_folder:Application\u003cbr\u003e\n            └── :file_folder:Assets\u003cbr\u003e\n                     └── :file_folder:Scripts\u003cbr\u003e\n                              ├── :file_folder:Application_layer\u003cbr\u003e\n                              │       ├── :page_facing_up:Game_Master.py\u003cbr\u003e\n                              │       ├── :page_facing_up:Reactions_to_input_commands.py\u003cbr\u003e\n                              │       ├── :page_facing_up:Settings_Keeper.py\u003cbr\u003e\n                              │       ├── :page_facing_up:Sound_Director.py\u003cbr\u003e\n                              │       └── :page_facing_up:Stage_Director.py\u003cbr\u003e\n                              ├── :file_folder:Game_objects\u003cbr\u003e\n                              │       ├── :page_facing_up:Background.py\u003cbr\u003e\n                              │       ├── :page_facing_up:Character.py\u003cbr\u003e\n                              │       ├── :page_facing_up:Dialogues.py\u003cbr\u003e\n                              │       └── :page_facing_up:Scene_Validator.py\u003cbr\u003e\n                              ├── :file_folder:GamePlay\u003cbr\u003e\n                              │       └── :page_facing_up:GamePlay_Administrator.py\u003cbr\u003e\n                              ├── :file_folder:Render\u003cbr\u003e\n                              │       └── :page_facing_up:Render.py\u003cbr\u003e\n                              └── :file_folder:User_Interface\u003cbr\u003e\n                                       ├── :page_facing_up:Interface_Controller.py\u003cbr\u003e\n                                       └── :page_facing_up:UI_Button_Factory.py\u003cbr\u003e\n\nPlease note that the name of some classes does not correspond to the files where they are contained.\u003cbr\u003e\nBut according to the meaning of the names of the given files, it is still clear where they are.\n\n## Logging:\nThe program creates a logg file and writes messages about critical problems to it.\u003cbr\u003e\n**File location:**\u003cbr\u003e\n**./**:open_file_folder:Source_code\u003cbr\u003e\n   └── :file_folder:Application\u003cbr\u003e\n            └── :page_facing_up:logg_file.txt\n\n## Save and Load system:\nGame saves are located in the 'Saves' folder.\u003cbr\u003e\nThe game save is a subfolder with a simple json file marked as 'save' format and a png image.\u003cbr\u003e\nPlease note that the subfolder and the save file **must have the same name**.\u003cbr\u003e\n**Files locations:**\u003cbr\u003e\n**./**:open_file_folder:Source_code\u003cbr\u003e\n   └── :file_folder:Application\u003cbr\u003e\n            └── :file_folder:Saves\u003cbr\u003e\n                     └── :file_folder:AutoSave\u003cbr\u003e\n                              ├── :page_facing_up:AutoSave.save\u003cbr\u003e\n                              └── :framed_picture:screen_preview.png\u003cbr\u003e\n**Example of 'AutoSave.save' file:**\n```json\n{\n    \"scene\": \"test_scene_03\",\n    \"date\": \"2023-08-01_19:05:15\"\n}\n```\nThe **SaveKeeper** class from '**Save_Keeper.py**' file is responsible for working with saves.\u003cbr\u003e\n**File location:**\u003cbr\u003e\n**./**:open_file_folder:Source_code\u003cbr\u003e\n   └── :file_folder:Application\u003cbr\u003e\n            └── :file_folder:Assets\u003cbr\u003e\n                     └── :file_folder:Scripts\u003cbr\u003e\n                              └── :file_folder:Application_layer\u003cbr\u003e\n                                       └─── :page_facing_up:Save_Keeper.py\u003cbr\u003e\n\n# What needs to be completed:\n### Settings Menu:\nThe **'SettingsKeeper'** class already exists.\u003cbr\u003e\nIt must be used for business logic that will work in the menu.\u003cbr\u003e\nThe **'SettingsMenu'** class and its menu can be used as an external wrapper, or modified.\u003cbr\u003e\nI planned to use it as a wrapper and make a separate menu for each type of setting.\n\n### Special Effects:\nIt is planned to create template special effects for display on scenes.\n\n### Console utilities:\n* Utility for simplified texture data assembly\n* Localisation parser utility\n* Utility for compiling games for different operating systems.\n\n# Known Problems:\n\n### Incorrect sRGB profile:\n```text\nlibpng warning: iCCP: known incorrect sRGB profile\n```\nAppears due to extra information in the sRGB profile when converting to PNG.\u003cbr\u003e\nBecause of this, after the program ends, a warning message appears in the terminal.\u003cbr\u003e\nActually this warning is not an error.\u003cbr\u003e\n\nTo avoid this behavior, resave your sprites using the correct settings.\u003cbr\u003e\n\nAs an example of resaving in Photoshop:\n* Open your **png** image.\n* Select the \"**file**\" in the upper left corner.\n* Select the \"**save as**\" in the drop-down list that appears.\n* In the file saving window that opens uncheck the box opposite **ICC Profile: sRGB IEC61966-2.1**\n* Resave your png image.\n\nAs an example of resaving in Krita:\n* Open your **png** image.\n* Around the middle of the menu at the top of the program window, select an **image**.\n* Select the \"**Properties**\" in the drop-down list that appears.\n* In the menu that opens, select the **Image Color Space**.\n* Switch profile to **sRGB-elle-V2-srgbtrс.icc**\u003cbr\u003e\nUsually it is marked as **Default**.\n* Select the \"**file**\" in the upper left corner.\n* Select the \"**save as**\" in the drop-down list that appears.\n* Resave your png image.\n\nThere are other solutions to this problem using the operating system terminal and various console utilities.\u003cbr\u003e\n:warning:**Using** the solutions suggested below, **You** assume **responsibility for any consequences!**:warning:\u003cbr\u003e\nAs an example these [solutions from stackoverflow](https://stackoverflow.com/questions/22745076/libpng-warning-iccp-known-incorrect-srgb-profile/22747902#22747902).\n\n### Problems installing Python on Windows:\n\nWhen installing Python from the official website, you may encounter the fact that the operating system or IDE cannot find it.\u003cbr\u003e\nThere are several ways to solve this problem:\n* The easiest way to fix this problem is to install Python using the Microsoft Store.\u003cbr\u003e\nYou can find a program that gives access to it directly on your PC using Windows search.\n* Try to **reinstall** Python and select the checkbox \"**Add Python to environment variables**\".\n* Add Python to your operating system's environment variables manually.\n\n***\n\n:hearts: **Thank you** for your interest in my work! :hearts:\u003cbr\u003e\u003cbr\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpawsanie%2Fnovelist","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpawsanie%2Fnovelist","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpawsanie%2Fnovelist/lists"}