# DiamondGameKit
DiamondGameKit is a tiny helper toolkit for building simple Pygame-based games.
It provides lightweight building blocks so you can focus on gameplay instead of boilerplate.
## Features
- Game wrapper (screen + clock + FPS)
- Player rectangle entity
- Enemy spawner with downward movement
- Simple keyboard input helpers
- Score HUD
- Internal plugin system
## Installation
pip install diamondgamekit
## Quick Example
import pygame
import diamondgamekit as dgk
pygame.init()
screen = pygame.display.set\_mode((800, 600))
clock = pygame.time.Clock()
game = dgk.Game(screen, clock, title="Dodge The Blocks")
player = dgk.PlayerRect(x=400, y=550, w=40, h=40, speed=5)
spawner = dgk.EnemySpawnerRect(
  width=40, height=40,
  spawn\_y\_range=(-600, -40),
  count=10,
  speed=5,
  screen\_width=800,
)
score = dgk.Score(font\_size=32, color=(255, 255, 255))
running = True
while running:
  for event in pygame.event.get():
  if event.type == pygame.QUIT:
  running = False
  keys = pygame.key.get\_pressed()
  dgk.handle\_basic\_horizontal\_input(
  player,
  keys,
  left=pygame.K\_a,
  right=pygame.K\_d,
  bounds=(0, 800 - player.rect.width),
  )
  spawner.update\_all()
  for e in spawner.enemies:
  if e.y > 600:
  spawner.reset\_enemy(e)
  score.add(1)
  if player.rect.colliderect(e):
  running = False
  screen.fill((20, 20, 20))
  pygame.draw.rect(screen, (0, 255, 0), player.rect)
  for e in spawner.enemies:
  pygame.draw.rect(screen, (255, 0, 0), e)
  score.draw(screen, x=10, y=10)
  pygame.display.flip()
  game.tick(60)
pygame.quit()
Release files for diamondgamekit 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| diamondgamekit-1.0.0.tar.gz | 4.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| diamondgamekit-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 10.7 kB
Release files / diamondgamekit-1.0.0.tar.gz
| Download URL | diamondgamekit-1.0.0.tar.gz |
|---|---|
| Size | 4.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
bb74601a7cb562640b3760ff80b93c7bb2249423e9f14a3f5391e1d4753ecc15
|
|
BLAKE2b-256 checksum How to use checksums |
5da575e1e1dd0907e0f2adb3f2c0761b027095d3c8ef5bca2934b89f1fa9a041
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.14
|
Release files / diamondgamekit-1.0.0-py3-none-any.whl
| Download URL | diamondgamekit-1.0.0-py3-none-any.whl |
|---|---|
| Size | 6.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
ca6a09ee57ebd0accb2f188b1b4b3bcb718e52d3f702efe4fe2195140194be25
|
|
BLAKE2b-256 checksum How to use checksums |
b2786a104d384d4cb0892a133a4049070514c4742fad440fa3c3d40cfb035a44
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.14
|