Skip to content

Commit

Permalink
Release 2.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
YariKartoshe4ka committed Dec 15, 2021
2 parents eaa9d0f + d8a85f8 commit 6b3fe7b
Show file tree
Hide file tree
Showing 38 changed files with 2,701 additions and 912 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
on:
push:
branches:
- develop

pull_request:
branches:
- develop

name: Check

jobs:
run-tests:
name: Run tests - Python ${{ matrix.py }}
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
py:
- "3.10"
- "3.9"
- "3.8"
- "3.7"
- "3.6"
steps:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.py }}
- name: Checkout code
uses: actions/checkout@v2
- name: Install dependencies
run: pip install -r requirements.txt pytest pytest-cov pytest-xdist[psutil] pytest-timeout
- name: Run tests
run: python -m pytest -n auto --cov spaceway --cov-report xml --color=yes tests/
env:
SDL_VIDEODRIVER: dummy
- name: Upload coverage
uses: codecov/codecov-action@v2
37 changes: 36 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ jobs:
- name: Install Space Way
run: pip install .
- name: Build binary
run: pyinstaller --onefile --noconsole --icon=spaceway/icon.ico --collect-all spaceway "Space Way.py"
run: pyinstaller -Fw -i spaceway/icon.ico --collect-all spaceway --hidden-import platformdirs.windows "Space Way.py"
- name: Upload binary
uses: actions/upload-release-asset@v1
env:
Expand All @@ -58,6 +58,41 @@ jobs:
asset_name: "Space-Way-${{ needs.create-release.outputs.tag_name }}.exe"
asset_content_type: application/exe

build-android:
name: Build for Android
runs-on: ubuntu-latest
needs: create-release
steps:
- name: Setup Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Checkout code
uses: actions/checkout@v2
with:
ref: android
- name: Configure payloads
run: |
VERSION=$(jq < spaceway/config/config.json .version -r)
sed -i "s/#VERSION#/$VERSION/" buildozer.spec
sed -i "s/#VERSION#/'$VERSION'/" setupfiles/android/p4a_recipes/spaceway/__init__.py
- name: Build APK
uses: ArtemSBulgakov/buildozer-action@v1
id: buildozer
with:
command: |
python3 setup.py sdist
PATH_TO_PACKAGES=$(pwd)/dist buildozer android debug
- name: Upload APK
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GH_API_TOKEN }}
with:
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_path: ${{ steps.buildozer.outputs.filename }}
asset_name: "Space-Way-${{ needs.create-release.outputs.tag_name }}.apk"
asset_content_type: application/vnd.android.package-archive

publish-pypi:
name: Publish on PyPI
runs-on: ubuntu-latest
Expand Down
7 changes: 3 additions & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,11 +1,10 @@
venv
__pycache__
*.pyc
*.debug.*
.p4a
other
tmp
build
dist
*.egg-info
aliases
.coverage
bin
.buildozer
18 changes: 12 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@

Arcade game about space, in which you must overcome the space path by flying around obstacles

![](https://img.shields.io/pypi/v/spaceway) ![](https://img.shields.io/github/release-date/YariKartoshe4ka/Space-Way) ![](https://img.shields.io/pypi/dm/spaceway)
![](https://img.shields.io/pypi/v/spaceway) ![](https://img.shields.io/github/release-date/YariKartoshe4ka/Space-Way) ![](https://img.shields.io/pypi/dm/spaceway) <br>
![](https://img.shields.io/codecov/c/github/YariKartoshe4ka/Space-Way) ![](https://img.shields.io/github/issues-raw/YariKartoshe4ka/Space-Way/help%20wanted)

<img src="https://raw.githubusercontent.com/YariKartoshe4ka/Space-Way/master/docs/icons/icon_fit.svg" width=128 />

Expand All @@ -13,11 +14,16 @@ Arcade game about space, in which you must overcome the space path by flying aro

### Installation

###### Compiled (Only Windows)
###### Compiled (Windows 10+)

1. Download Space Way installer from [latest releases](https://github.com/YariKartoshe4ka/Space-Way/releases/latest)
2. Launch the installer and install Space Way
3. Launch the program with a shortcut
1. Download Space Way binary from [latest releases](https://github.com/YariKartoshe4ka/Space-Way/releases/latest) (ends on **.exe**)
2. Launch program and play!

###### Compiled (Android 5.0+)

1. Download Space Way package file from [latest releases](https://github.com/YariKartoshe4ka/Space-Way/releases/latest) (ends on **.apk**)
2. Launch it and install Space Way
3. Run game with shortcut and play!

###### Via pip (All platforms)

Expand All @@ -36,7 +42,6 @@ I am not a professional game developer (this is my first game), and I do not kno

1. Music and sprites update
2. Add more obstacles for different levels of difficulty
3. Add support of Android (very far future, >100 stars on this repo)

[and many other things...](https://github.com/YariKartoshe4ka/Space-Way/blob/master/docs/TODO.md)

Expand All @@ -45,6 +50,7 @@ I am not a professional game developer (this is my first game), and I do not kno

If you want to contribute to this repo, check out [TODO.md](https://github.com/YariKartoshe4ka/Space-Way/blob/master/docs/TODO.md) and check out what you can do<br>
I am currently looking for artists to evaluate and rework sprites<br>
You can also look at the issue marked as *"help wanted"* and help to solve them<br>
I welcome information about bugs, ideas and suggestions, always open for issue and pull requests<br>


Expand Down
4 changes: 2 additions & 2 deletions docs/CODESTYLE.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@ Now project has this structure:
|____ collection.py
|____ config.py
|____ debug.py
|____ hitbox.py
|____ main.py
|____ mixins.py
|____ rect.py
|____ updater.py
|____ assets
| |____ <fonts, sprites, sounds and other binary files...>
Expand All @@ -33,9 +33,9 @@ General files:
- *collection.py* - file with the implementation of additional data structures, mainly the *pygame.sprite.Group* extensions
- *config.py* - file with some objects for easier configuration management
- *debug.py* - file with some objects for easier debugging game
- *hitbox.py* - file with implementation of hitboxes for some objects calculations
- *main.py* - main file, import all modules, contains the entrypoint of game and connects all the scenes together
- *mixins.py* - file with mixins which are needed for simple creation of the same type of objects (DRY principle)
- *rect.py* - file with implementation of a `pygame.Rect` for working with float values
- *updater.py* - file responsible for updating Space Way

Assets:
Expand Down
8 changes: 7 additions & 1 deletion docs/UPDATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,15 @@

###### Windows

1. Download new Space Way binary from [latest releases](https://github.com/YariKartoshe4ka/Space-Way/releases/latest) (installer ends on **.exe**)
1. Download new Space Way binary from [latest releases](https://github.com/YariKartoshe4ka/Space-Way/releases/latest) (ends on **.exe**)
2. Launch program and play!

###### Android

1. Download new Space Way package from [latest releases](https://github.com/YariKartoshe4ka/Space-Way/releases/latest) (ends on **.apk**)
2. Launch, it will offer you to update Space Way, you should agree
3. Run game with shortcut and play!

###### Other

1. Update Sapce Way via PIP
Expand Down
4 changes: 2 additions & 2 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pygame==2.0.2.dev2
pygame==2.0.3
packaging==20.4
requests==2.24.0
appdirs==1.4.4
platformdirs==2.1.0
2 changes: 1 addition & 1 deletion setupfiles/Space Way.desktop
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
[Desktop Entry]
Version=2.0.0
Version=2.2.0
Type=Application
Name=Space Way
Comment=Arcade game about space, in which you must overcome the space path by flying around obstacles
Expand Down
2 changes: 2 additions & 0 deletions spaceway/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,5 @@

if version_info < MIN_PYTHON:
raise Exception('Space Way requires Python {0}.{1}.{2} or newer'.format(*MIN_PYTHON))

from . import main
File renamed without changes.
Binary file added spaceway/assets/images/background/headpiece.bmp
Binary file not shown.
File renamed without changes.
Binary file added spaceway/assets/images/heart/heart.bmp
Binary file not shown.
Loading

0 comments on commit 6b3fe7b

Please sign in to comment.