This repository has been archived by the owner on Feb 18, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
71 changed files
with
558 additions
and
218 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
name: Pylint | ||
|
||
on: [push] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: ["3.10"] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v3 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
# - name: Install dependencies | ||
# run: | | ||
# python -m pip install --upgrade pip | ||
# pip install pylint | ||
# - name: Analysing the code with pylint | ||
# run: | | ||
# pylint $(git ls-files '*.py') | ||
- name: PyLint with dynamic badge | ||
# You may pin to the exact commit or the version. | ||
# uses: Silleellie/pylint-github-action@f5341ef210a203c2c7bbfe5440c03a06b9328866 | ||
uses: Silleellie/pylint-github-action@v2 | ||
with: | ||
# The path, relative to the root of the repo, of the package(s) or pyton file(s) to lint | ||
lint-path: danmaku | ||
# Python version which will install all dependencies and lint package(s) | ||
python-version: "3.10" | ||
# The path, relative to the root of the repo, of the requirements to install | ||
# requirements-path: # optional, default is requirements.txt | ||
# The path, relative to the root of the repo, of the README.md to update with the pylint badge | ||
# readme-path: # optional, default is README.md | ||
# Text to display in the badge | ||
# badge-text: # optional, default is PyLint | ||
# Color of the badge for pylint scores < 5. Hex, rgb, rgba, hsl, hsla and css named colors can all be used | ||
#color-bad-score: # optional, default is red | ||
# Color of the badge for pylint scores in range [5,8). Hex, rgb, rgba, hsl, hsla and css named colors can all be used | ||
#color-ok-score: # optional, default is orange | ||
# Color of the badge for pylint scores in range [8,10). Hex, rgb, rgba, hsl, hsla and css named colors can all be used | ||
#color-good-score: # optional, default is yellow | ||
# Color of the badge for pylint scores == 10. Hex, rgb, rgba, hsl, hsla and css named colors can all be used | ||
#color-perfect-score: # optional, default is brightgreen | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
_tools | ||
|
||
# Byte-compiled / optimized / DLL files | ||
__pycache__/ | ||
*.py[cod] | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,37 @@ | ||
# 弾幕 (Danmaku) | ||
|
||
|
||
## Goal | ||
To create a bullet hell game similar to TouHou Project, Undertale, etc. | ||
|
||
## Refactoring | ||
- [x] main.py | ||
- [x] bullet.py | ||
- [x] enemy.py | ||
- [x] gameobject.py | ||
- [x] player.py | ||
- [x] utils.py | ||
|
||
|
||
## TODO | ||
- [x] Levels | ||
- [ ] Boss HP bar | ||
- [ ] Player HP/Bomb info | ||
- [ ] Player points info | ||
- [ ] Main menu | ||
- [ ] Leaderboard | ||
- [x] Sounds | ||
- [x] Music | ||
- [x] Graphics | ||
- [x] Images | ||
- [ ] Level background | ||
- [ ] Effects (particles) | ||
- [x] Bullets | ||
- [ ] Trajectories | ||
- [x] Enemies | ||
- [x] Controls | ||
- [x] Change controls to classic (shift, z, x) | ||
- [ ] Settings | ||
- [ ] Make player hitbox smaller | ||
- [ ] Replace enemies strings with enum | ||
- [ ] Replace resource path strings with constants from db | ||
# 弾幕 (Danmaku) | ||
 | ||
[](https://github.com/psf/black) | ||
|
||
## Goal | ||
To create a bullet hell game similar to TouHou Project, Undertale, etc. | ||
|
||
## Refactoring | ||
- [x] main.py | ||
- [x] bullet.py | ||
- [x] enemy.py | ||
- [x] gameobject.py | ||
- [x] player.py | ||
- [x] utils.py | ||
|
||
|
||
## TODO | ||
- [x] Levels | ||
- [ ] Boss HP bar | ||
- [x] Player HP/Bomb info | ||
- [x] Player points info | ||
- [x] Main menu | ||
- [x] Leaderboard | ||
- [x] Sounds | ||
- [x] Music | ||
- [x] Graphics | ||
- [x] Images | ||
- [x] Level background | ||
- [ ] Effects (particles) | ||
- [x] Bullets | ||
- [ ] Trajectories | ||
- [x] Enemies | ||
- [x] Controls | ||
- [x] Change controls to classic (shift, z, x) | ||
- [ ] Settings | ||
- [ ] Make player hitbox smaller | ||
- [x] Replace resource path strings with constants from db |
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
"""Game level background class declaration.""" | ||
|
||
import vgame | ||
import pygame | ||
|
||
|
||
class Background(vgame.graphics.Sprite): | ||
"""Game level background class.""" | ||
|
||
def __init__( | ||
self, | ||
x: int | float, | ||
y: int | float, | ||
width: int | float, | ||
height: int | float, | ||
): | ||
super().__init__() | ||
|
||
self.x = x | ||
self.y = y | ||
self.width = width | ||
self.height = height | ||
|
||
# Making it animated | ||
self.last_animation_time = 0 | ||
self.current_frame = 0 | ||
self.frame_count = 48 | ||
self.frame_duration = 100 | ||
self.frames = [ | ||
f"background/background_{i}.png" for i in range(self.frame_count) | ||
] | ||
self.texture_file = self.frames[0] | ||
self.texture_size = self.width, self.height | ||
|
||
def draw(self, graphics: vgame.graphics.Graphics): | ||
graphics.draw_sprite(self) | ||
|
||
def animation(self): | ||
"""Animate the sprite.""" | ||
t = pygame.time.get_ticks() | ||
if t - self.last_animation_time >= self.frame_duration: | ||
self.texture_file = self.frames[self.current_frame] | ||
self.current_frame = (self.current_frame + 1) % self.frame_count | ||
self.last_animation_time = t | ||
|
||
def update(self, delta: int | float): | ||
self.animation() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.