Claim the block with the most delightfully diabolical neighborhood empire ever conceived. Spin up lawn mowers for cash, crank out lemonade and cookies to fuel your crew, and recruit paper boys and bullies to carry out daring raids, scares, and takeovers. It’s a tongue-in-cheek strategy romp where water balloons hit harder than egos and plastic bats mean business.
Master clever, turn-based tactics as you balance production, recruitment, and equipment to outwit rival neighborhoods. With rollback-safe actions, snappy feedback, and a lighthearted tone, every decision is a grin—until your rivals bribe your best and raze your stands. Build, brawl, and laugh your way to local legend.
Directory: kiddie_kartel/Kiddie Kartel/
Game Name: Kiddie Kartel (parody kid crime simulator)
Genre: Browser-based strategy/crime game (humorous twist)
Version: Unknown (no version file)
Developer: Unknown (no credits found)
Development Date: Unknown (no timestamps in files)
: No file found (assumed proprietary)Database: MySQL via PEAR DB abstraction layer
Architecture: Command Pattern with OOP design
Game Concept: Parody of mafia/crime RPGs where players run "neighborhoods" of kids doing petty "crimes" like lawn mowing, lemonade stands, baking cookies, and having water balloon fights. Kids recruit "bullies" and "paper boys" as minions to raid other neighborhoods.
---
Total Files: 117 files
PHP Scripts: 70 files (0.18 MB)
HTML Templates: 45 files (0.05 MB)
Graphics: 1 JPG (logo.jpg, 0.01 MB)
Documentation: 1 TXT file (createDatabase.txt)
Notable Absence: Minimal graphics (only 1 image!), no CSS files, no JavaScript, extremely lightweight.
Directory Structure:
Kiddie Kartel/
├── C[CommandName]Cmd.php (50+ command classes)
├── C[ClassName].php (core classes)
├── [Feature].html (45 HTML templates)
├── settings.php (game configuration)
├── main.php (entry point)
└── graphics/logo.jpg
File Naming Convention:
C (Hungarian notation)Cmd (e.g., CLoginCmd.php, CBribeCmd.php)BribeSuccess.html, RazeFailure.html)---
Architecture: Command Pattern with PEAR DB - Very well-structured OOP design!
1. Command Pattern (CCommand.php):
define("CMD_ERROR", 1);
define("CMD_CONTINUED", 2);
define("CMD_FINISHED", 3);
define("CMD_NEEDS_INPUT", 4);
class CCommand {
var $m_pParent = null;
var $m_nCurrentCommand;
var $m_bNeedRollBack;
var $m_arraySubCommands;
function Execute($args) { return CMD_FINISHED; }
function OnRollBack() { /* undo changes */ }
function HandleSubCommand($result) { /* manage sub-commands */ }
}
Key Innovation: Commands can be chained (sub-commands), rolled back (transaction-like), and interrupted (return CMD_NEEDS_INPUT). This is sophisticated for a browser game! 2. Command Factory (CCommandFactory.php):
$args['type'] parameter3. Game Controller (CGame.php):
class CGame {
var $m_Neighborhood; // player data
var $m_CurrentCmd; // executing command
var $m_CmdFactory; // command factory
function ExecuteCommand($args) {
// Credit turns automatically
if (isset($_SESSION['neighborhood'])) {
$turn_update = new CCreditTurns($null);
$turn_update->Execute();
}
// Handle command interruption/rollback
if (strtolower(get_class($this->m_CurrentCmd)) != strtolower($args['type'])) {
$this->m_CurrentCmd->OnRollBack(); // Undo interrupted command!
$this->m_CurrentCmd = $this->m_CmdFactory->CreateCommand($args['type']);
}
$result = $this->m_CurrentCmd->Execute($args);
}
}
Brilliant Feature: If user navigates away mid-command, game rolls back the interrupted command automatically! Very clean error handling. 4. Database Layer - PEAR DB:
$g_PearDBDSN = "mysql://$g_DBUsername:$g_DBPassword@$g_DBHost/$g_DBName";
$db = DB::connect($GLOBALS['g_PearDBDSN']);
$result = $db->Query($query);
PEAR DB = PHP 4/5-era database abstraction (pre-PDO). Better than raw mysql_* but still obsolete.
5. Session Management:
$_SESSION['game'] (CGame object)$_SESSION['neighborhood'] (CNeighborhood object)6. Configuration System (settings.php - 167 lines):
Extensive game balance variables:
All game balance tunable without code changes - excellent design!
---
Core Concept: Kid-friendly parody of mafia games. Instead of drugs/guns, kids have lemonade/cookies and water balloons/plastic bats.
$10 base ± 100% randomness (earn $0-$20 per turn)2 base ± 50% randomness (produce 1-3 glasses per turn)1 base ± 100% randomness (bake 0-2 cookies per turn)Economic Actions (build empire):
Paper Boy Actions (lighter offense):
Bully Actions (heavy offense):
Raze Formula (from settings.php lines 49-58):
$g_fRazeSuccess = 0.45; // 45% base success
$g_nRazeLemonadeCost = 2; // Costs 2 lemonade
$g_nRazeCookieCost = 2; // Costs 2 cookies
$g_fRazeBasePlayerLossRate = 0.20; // You lose 20-50% of attackers
$g_fRazeMaxPlayerLossRate = 0.50;
$g_fRazeBaseOpponentLossRate = 0.10; // Opponent loses 10-50% defenders
$g_fRazeMaxOpponentLossRate = 0.50;
$g_fRazeMinGeneratorsRazed = 0.00; // Destroy 0-10% of buildings
$g_fRazeMaxGeneratorsRazed = 0.10;
$g_fRazeMinLoot = 0.00; // Steal 0-25% resources
$g_fRazeMaxLoot = 0.25;
Complex formulas with randomness ranges - sophisticated balance system.
---
Single Table Design: neighborhoods
Fields: 18 columns
Type: MySQL (no explicit engine specified, likely MyISAM default)
Schema:
CREATE TABLE neighborhoods (
PlayerName CHAR(64) NOT NULL PRIMARY KEY,
NeighborhoodName CHAR(64) NOT NULL,
Password CHAR(64) NOT NULL,
-- Minions
Bullies INT DEFAULT 0,
PaperBoys INT DEFAULT 0,
-- Production Buildings
LawnMowers INT DEFAULT 1,
LemonadeStands INT DEFAULT 0,
Bakeries INT DEFAULT 0,
-- Resources
Money INT DEFAULT 300,
Lemonade INT DEFAULT 100,
Cookies INT DEFAULT 50,
-- Equipment
WaterBalloons INT DEFAULT 0,
PlasticBats INT DEFAULT 0,
SlingShots INT DEFAULT 0,
-- Turns
LastTurnCredited DATETIME NOT NULL,
Turns INT DEFAULT 50
);
Design Quality: 8/10 Strengths:
Weaknesses:
Scalability: Single table design = excellent performance for small-to-medium games (< 10,000 players). No complex queries, no N+1 problems.
---
This is exceptionally well-designed code for a browser game!
1. Command Pattern Implementation ⭐⭐⭐⭐⭐
2. Object-Oriented Design ⭐⭐⭐⭐
3. Configuration Management ⭐⭐⭐⭐
4. Database Abstraction ⭐⭐⭐
DB::isError()5. Code Organization ⭐⭐⭐⭐
6. Template Separation ⭐⭐⭐
1. No Input Sanitization
htmlspecialchars() found2. Hungarian Notation ⚠️
$m_sPlayerName, $g_DBUsername3. No Documentation
4. Global Variables ⚠️
$GLOBALS superglobal5. No Error Logging
6. No Tests
Modernization Cost: 120-160 hours ($9K-$12K at $75/hr) - surprisingly low because architecture is already good!
Required Changes:
---
PHP Version: Unknown (likely PHP 4/5 based on PEAR DB usage)
PEAR DB: Deprecated since 2008 (replaced by PDO in PHP 5.1+)
Database: Raw SQL queries (no ORM)
Critical Issues:
Missing Modern Features: Namespaces, autoloading, Composer, PDO, password_hash(), type hints, strict typing, PSR standards, ORM, templating engine.
Positive Notes:
---
1. SQL Injection - 10/10 Severity 🔥🔥🔥
Evidence (CCreateNeighborhoodCmd.php lines 25-28):
$query = "INSERT INTO " . $GLOBALS['g_DBTable']
. " (PlayerName, NeighborhoodName, Password, LastTurnCredited) VALUES ( '"
. $sPlayerName . "', '" . $sNeighborhoodName . "', '"
. $sPassword . "', NOW())";
$result = $db->Query($query);
Impact: Direct string concatenation, PEAR DB doesn't auto-escape. Attacker can:
PlayerName: admin' OR '1'='1
NeighborhoodName: x'); DROP TABLE neighborhoods; --
2. Plaintext Passwords - 10/10 Severity 🔥🔥🔥 Evidence: Database schema showsPassword CHAR(64), code shows direct insert of $sPassword variable. No hashing observed anywhere. Passwords stored in plain text, trivially compromised. 3. XSS Vulnerabilities - 9/10 Severity 🔥🔥
htmlspecialchars() found4. No CSRF Protection - 7/10 Severity 🔥
5. Hardcoded Database Credentials - 8/10 Severity 🔥🔥
Evidence (settings.php lines 3-4):
$g_DBUsername = "root";
$g_DBPassword = ""; // Empty root password!
Root access with no password = development-only setup, catastrophic if deployed.Database errors exposed to users.
7. Session Hijacking Risk - 6/10 Severity 🔥
1. Command Rollback ⭐
2. Error Handling Hierarchy ⭐
3. Database Abstraction ⭐
Security Grade: F+ (3/10) - Good architecture foundation, catastrophic security implementation.
---
THIS IS ONE OF THE BEST-DESIGNED GAMES IN THE COLLECTION!
1. Command Pattern with Rollback ⭐⭐⭐⭐⭐
2. Single-Table Architecture ⭐⭐⭐⭐
3. Comprehensive Configuration System ⭐⭐⭐⭐
4. Humorous Theme ⭐⭐⭐
5. Time-Based Turn System ⭐⭐⭐
LastTurnCredited DATETIME prevents exploits6. Factory Pattern ⭐⭐⭐
Architecture Quality: 9/10 ⭐⭐⭐⭐⭐
Code Clarity: 7/10
Maintainability: 8/10
Scalability: 6/10
Browser Game Architecture Evolution:
Comparison to Other Games:
| Game | Architecture | Design Patterns | Code Quality |
|---|---|---|---|
| Kiddie Kartel | 9/10 | Command, Factory | 8/10 |
| ezRPG | 9/10 | MVC, ORM-like | 9/10 |
| Glory Lands | 9/10 | GUID, Templates | 9/10 |
| Phaos | 7/10 | OOP character | 5/10 |
| ikariam | 6/10 | OOP classes | 5/10 |
Verdict: Kiddie Kartel has the cleanest architecture despite security flaws. This is professional-grade design with amateur security.
---
1. Learning Software Design ⭐⭐⭐⭐⭐
2. Game Architecture Study ⭐⭐⭐⭐⭐
3. Refactoring Exercise ⭐⭐⭐⭐
4. Parody Game Inspiration ⭐⭐⭐
Archive Status: TIER 1 - DESIGN PATTERN CROWN JEWEL ⭐⭐⭐⭐⭐
Rationale:
Preservation Actions:
Document Architecture (this analysis emphasizes design patterns)
Create Class Diagrams (show command hierarchy, factory relationships)
Extract Design Lessons (single-table pros/cons, rollback mechanism)
Archive Complete Source (70 PHP, 45 HTML templates)
Security Case Study (good design + bad security = learning opportunity)
Comparison Analysis (vs ezRPG/Glory Lands architecture differences)
Modernization Guide (if someone wants to fix it):
Total: 130 hours = $9,750 at $75/hr
Result: Production-ready game with excellent architecture AND security.
Top 5 Games by Architecture:
Top 5 Games by Educational Value:
Top 5 Games by Innovation:
---
| Metric | Value |
|---|---|
| Files | 117 (70 PHP, 45 HTML, 1 JPG, 1 TXT) |
| Database | 1 table (18 columns, single-table design) |
| Code Size | ~5,000 lines (estimated) |
| Architecture | Command Pattern + Factory Pattern |
| Database Layer | PEAR DB (deprecated) |
|
|
None found (proprietary) |
| Security | 3/10 (SQL injection, plaintext passwords, XSS) |
| Innovation | 9/10 (command pattern, rollback, single-table) |
| Architecture Quality | 9/10 ⭐⭐⭐⭐⭐ |
| Code Quality | 8/10 (excellent structure, no docs/tests) |
| Modernization | $9K-$12K (120-160 hours) |
| Educational Value | ⭐⭐⭐⭐⭐ (design pattern masterclass) |
| Preservation | Tier 1 - Design Pattern Crown Jewel |
Key Strengths: Best architecture in collection, command pattern with rollback, factory pattern, single-table optimization, configuration-driven balance, humorous theme
Key Weaknesses: Plaintext passwords, SQL injection, XSS vulnerabilities, no input sanitization, PEAR DB deprecated
Best Use: Teaching design patterns, game architecture study, refactoring exercise, CS coursework
Unique Feature: Transaction-like command rollback in stateless HTTP context
Historical Significance: Demonstrates how to do OOP design RIGHT in browser games, even if security was neglected. This is the game to study for software architecture, not security.
---
| Category | Rating | Commentary |
|---|---|---|
| Innovation & Originality | ★★★★★★★★☆☆ 8/10 | UNIQUE: Parody kid crime game - lawn mowing as "crime", lemonade stands |
| Code Quality | ★★★★★★★★☆☆ 8/10 | EXCELLENT: Command Pattern, PEAR DB, rollback transactions, clean OOP |
| Security Posture | ★★★★☆☆☆☆☆☆ 4/10 | PEAR DB helps but mid-2000s practices, needs security audit |
| Documentation | ★★☆☆☆☆☆☆☆☆ 2/10 | Only createDatabase.txt, no README, no license, no credits |
| Gameplay Design | ★★★★★★☆☆☆☆ 6/10 | Clever parody concept but limited scope, humor-dependent |
| Technical Architecture | ★★★★★★★★★☆ 9/10 | BEST IN COLLECTION: Command Pattern with sub-commands and rollback! |
| Completeness | ★★★★★☆☆☆☆☆ 5/10 | 117 files functional but minimal graphics (1 image!), no CSS/JS |
| Historical Significance | ★★★★★☆☆☆☆☆ 5/10 | Demonstrates Command Pattern in browser games, parody genre example |
| Preservation Value | ★★★★★★★☆☆☆ 7/10 | Important for design pattern education, unique parody concept |
Summary: Kiddie Kartel is a brilliantly-architected parody browser game where kids run neighborhoods doing "crimes" like lawn mowing, lemonade stands, and water balloon fights. With 117 files and only 1 image, it's minimalist but showcases the best Command Pattern implementation in the entire collection - featuring chainable sub-commands, rollback transactions, and interrupted execution (CMD_NEEDS_INPUT). The PEAR DB abstraction and Hungarian notation (C-prefixed classes) show professional development. While documentation is sparse and humor may not age well, the architectural excellence makes this invaluable for studying design patterns in browser games. Highest technical architecture score (9/10) in collection.
Running many of the scripts in this archive on a live server presents a serious security risk. These projects were created before modern hardening practices and may contain vulnerabilities that can compromise your system.
We strongly recommend using this code for reference and analysis only, or in isolated local environments. By downloading these files, you accept full responsibility for their use.