HP-PLUMBER Version 1.0 — 2026 By HP-PLUMBER (Christophe NOCITO) Contact: christophen83@hotmail.com
A Super Mario Bros clone for the HP Prime G2 graphing calculator, written in PPL (HP Prime Programming Language).
Recreates the classic Mario experience on HP Prime:
| KEY / ACTION | DESCRIPTION |
|---|---|
| ↑ / Enter | Jump (hold = higher) |
| ← | Move left |
| → | Move right |
| Home | About scree |
| Esc | Help screen |
Tip: Hold the jump key to jump higher (variable jump height).
MARIO program to your HP Prime (via USB connectivity kit or emulator).The language is also auto-detected from the calculator's system Language setting at startup:
Language == 3 → FrenchLanguage == 5 → Spanish| Action | Points |
|---|---|
| Coin collected (floating or block) | +50 |
| Mushroom collected | +200 |
| Enemy stomped | +100 |
| Bonus life collected | +200 (or +300 from a block) |
The score is always displayed in the HUD (top-left, 5 digits).
| Item | Effect |
|---|---|
| Coin | +50 points, +1 coin |
| Mushroom | Mario grows (2× height), +200 points |
| 1UP Heart | +1 life, +200 points |
| Enemy | Behavior |
|---|---|
| Goomba | Walks in a line, stomp to defeat |
| Koopa | Walks in a line, stomp to defeat |
Warning: Do not touch them from the side!
- As small Mario → death
- As big Mario → you shrink
Enemies bounce off pipes, solid blocks, and patrol bounds.
Reach the flag at the end of the level to advance.
MAX_LEVEL (5) → Victory screenThe victory jump animation plays automatically when you touch the flag; press ENTER to skip.
The program is organized into several sections:
ELSE IF on a single line (PPL compatibility)E1..E8)OA, OB, OC) + 5 floating coin slots + 2 bonus life slots{a, b, c, …} for multiple valuesG1 (320×240 grob), then BLIT_P(G0, G1)| Category | Functions |
|---|---|
| Rendering | DESSINE_CIEL, DESSINE_COLLINES, DESSINE_SOL, DESSINE_NUAGES, DESSINE_DRAPEAU, DESSINE_TOUS_BLOCS, DESSINE_MARIO, DESSINE_GOOMBA, DESSINE_KOOPA, DESSINE_PIECE, DESSINE_PIECE_BONUS, DESSINE_VIE_BONUS, DESSINE_CHAMPIGNON, DESSINE_HUD, DESSINE_PAUSE, DESSINE_LEVEL_END, DESSINE_GAME_OVER, DESSINE_GAME_WON, DrawTitleScreen, DESSINE_ABOUT, DrawBigItalicText, DESSINE_TEXTE_GEANT |
| Physics | PhysHorizontal, PhysJump, PhysIntegrate, PhysGroundCollision, PhysBlockCollisions, PhysAntiStuck, PhysCamera, PhysEnemyCollision, PhysEndFlagJump |
| Game logic | StepEnemy, DrawEnemy, CheckEnemy, UpdateObjSlot, SpawnFromQB, EnemyHitsBlock, DrawScene |
| Levels | LoadLevel, NIVEAU, GENERATE_LEVEL, GENERATE_PICKUPS |
| UI / Views | T, GetLangue, InitGlobals, AFFICHE_HELP, VIEW "Symb", VIEW "Setup", VIEW "Info", VIEW "Help" |
NIVEAU)Each frame (~40 FPS via WAIT(0.025)):
DESSINE_PAUSE, wait for ENTERAFFICHE_HELP() if key 3StepEnemy for each active enemySTATE == 1, animate death, respawn or Game OverPhysHorizontal → VX, DIRPhysJump → VY, ONGROUND, JUMPHOLDPhysIntegrate → MX, MY, VX, VY, PX, PYPhysBlockCollisions → collisions + question-block spawnPhysGroundCollision → ground/pitsPhysAntiStuck → unstickPhysCamera → camera followUpdateObjSlot for OA, OB, OC (coin / mushroom / 1UP)CheckEnemy for slots 1–5MX >= FLAGX - 20, victory jump, transitionDrawScene, then BLIT_P(G0, G1)WAIT(0.025)Levels are described by 4 tables indexed by ACTIVE_LEVEL:
| Table | Content |
|---|---|
LEVEL_META |
{MAX_X, FLAGX, FLAGY, PIT1S, PIT1E, PIT2S, PIT2E, NEXT_LVL, NENEMIES, GRAV, JUMPV, MAXSPD, ACCEL, FRICTION} |
LEVEL_BLOCKS |
List of {x, y, type, hit} — type 1=brick, 2=question, 3=solid, 4=pipe |
LEVEL_ENEMIES |
List of {x, y, dir, alive, frame, type, speed, minX, maxX} — type 1=Goomba, 2=Koopa |
LEVEL_COLORS |
Palette {SKY1, SKY2, HILL1, HILL2, SOL1, SOL2, NUA, DRAP1, DRAP2} |
LEVEL_COLORS_DARK |
50% darker palette for pause mode |
Levels 1 and 2 are hand-crafted. Level 3+ are built by GENERATE_LEVEL(n), which:
NEXT_LVL to nGENERATE_PICKUPS(n) then places 5 floating coins and (50% chance) 1 bonus life, avoiding pits.
| File | Description |
|---|---|
MARIO.hpprgm |
Main HP Prime program |
README.md |
This file |
DIMGROB_P, BLIT_P, TEXTOUT_P, Language system variable)MAJOR.MINOR
The current version is stored in the global APP_VERSION (e.g. "v1.0") and displayed on:
Initial release
Language + manual override in SetupHP-PLUMBER — Christophe NOCITO Year: 2026 Email: christophen83@hotmail.com
For bug reports, suggestions, or feedback, please contact the author by email.
This project is distributed for educational and recreational purposes.
Mario is a registered trademark of Nintendo. This is an unofficial fan project, not affiliated with Nintendo.