|
6 | 6 | [](https://img.shields.io/github/commit-activity/m/linhns/pyfalldown) |
7 | 7 | [](https://img.shields.io/github/license/linhns/pyfalldown) |
8 | 8 |
|
9 | | -Python Falldown game |
| 9 | +**pyfalldown** is a platformer game built with |
| 10 | +[pygame](https://www.pygame.org/), inspired by the classic arcade era. |
10 | 11 |
|
11 | | -- **Github repository**: <https://github.com/linhns/pyfalldown/> |
12 | | -- **Documentation** <https://linhns.github.io/pyfalldown/> |
| 12 | +In this game, you guide a circular ball downward, navigating through platforms. |
| 13 | +Your objective is to collect triangles while avoiding squares. Be careful not to |
| 14 | +touch the top or bottom edges of the screen! |
13 | 15 |
|
14 | | -## Getting started with your project |
| 16 | + |
15 | 17 |
|
16 | | -### 1. Create a New Repository |
| 18 | +## Installation |
17 | 19 |
|
18 | | -First, create a repository on GitHub with the same name as this project, and then run the following commands: |
| 20 | +- Using [pip](https://github.com/pypa/pip): |
19 | 21 |
|
20 | | -```bash |
21 | | -git init -b main |
22 | | -git add . |
23 | | -git commit -m "init commit" |
24 | | -git remote add origin git@github.com:linhns/pyfalldown.git |
25 | | -git push -u origin main |
26 | | -``` |
| 22 | + ```shell |
| 23 | + pip install pyfalldown |
| 24 | + ``` |
27 | 25 |
|
28 | | -### 2. Set Up Your Development Environment |
| 26 | + Then, run the game: |
29 | 27 |
|
30 | | -Then, install the environment and the pre-commit hooks with |
| 28 | + ```shell |
| 29 | + pyfalldown |
| 30 | + ``` |
31 | 31 |
|
32 | | -```bash |
33 | | -make install |
34 | | -``` |
| 32 | + or: |
35 | 33 |
|
36 | | -This will also generate your `uv.lock` file |
| 34 | + ```shell |
| 35 | + python -m pyfalldown |
| 36 | + ``` |
37 | 37 |
|
38 | | -### 3. Run the pre-commit hooks |
| 38 | +- Run without installation using [uv](https://github.com/astral-sh/uv): |
39 | 39 |
|
40 | | -Initially, the CI/CD pipeline might be failing due to formatting issues. To resolve those run: |
| 40 | + ```shell |
| 41 | + uvx pyfalldown |
| 42 | + ``` |
41 | 43 |
|
42 | | -```bash |
43 | | -uv run pre-commit run -a |
44 | | -``` |
| 44 | +## Rules |
45 | 45 |
|
46 | | -### 4. Commit the changes |
| 46 | +- The game is over if the ball hits the top or bottom edge of the screen. |
| 47 | +- Collecting a triangle earns you a random score between 1 and 5 points. |
| 48 | +- Hitting a square deducts a random 1 to 5 points from your score. |
47 | 49 |
|
48 | | -Lastly, commit the changes made by the two steps above to your repository. |
| 50 | +## Usage |
49 | 51 |
|
50 | | -```bash |
51 | | -git add . |
52 | | -git commit -m 'Fix formatting issues' |
53 | | -git push origin main |
54 | | -``` |
55 | | - |
56 | | -You are now ready to start development on your project! |
57 | | -The CI/CD pipeline will be triggered when you open a pull request, merge to main, or when you create a new release. |
58 | | - |
59 | | -To finalize the set-up for publishing to PyPI, see [here](https://fpgmaas.github.io/cookiecutter-uv/features/publishing/#set-up-for-pypi). |
60 | | -For activating the automatic documentation with MkDocs, see [here](https://fpgmaas.github.io/cookiecutter-uv/features/mkdocs/#enabling-the-documentation-on-github). |
61 | | -To enable the code coverage reports, see [here](https://fpgmaas.github.io/cookiecutter-uv/features/codecov/). |
62 | | - |
63 | | -## Releasing a new version |
64 | | - |
65 | | -- Create an API Token on [PyPI](https://pypi.org/). |
66 | | -- Add the API Token to your projects secrets with the name `PYPI_TOKEN` by visiting [this page](https://github.com/linhns/pyfalldown/settings/secrets/actions/new). |
67 | | -- Create a [new release](https://github.com/linhns/pyfalldown/releases/new) on Github. |
68 | | -- Create a new tag in the form `*.*.*`. |
69 | | - |
70 | | -For more details, see [here](https://fpgmaas.github.io/cookiecutter-uv/features/cicd/#how-to-trigger-a-release). |
71 | | - |
72 | | ---- |
73 | | - |
74 | | -Repository initiated with [fpgmaas/cookiecutter-uv](https://github.com/fpgmaas/cookiecutter-uv). |
| 52 | +- Move ball using `Left`/`Right` arrow keys. |
0 commit comments