From fa01a9ab4412eab5d8919eff4dd3d7245d57fb18 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niklas=20Wockenfu=C3=9F?= Date: Sat, 30 Nov 2024 13:02:36 +0100 Subject: [PATCH] More docs, Google verification added, setup-requirement cleanup --- docs/conf.py | 8 ++++++++ docs/getting-started/basics.rst | 15 +++++++++++++++ docs/index.rst | 1 + requirements.txt | 6 +++++- setup.py | 9 ++++++++- 5 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 docs/getting-started/basics.rst diff --git a/docs/conf.py b/docs/conf.py index 2729126..a8437cb 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -3,6 +3,14 @@ # For the full list of built-in configuration values, see the documentation: # https://www.sphinx-doc.org/en/master/usage/configuration.html +html_title = "GameCore" +html_short_title = "GameCore" + +html_meta = { + "google-site-verification": "I2IxJ6FXf5yD7T1OcSDMVSXwIqEZ0Aj2rHD70owkVGU" +} + + # -- Project information ----------------------------------------------------- # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information diff --git a/docs/getting-started/basics.rst b/docs/getting-started/basics.rst new file mode 100644 index 0000000..64e4cdd --- /dev/null +++ b/docs/getting-started/basics.rst @@ -0,0 +1,15 @@ +Basics +====== + +Game engines are structured to provide a framework for creating and managing the various components of a game, such as rendering, physics, input, and scripting. The core idea is to streamline development by offering reusable systems and tools. + +Start and Update Methods +^^^^^^^^^^^^^^^^^^^^^^^^ + +* ``Start Method``: Used for initialization logic. It runs once when an object is first created or activated in the game. +* ``Update Method``: Used for per-frame logic. It runs repeatedly, usually once per frame, and handles dynamic behaviors like movement or input processing. + +Prefabs +^^^^^^^ + +Prefabs are preconfigured templates for game objects. They allow developers to create reusable objects with predefined properties, behaviors, and hierarchies, making it easier to replicate consistent objects throughout the game. \ No newline at end of file diff --git a/docs/index.rst b/docs/index.rst index fd3a326..64f0b26 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -30,6 +30,7 @@ Examples getting-started/requirements getting-started/external-tools + getting-started/basics getting-started/how-to-use .. toctree:: diff --git a/requirements.txt b/requirements.txt index f0a6cd6..6514d88 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,4 +2,8 @@ pygame perlin-noise bridson numpy -pytmx \ No newline at end of file +pytmx + +# for docs +sphinx +sphinx-rtd-theme \ No newline at end of file diff --git a/setup.py b/setup.py index f45aea6..bf79a15 100644 --- a/setup.py +++ b/setup.py @@ -2,7 +2,14 @@ def parse_requirements(filename): with open(filename, "r") as file: - return [line.strip() for line in file if line.strip() and not line.startswith("#")] + requirements = [] + for line in file: + if line.strip() and not line.startswith("#"): + requirements.append(line.strip()) + else: + if line.strip() and "" in line.strip(): + return requirements + return requirements setup( name="GameCore",