| assets | ||
| backups | ||
| bin | ||
| build | ||
| dist | ||
| docs | ||
| runtime | ||
| saves_legacy | ||
| src_graphics | ||
| src_portable | ||
| tools | ||
| .gitignore | ||
| AGENTS.md | ||
| build.bat | ||
| casino3d.inc | ||
| casino3d_data.inc | ||
| font8x8.inc | ||
| LICENSE | ||
| poker.asm | ||
| poker.exe | ||
| poker.wap | ||
| README.md | ||
ASSEMBLER CASINO (KAZIK) 🎰
A retro casino gaming suite powered by a high-performance pure x86 assembly (MASM32) engine featuring an interactive 2.5D retro Raycaster 3D Hall (DOOM / Wolfenstein style) and a catalog of classic and underground gambling games.
🏛️ Architecture Overview
The repository is organized into distinct, modular subsystems:
┌────────────────────────────────────────┐
│ ASSEMBLER CASINO │
└──────────────────┬─────────────────────┘
│
┌───────────────────────────┼───────────────────────────┐
▼ ▼ ▼
┌──────────────────┐ ┌──────────────────┐ ┌──────────────────┐
│ MASM32 Engine │ │ C99 Portable │ │ C# GUI Launcher │
│ (Root Directory)│ │ (src_portable/) │ │ (build/ & dist/) │
│ - poker.asm │ │ - casino_portable│ │ - Launcher.cs │
│ - casino3d.inc │ │ - CMakeLists.txt │ │ - Installer GUI │
│ - font8x8.inc │ │ - Makefile │ │ - Setup Wizards │
└────────┬─────────┘ └──────────────────┘ └──────────────────┘
│
▼
┌──────────────────────────────────────────────┐
│ Offline Pipeline & Tooling │
│ (tools/) │
│ - tools/previews/ (ANSI / 3D previews) │
│ - tools/generators/ (Asset & table packers) │
│ - tools/tests/ (Simulators & checks) │
└──────────────────────────────────────────────┘
-
MASM32 Core Game Engine (Root)
poker.asm: Main game binary (~8,500+ lines of hand-crafted x86 assembly). Contains game logic, cheat engine, socket networking, profile save system, and sound triggers.casino3d.inc/casino3d_data.inc: Software 2.5D Raycaster engine rendering a 32×32 grand casino hall at 640×480 with DDA wall casting, depth-sorted sprite objects, and interactive tables.font8x8.inc: CP1251 1-bit monochrome 8×8 bitmap font table for high-speed HUD rendering directly to the Win32 GDI frame buffer.
-
Portable C99 Core (
src_portable/)- Cross-platform implementation (
casino_portable.c,casino_portable.h) allowing gameplay on POSIX / Linux / macOS environments. - Fully standalone build with standard
MakefileorCMakeLists.txt.
- Cross-platform implementation (
-
Desktop Distribution & Launcher (
build/&dist/)build/: C# source code for the launcher (AssemblerCasinoLauncher.cs), setup GUI (PokerGameSetupGui.cs), and uninstaller.dist/: Ready-to-run compiled desktop executables (Assembler Casino.exe,Uninstall Assembler Casino.exe).
-
Offline Development Tooling (
tools/)tools/previews/: Terminal ANSI animation players (preview_intro.py,preview_hakari.py,preview_dbd_hook.py) and 3D preview runner.tools/generators/: Texture pack scripts (build_graphics_assets.py), math table generators (generate_math_and_map.py), font rasterizer (generate_font.py).tools/tests/: Software raycaster simulator (simulate_render.py), release integrity checks (release_smoke_check.ps1), achievement popup modal (achievement_popup.bat).
-
Assets & Documentation (
assets/,docs/,backups/)assets/: High-resolution textures, sprites, audio samples (.wav), and ANSI cinematics (.ans).docs/: Design specifications, cheat sheet, networking guides, and engine render previews.backups/: Historical milestones and archived releases.
📁 Repository Directory Structure
├── poker.asm # Primary MASM32 assembly source
├── casino3d.inc # 2.5D retro 3D raycaster engine implementation
├── casino3d_data.inc # 3D engine math tables (sin/cos) & casino hall grid
├── font8x8.inc # 8x8 CP1251 bitmap font data
├── poker.wap # Pelles C / Windows project definition
├── build.bat # One-click build script for MASM32 core
├── poker.exe # Compiled game binary
├── AGENTS.md # Engineering guidelines and agent instructions
├── README.md # Project documentation (this file)
├── LICENSE # Project license
├── .gitignore # Git ignore patterns
│
├── assets/ # Game assets
│ ├── animations/ # ANSI animations (casino_intro.ans, hakari_dance.ans, dbd_hook.ans)
│ ├── audio/ # Sound effects (.wav) for cards, roulette, coins, win/loss
│ ├── data/ # Dealer dialogues and text tables (CP1251)
│ ├── icons/ # Game icon assets (.ico, .png)
│ ├── music/ # Background tracks
│ ├── sprites/ # Source sprite sheets & cabaret animations
│ └── textures/ # Packed 128x128 BGRA texture binaries (casino3d-hd.bin)
│
├── backups/ # Preserved backups and legacy archives
│
├── build/ # Launcher and setup source code (C# .NET)
│ ├── AssemblerCasinoLauncher.cs
│ ├── PokerGameSetupGui.cs
│ └── UninstallAssemblerCasino.cs
│
├── dist/ # Compiled desktop distribution binaries
│ ├── Assembler Casino.exe
│ └── Uninstall Assembler Casino.exe
│
├── docs/ # Project documentation, guides, and plans
│ ├── intro_code_draft.txt # Opening sequence drafts
│ ├── render_view.png # Simulated frame render of the 3D casino hall
│ ├── ИДЕИ.txt # Game ideas and development backlog
│ ├── ЧИТКОДЫ.txt # Complete list of cheat codes
│ └── *.txt # Release notes, security guidelines, networking
│
├── src_portable/ # Standalone portable C99 implementation
│ ├── casino_portable.c
│ ├── casino_portable.h
│ ├── CMakeLists.txt
│ ├── Makefile
│ └── poker_portable.exe
│
└── tools/ # Developer tooling & offline asset pipeline
├── README.md # Documentation for tools
├── previews/ # Animation & 3D preview scripts (.py, .bat)
├── generators/ # Asset packers, math & font generators (.py)
└── tests/ # Software render simulator & test scripts (.py, .ps1, .bat)
🛠️ Build Instructions
1. MASM32 Game Binary (poker.exe)
Prerequisites: MASM32 SDK (ml.exe, link.exe) installed in D:\MASM32\masm32, C:\masm32, or Visual Studio MSVC BuildTools.
Simply run:
build.bat
This will assemble poker.asm with MASM, link against kernel32, winmm, user32, ws2_32, gdi32, and produce poker.exe.
2. C99 Portable Engine (src_portable/)
With GCC / MinGW:
cd src_portable
make
Or with CMake:
cd src_portable
mkdir build && cd build
cmake ..
cmake --build .
3. Running Previews and Simulators
- Hakari Jackpot Dance Preview:
tools\previews\preview_hakari.bat - Casino Intro Animation Preview:
tools\previews\preview_intro.bat - 3D Engine Software Simulation:
Generatespython tools/tests/simulate_render.pydocs/render_view.pngshowing the 3D raycaster view with sprites.
🔤 Character Encoding Standard
- Game source & strings (
poker.asm,assets/data/dealer_phrases.txt): CP1251 (Windows-1251). Never save as UTF-8. - ANSI animations (
.ans): CP1251 encoding with ANSI escape codes and form feed (\f,0x0C) frame delimiters. Preview runners executechcp 65001before playback.
🎮 Games & Features
| # | Game | Description |
|---|---|---|
| 1 | 21 / Blackjack | Classic card game against the dealer with hit/stand mechanics. |
| 2 | Poker | Texas Hold'em with AI opponents, betting rounds, and pot calculations. |
| 3 | CloverPit | 5×3 video slots with custom bonus features and payouts. |
| 4 | Russian Roulette | High-stakes survival with revolver chamber simulation. |
| 5 | Skulls & Cups | Thimblerig shell game testing perception and luck. |
| 6 | Coin Flip | Double or nothing coin toss. |
| 7 | Dice / Craps | Classic dice rolling wagering. |
| 8 | Roulette | European roulette wheel with single and range bets. |
| 9 | Classic Slots | 3-reel 777 fruit machine. |
| 10 | Durak | Traditional Russian card game with trump cards and defense logic. |
| 11 | Training | Practice arena with infinite balance. |
| 12 | Observer (AI vs AI) | Watch autonomous agents play against each other. |
| 3D | Grand Casino Hall | Real-time 2.5D raycaster environment to explore and walk up to tables. |