Skip to content

cjRem44x/JZBlock

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

113 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐ŸงŸ JZBlock ๐Ÿ”ซ

A personal zombie survival game composed of blocks

๐ŸŽฎ Overview

JZBlock is a top-down zombie survival game where players fight off waves of zombies using laser weapons. Version 0.5 represents a complete architectural rewrite, now featuring dual language implementations in both Java and Zig, giving developers the choice between JVM portability and native performance.


โœจ Features

Gameplay (Zig Version - Fully Playable)

  • ๐Ÿ”ซ Laser Combat System - Neon projectiles with glow effects and fire rate upgrades
  • ๐ŸงŸ Wave-Based Survival - Increasingly difficult zombie hordes (health scales per wave)
  • ๐Ÿ’€ Boss Tier System - Three boss tiers with unique pixel-art faces, HP bars, and scaling rewards
    • ๐ŸŸข Basic Boss (wave 8+) โ€” green, angular eyes, jagged grin
    • ๐ŸŸฃ Medium Boss (wave 15+) โ€” purple, diamond eyes, fanged mouth
    • ๐Ÿ”ด Hard Boss (wave 20+) โ€” near-black skull with red X-eyes and glow border
  • ๐ŸŽฐ Rando Racing - Gambling minigame accessible from the pause screen; bet currency on 8-lane rainbow races for multiplied payouts
  • ๐Ÿฉธ Blood Effects - Splatter particles on hit, persistent fading blood pools on death
  • ๐ŸŽฏ Top-Down Tactical Gameplay - Strategic positioning matters
  • ๐Ÿ’Š Health & Ammo Management - Magazine reloading, periodic healing
  • ๐ŸŽฎ Game States - Main menu, settings, in-game, paused, and game over
  • ๐Ÿ’ฐ Economy & Upgrades - Earn currency from kills, upgrade fire rate and damage
  • โšก Speed Boost - Rechargeable speed boost system
  • ๐Ÿ–ฅ๏ธ Full Resolution Scaling - All entities, UI, and effects scale to any monitor at runtime; launches fullscreen
  • ๐ŸŽจ Visual Effects - Entity shadows, ambient lighting, grid backgrounds, neon glow effects

Technical Architecture

  • โšก Dual Language Support - Choose between Zig (performance) or Java (portability)
  • ๐ŸŽจ Raylib Graphics (Zig) - Modern, lightweight graphics framework
  • ๐Ÿ–ผ๏ธ Swing/AWT (Java) - Classic cross-platform windowing
  • ๐Ÿงฉ Modular Design - Clean separation of concerns
  • ๐Ÿ”„ Cross-Platform - Windows, Linux, and more

๐Ÿ—๏ธ Architecture

Version 0.5

The v0.5 release is a complete rewrite with:

  • Zig + Raylib as the primary, fully playable implementation
  • Java + Swing as a secondary implementation (currently a stub, in development)
  • Clean, modular architecture with centralized configuration
  • Archived original Java implementation preserved at src/main/archived/

Implementation Comparison

Feature Zig Implementation Java Implementation
Status Fully playable Stub (in development)
Graphics Raylib Swing/AWT (planned)
Performance Native, zero-cost abstractions JVM runtime
Memory Manual management Automatic GC
Platform Compiled binaries Cross-platform JVM
Build build.zig Standard javac

๐Ÿš€ Getting Started

Prerequisites

For Java Build:

  • Java Development Kit (JDK) 8 or later
  • Any Java-compatible platform (Windows, Linux, macOS)

For Zig Build:

  • Zig Compiler (latest version)
  • Raylib (automatically managed by build.zig)

Building the Project

Windows

# Navigate to scripts directory
cd scripts

# Run the Windows build script (interactive menu)
winbuild.bat

The script will prompt you to choose:

  1. Java - Build using Java/Swing
  2. Zig - Build using Zig/Raylib

Linux

# Navigate to scripts directory
cd scripts

# Make script executable (first time only)
chmod +x lxbuild.sh

# Run the Linux build script (interactive menu)
./lxbuild.sh

The script will prompt you to choose:

  1. Java - Build using Java/Swing
  2. Zig - Build using Zig/Raylib

Running the Archived Version

To run the original complete game (from archived source):

cd scripts/archived

# Windows
winbuild.bat

# Linux
chmod +x lxbuild.sh
./lxbuild.sh

๐ŸŽฏ Development Roadmap

Version 0.5 (Current)

Zig Implementation (Fully Playable):

  • Set up dual-language architecture
  • Implement Zig build system with Raylib
  • Establish build scripts for both implementations
  • Core game loop with state management
  • Entity system (Player, Zombie, Lazar)
  • Raylib rendering pipeline with visual effects
  • Input handling (WASD movement, arrow key shooting)
  • Player mechanics with speed boost system
  • Zombie AI with chase behavior and separation
  • Laser weapon system with ammo and reloading
  • Wave management with scaling difficulty
  • UI and HUD (health, ammo, kills, wave, currency, upgrades)
  • Menu system (main menu, settings, pause)
  • Economy system (kill rewards, weapon upgrades)
  • Countdown system between waves
  • Three-tier boss system with unique faces, HP bars, and scaled rewards
  • Blood particle and pool effects
  • Rando Racing gambling minigame (pause screen)
  • Full resolution scaling โ€” all entities, UI, and effects adapt to monitor size
  • Fullscreen launch with --log CLI debug flag

Java Implementation (Stub):

  • Create modular Java foundation
  • OS detection utilities
  • Logging utility
  • Port game loop from Zig
  • Implement entity system
  • Add Swing/AWT rendering pipeline

Version 0.6 (Planned)

  • Sound effects and music
  • Settings screen implementation (currently placeholder)
  • Java implementation feature parity with Zig

Version 1.0 (Future)

  • Additional weapons and enemies
  • Level system
  • Save/load functionality
  • Performance optimizations

๐Ÿ› ๏ธ Technology Stack

Zig Implementation

  • Language: Zig
  • Graphics: Raylib
  • Build System: Zig build system
  • Focus: Performance, native execution

Java Implementation

  • Language: Java 8+
  • Graphics: Swing/AWT
  • Build System: Standard Java compilation
  • Focus: Cross-platform compatibility, ease of development

Archived Version (Original)

  • Language: Pure Java
  • Graphics: Custom Swing/AWT rendering
  • Features: Complete game with all mechanics

๐Ÿ“š Code Examples

Running the Java Version

// Main entry point - src/main/java/Main.java
public class Main {
    public static void main(String[] args) {
        //...
    }
}

Running the Zig Version

// Main entry point - src/main/zig/src/main.zig
pub fn main() !void {
    //...
}

๐Ÿค Contributing

This is a personal project, but feedback and suggestions are welcome! If you'd like to contribute:

  1. Fork the repository
  2. Create a feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

๐Ÿ“œ License

This project is licensed under the Apache License 2.0 - see the LICENSE file for details.

๐ŸŽฎ Game Controls (Zig Version)

Action Key
Move Up W
Move Down S
Move Left A
Move Right D
Shoot Up Up Arrow
Shoot Down Down Arrow
Shoot Left Left Arrow
Shoot Right Right Arrow
Reload CTRL
Upgrade Weapon U
Speed Boost SPACE
Pause / Resume ESC
Restart (Game Over) R
Open Rando Racing (Paused) B

๐Ÿ› Known Issues

  • Java v0.5 implementation is a stub โ€” run the Zig version for the full game experience
  • Settings screen is a placeholder (controls display only)
  • Archived version may have platform-specific rendering quirks
  • --log flag must be passed at launch; there is no in-game toggle yet

๐Ÿ“ง Contact

Developer: cjRem44x Repository: github.com/cjRem44x/JZBlock

๐Ÿ™ Acknowledgments


Status: ๐ŸŽฎ Zig version playable | Java version in development (v0.5) | Bosses, blood, and gambling added Language: Zig (primary) & Java (in progress) Platform: Cross-platform (Windows, Linux) Graphics: Raylib (Zig) | Swing/AWT (Java โ€” planned)

Enjoy playing JZBlock! ๐ŸŽฎ๐ŸงŸโ€โ™‚๏ธโšก

About

JZBlock is a personal top-down zombie survival game built from the ground up using block-based visuals and mechanics. It combines tactical combat with a modular, cross-platform codebase to give players a fun and expandable survival experience.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages