Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file added pets/cemetery-crawler/golden-soul.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pets/cemetery-crawler/gravestone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pets/cemetery-crawler/hp-background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 65 additions & 0 deletions pets/cemetery-crawler/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import sys
import time
import random

CIRCUITPYTHON = False
try:
import board
import displayio
CIRCUITPYTHON = True
except ImportError:
from blinka_displayio_pygamedisplay import PyGameDisplay
import pygame

if CIRCUITPYTHON:
display = board.DISPLAY
else:
pygame.init()
display = PyGameDisplay(width=128, height=128)

def load_bitmap(filename):
if CIRCUITPYTHON:
return displayio.OnDiskBitmap(open(filename, "rb"))
else:
return pygame.image.load(filename)

background = load_bitmap("hp-background.png")
reaper_img = load_bitmap("reaper.png")
soul_img = load_bitmap("soul.png")
spirit_img = load_bitmap("spirit.png")
gravestone_img = load_bitmap("gravestone.png")

reaper_x, reaper_y = 64, 100
jumping = False
jump_velocity = 0
score = 0

souls = [{"x": random.randint(10, 118), "y": 20} for _ in range(3)]
spirits = [{"x": random.randint(10, 118), "y": 40} for _ in range(2)]
gravestones = [{"x": random.randint(10, 118), "y": 110} for _ in range(2)]

running = True
while running:
if not CIRCUITPYTHON:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False

for soul in souls:
soul["y"] += 1
if soul["y"] > 128:
soul["y"] = 0

for soul in souls:
if abs(reaper_x - soul["x"]) < 10 and abs(reaper_y - soul["y"]) < 10:
score += 1
soul["y"] = 0

if not CIRCUITPYTHON:
display.surface.blit(background, (0, 0))
display.surface.blit(reaper_img, (reaper_x, reaper_y))
for soul in souls:
display.surface.blit(soul_img, (soul["x"], soul["y"]))
pygame.display.flip()

time.sleep(0.1)
37 changes: 37 additions & 0 deletions pets/cemetery-crawler/readme.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
# cemetery crawler
cemetery crawler is my submission for hack club's hackapet ysws. it's a small pixel-art arcade game that's set in the abandoned cemetery on a dimly lit night. my "pet" is a grim reaper present in the cemetery and the player is supposed to control him and **collect wandering souls** while **avoiding vengeful spirits.**
<br><br>
im still working on improving the game so it can reach a stage where its actually enjoyable for ppl but rn here's what the game should look like:

![image](https://github.com/user-attachments/assets/f813879e-275c-46cc-b8be-7e59e7769748)
<br>
btw, setting up circuitpython on windows was a PAIN because there were so many installations that were all over the place + running the code on the vscode terminal just didn't work and we had to use windows powershell for a few steps and the command prompt for others.

NOTE: this is still a wip because i accidentally created the game in pygame initially and am now switching over to circuitpython !!!

## controls
- left – move left <br>
- right – move right <br>
- reap – swing scythe to collect souls & banish hostile spirits <br>

## gameplay
- view: third-person, side-scrolling cemetery (reaper in the center, background scrolls).
- game setting base: the cemetery scrolls infinitely, with obstacles like tombstones and fog patches to avoid.
- souls float across the screen—walk into them to collect.
- hostile spirits charge at you—use the reap button to dispel them before they hit!
- occasionally, a golden soul appears—catching it slows time or grants temporary invincibility.
- the game speeds up as time progresses, making dodging and reaping more challenging as you move up levels.

## win/loss condition
- win: high score based on the number of souls collected.
- lose: if hit by hostile spirits too many times.

## graphics
the game has a low-res pixel art style and the pixel art for this was made with a combination of aseprite (windows) and resprite (android)
- background: dark, misty cemetery with shifting weather.
- reaper: small hooded figure seen from behind, scythe swinging in hand.
- souls: wispy blue/white; golden for power-ups.
- hostile spirits: red/purple glowing figures with sharp, jagged outlines.

## credits
used art from pinterest as inspo for the graveyard, the show [grimm](https://www.imdb.com/title/tt1830617/) for the game idea & claude ai for debugging
Binary file added pets/cemetery-crawler/reaper.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pets/cemetery-crawler/soul.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pets/cemetery-crawler/spirit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pets/cemetery_crawler/golden-soul.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pets/cemetery_crawler/gravestone.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pets/cemetery_crawler/hp-background.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
65 changes: 65 additions & 0 deletions pets/cemetery_crawler/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
import sys
import time
import random

CIRCUITPYTHON = False
try:
import board
import displayio
CIRCUITPYTHON = True
except ImportError:
from blinka_displayio_pygamedisplay import PyGameDisplay
import pygame

if CIRCUITPYTHON:
display = board.DISPLAY
else:
pygame.init()
display = PyGameDisplay(width=128, height=128)

def load_bitmap(filename):
if CIRCUITPYTHON:
return displayio.OnDiskBitmap(open(filename, "rb"))
else:
return pygame.image.load(filename)

background = load_bitmap("hp-background.png")
reaper_img = load_bitmap("reaper.png")
soul_img = load_bitmap("soul.png")
spirit_img = load_bitmap("spirit.png")
gravestone_img = load_bitmap("gravestone.png")

reaper_x, reaper_y = 64, 100
jumping = False
jump_velocity = 0
score = 0

souls = [{"x": random.randint(10, 118), "y": 20} for _ in range(3)]
spirits = [{"x": random.randint(10, 118), "y": 40} for _ in range(2)]
gravestones = [{"x": random.randint(10, 118), "y": 110} for _ in range(2)]

running = True
while running:
if not CIRCUITPYTHON:
for event in pygame.event.get():
if event.type == pygame.QUIT:
running = False

for soul in souls:
soul["y"] += 1
if soul["y"] > 128:
soul["y"] = 0

for soul in souls:
if abs(reaper_x - soul["x"]) < 10 and abs(reaper_y - soul["y"]) < 10:
score += 1
soul["y"] = 0

if not CIRCUITPYTHON:
display.surface.blit(background, (0, 0))
display.surface.blit(reaper_img, (reaper_x, reaper_y))
for soul in souls:
display.surface.blit(soul_img, (soul["x"], soul["y"]))
pygame.display.flip()

time.sleep(0.1)
Binary file added pets/cemetery_crawler/reaper.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions pets/cemetery_crawler/requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
adafruit_blinka_displayio==0.11.1
adafruit_circuitpython_display_text==3.2.2
pygame==2.6.1
Binary file added pets/cemetery_crawler/soul.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added pets/cemetery_crawler/spirit.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.