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).


1. DESCRIPTION

Recreates the classic Mario experience on HP Prime:


2. CONTROLS

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).


3. HOW TO START

  1. Transfer the MARIO program to your HP Prime (via USB connectivity kit or emulator).
  2. Press ENTER to start a game.
  3. Use 7 / 8 to move and 2 or ENTER to jump.

4. SETUP

The language is also auto-detected from the calculator's system Language setting at startup:


5. SCORING

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).


6. LIVES


7. ITEMS

Item Effect
Coin +50 points, +1 coin
Mushroom Mario grows (2× height), +200 points
1UP Heart +1 life, +200 points

8. ENEMIES

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!

Enemies bounce off pipes, solid blocks, and patrol bounds.


9. LEVEL COMPLETION

Reach the flag at the end of the level to advance.

The victory jump animation plays automatically when you touch the flag; press ENTER to skip.


10. TECHNICAL OVERVIEW

10.1 Architecture

The program is organized into several sections:

10.2 Key design choices

10.3 Main functions

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"

10.4 Game loop (NIVEAU)

Each frame (~40 FPS via WAIT(0.025)):

  1. Input — read keys 7/8 (move), 2/30 (jump), 4 (pause), 3 (help)
  2. Pause — darkened veil + DESSINE_PAUSE, wait for ENTER
  3. Help — AFFICHE_HELP() if key 3
  4. Enemies — StepEnemy for each active enemy
  5. Death — if STATE == 1, animate death, respawn or Game Over
  6. Mario physics:
  7. Pickups — UpdateObjSlot for OA, OB, OC (coin / mushroom / 1UP)
  8. Enemies — CheckEnemy for slots 1–5
  9. Flag — if MX >= FLAGX - 20, victory jump, transition
  10. Floating coins & bonus lives — AABB collision, award points
  11. Render — DrawScene, then BLIT_P(G0, G1)
  12. Wait — WAIT(0.025)

10.5 Level data

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:

GENERATE_PICKUPS(n) then places 5 floating coins and (50% chance) 1 bonus life, avoiding pits.


11. FILES

File Description
MARIO.hpprgm Main HP Prime program
README.md This file

12. COMPATIBILITY


13. ROADMAP


14. VERSION TRACKING

Version numbering convention

MAJOR.MINOR

The current version is stored in the global APP_VERSION (e.g. "v1.0") and displayed on:

Version 1.0 — 2026

Initial release

Upcoming


15. AUTHOR

HP-PLUMBER — Christophe NOCITO Year: 2026 Email: christophen83@hotmail.com

For bug reports, suggestions, or feedback, please contact the author by email.


16. LICENSE

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.


17. CREDITS