tinyecs 0.3.2__tar.gz → 0.3.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (33) hide show
  1. tinyecs-0.3.3/PKG-INFO +77 -0
  2. tinyecs-0.3.3/README.md +60 -0
  3. tinyecs-0.3.3/docs/Makefile +20 -0
  4. tinyecs-0.3.3/docs/make.bat +35 -0
  5. tinyecs-0.3.3/docs/source/api.rst +71 -0
  6. tinyecs-0.3.3/docs/source/conf.py +51 -0
  7. tinyecs-0.3.3/docs/source/index.rst +14 -0
  8. tinyecs-0.3.3/docs/source/introduction.rst +63 -0
  9. tinyecs-0.3.3/docs/source/tutorial.rst +561 -0
  10. {tinyecs-0.3.2 → tinyecs-0.3.3}/pyproject.toml +8 -1
  11. {tinyecs-0.3.2 → tinyecs-0.3.3}/src/tinyecs/__init__.py +449 -205
  12. {tinyecs-0.3.2 → tinyecs-0.3.3}/src/tinyecs/tutorial.py +3 -3
  13. tinyecs-0.3.3/src/tinyecs.egg-info/PKG-INFO +77 -0
  14. {tinyecs-0.3.2 → tinyecs-0.3.3}/src/tinyecs.egg-info/SOURCES.txt +7 -0
  15. {tinyecs-0.3.2 → tinyecs-0.3.3}/tests/test_tinyecs.py +61 -30
  16. tinyecs-0.3.2/PKG-INFO +0 -717
  17. tinyecs-0.3.2/README.md +0 -700
  18. tinyecs-0.3.2/src/tinyecs.egg-info/PKG-INFO +0 -717
  19. {tinyecs-0.3.2 → tinyecs-0.3.3}/LICENSE +0 -0
  20. {tinyecs-0.3.2 → tinyecs-0.3.3}/setup.cfg +0 -0
  21. {tinyecs-0.3.2 → tinyecs-0.3.3}/src/tinyecs/components.py +0 -0
  22. {tinyecs-0.3.2 → tinyecs-0.3.3}/src/tinyecs/compsys.py +0 -0
  23. {tinyecs-0.3.2 → tinyecs-0.3.3}/src/tinyecs/demo.py +0 -0
  24. {tinyecs-0.3.2 → tinyecs-0.3.3}/src/tinyecs/demos/__init__.py +0 -0
  25. {tinyecs-0.3.2 → tinyecs-0.3.3}/src/tinyecs/demos/background.py +0 -0
  26. {tinyecs-0.3.2 → tinyecs-0.3.3}/src/tinyecs/demos/bouncing_sprites.py +0 -0
  27. {tinyecs-0.3.2 → tinyecs-0.3.3}/src/tinyecs/demos/example.py +0 -0
  28. {tinyecs-0.3.2 → tinyecs-0.3.3}/src/tinyecs/demos/homing-missiles.py +0 -0
  29. {tinyecs-0.3.2 → tinyecs-0.3.3}/src/tinyecs/demos/marquee.py +0 -0
  30. {tinyecs-0.3.2 → tinyecs-0.3.3}/src/tinyecs.egg-info/dependency_links.txt +0 -0
  31. {tinyecs-0.3.2 → tinyecs-0.3.3}/src/tinyecs.egg-info/entry_points.txt +0 -0
  32. {tinyecs-0.3.2 → tinyecs-0.3.3}/src/tinyecs.egg-info/requires.txt +0 -0
  33. {tinyecs-0.3.2 → tinyecs-0.3.3}/src/tinyecs.egg-info/top_level.txt +0 -0
tinyecs-0.3.3/PKG-INFO ADDED
@@ -0,0 +1,77 @@
1
+ Metadata-Version: 2.4
2
+ Name: tinyecs
3
+ Version: 0.3.3
4
+ Summary: The teeniest, tiniest ECS system
5
+ Author-email: Michael Lamertz <michael.lamertz@gmail.com>
6
+ License-Expression: MIT
7
+ Project-URL: homepage, https://github.com/dickerdackel/tinyecs
8
+ Project-URL: bugtracker, https://github.com/DickerDackel/tinyecs/issues
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: Topic :: Games/Entertainment
12
+ Classifier: Topic :: Software Development :: Libraries :: pygame
13
+ Description-Content-Type: text/markdown
14
+ License-File: LICENSE
15
+ Requires-Dist: pgcooldown
16
+ Dynamic: license-file
17
+
18
+ # tinyecs - The teeniest, tiniest ECS for python
19
+
20
+ ECS stands for Entity Component System, and it is a programming paradigm that
21
+ differs from the well known OO.
22
+
23
+ During my research I stumbled over
24
+
25
+ [this article](https://web.archive.org/web/20250408195932/https://t-machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/)
26
+
27
+ and after reading part 2 and 3, I decided to implement an ECS myself, well
28
+ aware that `esper` is a solid and long existing implementation, but I wanted
29
+ to see how to implement it myself.
30
+
31
+ I'm not trying to sell you an ECS by explaining the problems of multiple
32
+ inheritance in game programming. There are articles out there that do this in
33
+ much detail. If you're here, you're already interested in the concept, so
34
+ the tutorial might be a good starting point. It will create a small demo with
35
+ bouncing sprites using pygame-ce. But tinyecs is platform agnostic, you can
36
+ use it with whatever library you like.
37
+
38
+
39
+ ## Installation
40
+
41
+ tinyecs is available on pip and can be installed by::
42
+
43
+ pip install tinyecs
44
+
45
+ The project is maintained and hosted on github at
46
+ https://github.com/dickerdackel/tinyecs, where you also can find the wheels
47
+ for a local install, or install it directly from the cloned repo.
48
+
49
+ ```console
50
+ git clone https://github.com/dickerdackel/tinyecs
51
+ cd tinyecs
52
+ python3 -m venv --prompt tinyecs .venv
53
+ .venv/bin/activate
54
+ # or .venv/Scripts/activate.bat on windows
55
+ pip install .
56
+ ```
57
+
58
+ ## Support / Contributing
59
+
60
+ Issues can be opened on `Github`_
61
+
62
+ .. _Github: https://github.com/dickerdackel/tinyecs/issues
63
+
64
+ Please respect, that I don't want any contributions done with the assistance
65
+ of AI. This is a hobby project with focus on the craft of programming. I
66
+ have experimentally used AI to audit parts of the code and documentation, and
67
+ while it found a lot of typos and 2 actual issues, without exception, the
68
+ provided solutions were often besides the point or plain wrong.
69
+
70
+ I have no possibility to enforce that request, the simple fact that I ask for
71
+ it should be sufficient.
72
+
73
+ ## License
74
+
75
+ This software is provided under the MIT license.
76
+
77
+ See LICENSE file for details.
@@ -0,0 +1,60 @@
1
+ # tinyecs - The teeniest, tiniest ECS for python
2
+
3
+ ECS stands for Entity Component System, and it is a programming paradigm that
4
+ differs from the well known OO.
5
+
6
+ During my research I stumbled over
7
+
8
+ [this article](https://web.archive.org/web/20250408195932/https://t-machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/)
9
+
10
+ and after reading part 2 and 3, I decided to implement an ECS myself, well
11
+ aware that `esper` is a solid and long existing implementation, but I wanted
12
+ to see how to implement it myself.
13
+
14
+ I'm not trying to sell you an ECS by explaining the problems of multiple
15
+ inheritance in game programming. There are articles out there that do this in
16
+ much detail. If you're here, you're already interested in the concept, so
17
+ the tutorial might be a good starting point. It will create a small demo with
18
+ bouncing sprites using pygame-ce. But tinyecs is platform agnostic, you can
19
+ use it with whatever library you like.
20
+
21
+
22
+ ## Installation
23
+
24
+ tinyecs is available on pip and can be installed by::
25
+
26
+ pip install tinyecs
27
+
28
+ The project is maintained and hosted on github at
29
+ https://github.com/dickerdackel/tinyecs, where you also can find the wheels
30
+ for a local install, or install it directly from the cloned repo.
31
+
32
+ ```console
33
+ git clone https://github.com/dickerdackel/tinyecs
34
+ cd tinyecs
35
+ python3 -m venv --prompt tinyecs .venv
36
+ .venv/bin/activate
37
+ # or .venv/Scripts/activate.bat on windows
38
+ pip install .
39
+ ```
40
+
41
+ ## Support / Contributing
42
+
43
+ Issues can be opened on `Github`_
44
+
45
+ .. _Github: https://github.com/dickerdackel/tinyecs/issues
46
+
47
+ Please respect, that I don't want any contributions done with the assistance
48
+ of AI. This is a hobby project with focus on the craft of programming. I
49
+ have experimentally used AI to audit parts of the code and documentation, and
50
+ while it found a lot of typos and 2 actual issues, without exception, the
51
+ provided solutions were often besides the point or plain wrong.
52
+
53
+ I have no possibility to enforce that request, the simple fact that I ask for
54
+ it should be sufficient.
55
+
56
+ ## License
57
+
58
+ This software is provided under the MIT license.
59
+
60
+ See LICENSE file for details.
@@ -0,0 +1,20 @@
1
+ # Minimal makefile for Sphinx documentation
2
+ #
3
+
4
+ # You can set these variables from the command line, and also
5
+ # from the environment for the first two.
6
+ SPHINXOPTS ?=
7
+ SPHINXBUILD ?= sphinx-build
8
+ SOURCEDIR = source
9
+ BUILDDIR = ../build
10
+
11
+ # Put it first so that "make" without argument is like "make help".
12
+ help:
13
+ @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14
+
15
+ .PHONY: help Makefile
16
+
17
+ # Catch-all target: route all unknown targets to Sphinx using the new
18
+ # "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19
+ %: Makefile
20
+ @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
@@ -0,0 +1,35 @@
1
+ @ECHO OFF
2
+
3
+ pushd %~dp0
4
+
5
+ REM Command file for Sphinx documentation
6
+
7
+ if "%SPHINXBUILD%" == "" (
8
+ set SPHINXBUILD=sphinx-build
9
+ )
10
+ set SOURCEDIR=source
11
+ set BUILDDIR=../build
12
+
13
+ %SPHINXBUILD% >NUL 2>NUL
14
+ if errorlevel 9009 (
15
+ echo.
16
+ echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
17
+ echo.installed, then set the SPHINXBUILD environment variable to point
18
+ echo.to the full path of the 'sphinx-build' executable. Alternatively you
19
+ echo.may add the Sphinx directory to PATH.
20
+ echo.
21
+ echo.If you don't have Sphinx installed, grab it from
22
+ echo.https://www.sphinx-doc.org/
23
+ exit /b 1
24
+ )
25
+
26
+ if "%1" == "" goto help
27
+
28
+ %SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
29
+ goto end
30
+
31
+ :help
32
+ %SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O%
33
+
34
+ :end
35
+ popd
@@ -0,0 +1,71 @@
1
+ tinyecs API
2
+ ===========
3
+
4
+ .. contents::
5
+ :class: this-will-duplicate-information-and-it-is-still-useful-here
6
+
7
+ Primary functions
8
+ -----------------
9
+
10
+ .. autofunction:: tinyecs.create_entity
11
+ .. autofunction:: tinyecs.add_component
12
+ .. autofunction:: tinyecs.add_components
13
+ .. autofunction:: tinyecs.remove_component
14
+ .. autofunction:: tinyecs.run_system
15
+
16
+ Requesting components
17
+ ---------------------
18
+
19
+ .. autofunction:: tinyecs.comp_of_eid
20
+ .. autofunction:: tinyecs.comps_of_eid
21
+ .. autofunction:: tinyecs.eid_has
22
+
23
+ ECS Management
24
+ --------------
25
+
26
+ .. autofunction:: tinyecs.reset
27
+
28
+ Running systems in bulk
29
+ -----------------------
30
+
31
+ .. autofunction:: tinyecs.add_system
32
+ .. autofunction:: tinyecs.remove_system
33
+ .. autofunction:: tinyecs.run_all_systems
34
+
35
+ .. autofunction:: tinyecs.add_system_to_domain
36
+ .. autofunction:: tinyecs.remove_system_from_domain
37
+ .. autofunction:: tinyecs.run_domain
38
+
39
+ Other helpers
40
+ -------------
41
+
42
+ .. autofunction:: tinyecs.cid_of_comp
43
+ .. autofunction:: tinyecs.cids_of_eid
44
+ .. autofunction:: tinyecs.eid_of_comp
45
+ .. autofunction:: tinyecs.eids_by_cids
46
+ .. autofunction:: tinyecs.has
47
+ .. autofunction:: tinyecs.healthcheck
48
+
49
+ Archetypes
50
+ ----------
51
+
52
+ .. autofunction:: tinyecs.create_archetype
53
+ .. autofunction:: tinyecs.add_to_archetype
54
+ .. autofunction:: tinyecs.comps_of_archetype
55
+ .. autofunction:: tinyecs.remove_archetype
56
+ .. autofunction:: tinyecs.remove_from_archetype
57
+
58
+ Properties
59
+ ----------
60
+ .. autofunction:: tinyecs.set_property
61
+ .. autofunction:: tinyecs.set_properties
62
+ .. autofunction:: tinyecs.remove_property
63
+ .. autofunction:: tinyecs.has_property
64
+ .. autofunction:: tinyecs.clear_properties
65
+ .. autofunction:: tinyecs.eids_by_property
66
+ .. autofunction:: tinyecs.purge_by_property
67
+
68
+ .. .. automodule:: tinyecs
69
+ .. :members:
70
+ .. :undoc-members:
71
+ .. :show-inheritance:
@@ -0,0 +1,51 @@
1
+ # Configuration file for the Sphinx documentation builder.
2
+ #
3
+ # For the full list of built-in configuration values, see the documentation:
4
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html
5
+
6
+ # -- Project information -----------------------------------------------------
7
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#project-information
8
+
9
+ import os
10
+ import sys
11
+
12
+ sys.path.insert(0, os.path.abspath('../../src'))
13
+
14
+ project = 'tinyecs'
15
+ copyright = '2026, Michael "Dicker Dackel" Lamertz'
16
+ author = 'Michael "Dicker Dackel" Lamertz'
17
+ release = '0.3.3'
18
+
19
+ # -- General configuration ---------------------------------------------------
20
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#general-configuration
21
+
22
+ extensions = [
23
+ 'sphinx.ext.autodoc',
24
+ 'sphinx.ext.doctest',
25
+ 'sphinx.ext.todo',
26
+ 'sphinx.ext.viewcode',
27
+ 'sphinx.ext.napoleon',
28
+ 'myst_parser',
29
+ ]
30
+
31
+ templates_path = ['_templates']
32
+ exclude_patterns = ['_build', 'Thumbs.db', '.DS_Store']
33
+
34
+
35
+
36
+ # -- Options for HTML output -------------------------------------------------
37
+ # https://www.sphinx-doc.org/en/master/usage/configuration.html#options-for-html-output
38
+
39
+ html_theme = 'furo'
40
+ html_static_path = ['_static']
41
+ html_theme_options = {
42
+ "navigation_with_keys": True,
43
+ "source_repository": "https://github.com/dickerdackel/tinyecs",
44
+ "source_branch": "main",
45
+ "source_directory": "docs/",
46
+ "dark_css_variables": {
47
+ "color-api-pre-name": "orange",
48
+ "color-api-name": "orange",
49
+ }
50
+ }
51
+
@@ -0,0 +1,14 @@
1
+ tinyecs - The teeniest, tiniest python ECS
2
+ ###########################################
3
+
4
+ .. toctree::
5
+ :caption: Contents:
6
+
7
+ introduction
8
+ tutorial
9
+ api
10
+
11
+ Indices
12
+ =======
13
+
14
+ * :ref:`genindex`
@@ -0,0 +1,63 @@
1
+ Introduction
2
+ ############
3
+
4
+ ECS stands for Entity Component System, and it is a programming paradigm that
5
+ differs from the well known OO.
6
+
7
+ During my research I stumbled over `this article`_ and after reading part 2 and
8
+ 3, I decided to implement an ECS myself, well aware that `esper` is a solid
9
+ and long existing implementation, but I wanted to see how to implement it
10
+ myself.
11
+
12
+ .. _this article: https://web.archive.org/web/20250408195932/https://t-machine.org/index.php/2007/09/03/entity-systems-are-the-future-of-mmog-development-part-1/
13
+
14
+
15
+ I'm not trying to sell you an ECS by explaining the problems of multiple
16
+ inheritance in game programming. There are articles out there that do this in
17
+ much detail. If you're here, you're already interested in the concept, so
18
+ the tutorial might be a good starting point. It will create a small demo with
19
+ bouncing sprites using pygame-ce. But tinyecs is platform agnostic, you can
20
+ use it with whatever library you like.
21
+
22
+
23
+ Installation
24
+ ============
25
+
26
+ tinyecs is available on pip and can be installed by::
27
+
28
+ pip install tinyecs
29
+
30
+ The project is maintained and hosted on `github`_, where you also can find the
31
+ wheels for a local install, or install it directly from the cloned repo.
32
+
33
+ .. _github: https://github.com/dickerdackel/tinyecs
34
+
35
+ git clone https://github.com/dickerdackel/tinyecs
36
+ cd tinyecs
37
+ python3 -m venv --prompt tinyecs .venv
38
+ .venv/bin/activate
39
+ # or .venv/Scripts/activate.bat on windows
40
+ pip install .
41
+
42
+ Support / Contributing
43
+ ======================
44
+
45
+ Issues can be opened on `Github`_
46
+
47
+ .. _Github: https://github.com/dickerdackel/tinyecs/issues
48
+
49
+ Please respect, that I don't want any contributions done with the assistance
50
+ of AI. This is a hobby project with focus on the craft of programming. I
51
+ have experimentally used AI to audit parts of the code and documentation, and
52
+ while it found a lot of typos and 2 actual issues, without exception, the
53
+ provided solutions were often besides the point or plain wrong.
54
+
55
+ I have no possibility to enforce that request, the simple fact that I ask for
56
+ it should be sufficient.
57
+
58
+ License
59
+ =======
60
+
61
+ This software is provided under the MIT license.
62
+
63
+ See LICENSE file for details.