Skip to content

๐Ÿ› ๏ธ Dev tech stack & skill

๊น€๋™์šฑ edited this page Dec 4, 2025 · 3 revisions

๐Ÿ› ๏ธ Development Tech Stack & Skill Documentation

๐Ÿ“‹ Project Overview

  • Project Name: Space Invaders - Software Development Practices
  • Course: CES2024 (25-2-23292)
  • Type: 2D Arcade Game (Space Invaders Clone)
  • Architecture: MVC Pattern + Entity-Component System

๐Ÿ”ง Core Technology Stack

Programming Language

  • Java 21 (LTS)
    • Language Level: Java 21
    • Source/Target Compatibility: Java 21
    • Toolchain: Temurin Distribution
    • Encoding: UTF-8

Build System

  • Gradle 8.14
    • Build Tool: Gradle Wrapper
    • Plugins:
      • java - Standard Java build tasks
      • application - Application execution support
    • Main Class: engine.Core

Testing Framework

  • JUnit 5 (Jupiter) 5.10.0
    • Test Platform: JUnit Platform
    • Test Logging: Enabled (passed, skipped, failed events)

Graphics & UI

  • Java Swing / AWT
    • 2D Graphics rendering
    • Custom font: Space Invaders Regular
    • Sprite-based animation system

Audio

  • Custom Audio Manager
    • Sound effects (.wav files)
    • Background music support
    • Located in: src/audio/

๐Ÿ“ Project Structure

Invaders-SDP-Private/
โ”œโ”€โ”€ src/                      # Source code
โ”‚   โ”œโ”€โ”€ audio/               # Audio management
โ”‚   โ”œโ”€โ”€ engine/              # Core engine
โ”‚   โ”‚   โ”œโ”€โ”€ DTO/            # Data Transfer Objects
โ”‚   โ”‚   โ”œโ”€โ”€ level/          # Level management
โ”‚   โ”‚   โ””โ”€โ”€ renderer/       # Rendering system
โ”‚   โ”œโ”€โ”€ entity/             # Game entities
โ”‚   โ”‚   โ”œโ”€โ”€ pattern/        # Boss attack patterns
โ”‚   โ”‚   โ””โ”€โ”€ skills/         # Player skills
โ”‚   โ””โ”€โ”€ screen/             # UI screens
โ”œโ”€โ”€ test/                    # Unit tests
โ”‚   โ”œโ”€โ”€ engine/             # Engine tests
โ”‚   โ””โ”€โ”€ entity/             # Entity tests
โ”œโ”€โ”€ res/                     # Resources
โ”‚   โ”œโ”€โ”€ images/             # Sprite images
โ”‚   โ”œโ”€โ”€ maps/               # Level maps
โ”‚   โ”œโ”€โ”€ sfx/                # Sound effects
โ”‚   โ””โ”€โ”€ font.ttf            # Custom font
โ”œโ”€โ”€ .github/workflows/       # CI/CD configuration
โ”œโ”€โ”€ build.gradle            # Gradle build config
โ””โ”€โ”€ README.md               # Project documentation

๐Ÿ”„ CI/CD Pipeline

GitHub Actions Configuration

File: .github/workflows/SDP-ci.yml

Trigger Events:

  • Push to master branch
  • Push to feature/* branches
  • Pull requests to master

Pipeline Steps:

  1. Checkout Code - actions/checkout@v4
  2. Setup JDK 21 - actions/setup-java@v4 (Temurin distribution)
  3. Cache Gradle Packages - actions/cache@v4
    • Caches: ~/.gradle/caches, ~/.gradle/wrapper
  4. Grant Execute Permission - chmod +x gradlew
  5. Build & Test - ./gradlew build

CI Features:

  • โœ… Automated build on push/PR
  • โœ… Gradle dependency caching
  • โœ… Automated unit test execution

๐Ÿงช Unit Test Implementation Status

Current Test Coverage

Test File Lines Purpose Status
GameStateTest.java 61 Coin system logic โœ… Implemented
BulletPoolTest.java 75 Bullet pooling system โœ… Implemented
ShipTest.java 183 Player ship mechanics โœ… Implemented
Total 319 - 3 test classes

Test Methods Overview

GameStateTest (5 tests):

  • โœ… testAddCoins() - Adding coins
  • โœ… testAddNegativeCoins() - Negative coin validation
  • โœ… testDeductCoins_Success() - Successful deduction
  • โœ… testDeductCoins_InsufficientFunds() - Insufficient funds handling
  • โœ… testDeductCoins_Negative() - Negative deduction validation

BulletPoolTest (3+ tests):

  • โœ… Bullet pool management
  • โœ… Object reuse pattern
  • โœ… Performance optimization

ShipTest (8+ tests):

  • โœ… Ship movement mechanics
  • โœ… Collision detection
  • โœ… Health management
  • โœ… Power-up system

Testing Limitations

  • โŒ Low Coverage - Only 3 test classes for entire codebase
  • โŒ No Integration Tests - Only unit tests
  • โŒ No Boss Pattern Tests - Complex boss patterns not tested
  • โŒ No UI Tests - Screen/rendering not tested
  • โŒ No Performance Tests - No benchmarking

๐Ÿ“Š Code Quality Tools

Currently NOT Implemented:

  • โŒ JaCoCo - Code coverage analysis
  • โŒ Checkstyle - Code style enforcement
  • โŒ SpotBugs - Static bug detection
  • โŒ PMD - Code quality analysis
  • โŒ SonarQube - Continuous inspection

Recommended Additions:

plugins {
    id 'jacoco'
    id 'checkstyle'
    id 'com.github.spotbugs' version '6.0.0'
}

jacoco {
    toolVersion = "0.8.11"
}

jacocoTestReport {
    reports {
        xml.required = true
        html.required = true
    }
}

๐Ÿ—๏ธ Architecture Patterns

Design Patterns in Use:

MVC (Model-View-Controller)

  • Model: entity/, engine/
  • View: screen/, engine/renderer/
  • Controller: engine/Core

Strategy Pattern

  • Boss attack patterns (entity/pattern/)
  • Different boss behaviors interchangeable

Object Pool Pattern

  • Bullet pooling for performance
  • Tested in BulletPoolTest

State Pattern

  • Game state management
  • Screen transitions

Factory Pattern

  • Entity creation
  • Level generation

Clone this wiki locally