Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions docs/js/dealers.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export const DEALER_ROSTER = [
id: "steve_harvey",
name: "Steve Harvey",
games: ["roulette", "horse_racing", "craps"],
sprite: "npc_gold",
sprite: "dealer_steve",
tagline: "Survey says… bet responsibly!",
quips: {
greeting: [
Expand Down Expand Up @@ -82,7 +82,7 @@ export const DEALER_ROSTER = [
id: "meryl_screech",
name: "Dealer Meryl Screech",
games: ["blackjack"],
sprite: "npc_green",
sprite: "dealer_meryl",
tagline: "And the Oscar for Most Aggressive Double goes to… you.",
quips: {
greeting: [
Expand Down Expand Up @@ -116,7 +116,7 @@ export const DEALER_ROSTER = [
id: "judi_bench",
name: "Croupier Judi Bench",
games: ["holdem"],
sprite: "npc_teal",
sprite: "dealer_judi",
tagline: "Bond. James Bond. Blinds.",
quips: {
greeting: [
Expand Down Expand Up @@ -150,7 +150,7 @@ export const DEALER_ROSTER = [
id: "jennifer_lawless",
name: "Jennifer Lawless",
games: ["blackjack", "holdem"],
sprite: "npc_pink",
sprite: "dealer_jennifer",
tagline: "I tripped on the felt once. The shoe didn't even notice.",
quips: {
greeting: [
Expand Down Expand Up @@ -184,7 +184,7 @@ export const DEALER_ROSTER = [
id: "sofia_volume",
name: "Sofia Volume",
games: ["roulette"],
sprite: "npc_red",
sprite: "dealer_sofia",
tagline: "Dale, amigo — the wheel is feeling generous tonight!",
quips: {
greeting: [
Expand Down Expand Up @@ -218,7 +218,7 @@ export const DEALER_ROSTER = [
id: "octavia_spectacular",
name: "Octavia Spectacular",
games: ["holdem", "blackjack"],
sprite: "npc_orange",
sprite: "dealer_octavia",
tagline: "Honey, the house always wins — but you look good losing.",
quips: {
greeting: [
Expand Down Expand Up @@ -252,7 +252,7 @@ export const DEALER_ROSTER = [
id: "nicole_widechart",
name: "Nicole Widechart",
games: ["blackjack", "roulette"],
sprite: "npc_silver",
sprite: "dealer_nicole",
tagline: "The chips are whispering. I'm listening.",
quips: {
greeting: [
Expand Down
3 changes: 2 additions & 1 deletion docs/rpg/GDD.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,8 @@ flowchart TB
| Tile vocabulary | `js/systems/MapTiles.js` |
| JSON → tile layers | `js/systems/MapLoader.js` |
| Map/NPC/door accessors + procedural fallback | `js/systems/MapData.js` |
| Procedural sprites and tiles | `js/systems/TextureFactory.js` |
| Vendored tiles + procedural FX | `js/systems/EnvironmentTextures.js`, `js/systems/TextureFactory.js` |
| Character / staff sprite sheets | `js/systems/CharacterSprites.js` |
| Dialogue graph | `js/systems/DialogueManager.js` |
| Encounter routing | `js/systems/EncounterBridge.js`, `js/systems/HostedEncounters.js` |
| Mounting terminal screens | `js/systems/TerminalHostOverlay.js` |
Expand Down
14 changes: 7 additions & 7 deletions docs/rpg/assets/characters/ATTRIBUTION.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,18 @@ All assets below are used under permissive open licenses in The Mandalay Bay pix

## Hero (player default)

- **File:** `player_full_animation.png`, `player.png`
- **File:** `player_full_animation.png`
- **Author:** Fry
- **Source:** https://opengameart.org/content/hero-character-sprite-sheet
- **License:** CC0 1.0 (public domain)

Top-down RPG hero with walk + idle animations (40×64 px frames).

## Sora (staff / alternate NPC base)
## Dealers and staff (unique sheets)

- **Files:** `sora/*.png`
- **Author:** Danilo Mattos
- **Source:** https://opengameart.org/content/simple-animated-character
- **License:** CC0 1.0 (public domain)
- **Files:** `staff/*.png` (14 unique characters — 7 dealers + 7 staff palette keys)
- **Author:** Jephed (Game Between The Lines)
- **Source:** https://gamebetweenthelines.itch.io/top-down-pixel-art-characters
- **License:** Free for commercial and non-commercial use (credit appreciated)

Top-down character with 4-direction idle and walk cycles (64×64 px frames).
Top-down characters with 4-direction idle and walk cycles (20×32 px frames on 64×128 sheets). Designed to match the casino tileset pack from the same author.
Binary file removed docs/rpg/assets/characters/player.png
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/rpg/assets/characters/staff/dealer_judi.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/rpg/assets/characters/staff/dealer_meryl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/rpg/assets/characters/staff/dealer_sofia.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/rpg/assets/characters/staff/dealer_steve.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/rpg/assets/characters/staff/npc_gold.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/rpg/assets/characters/staff/npc_green.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/rpg/assets/characters/staff/npc_orange.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/rpg/assets/characters/staff/npc_pink.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/rpg/assets/characters/staff/npc_red.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/rpg/assets/characters/staff/npc_silver.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/rpg/assets/characters/staff/npc_teal.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
27 changes: 27 additions & 0 deletions docs/rpg/assets/tiles/ATTRIBUTION.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Environment tile credits

All assets below are used under permissive open licenses in The Mandalay Bay pixel RPG.

## Casino tileset (props / decor / atlas)

- **Files:** `casino_atlas.png`, `decor/slot.png`, `decor/slot_sheet.png`, `decor/screen.png`, `decor/screen_sheet.png`, `decor/bar.png`, `decor/plant.png`, `decor/glass.png`, `decor/rope.png`, and derived ground crops for stage/road/felt accents
- **Author:** Jephed (Game Between The Lines)
- **Source:** https://gamebetweenthelines.itch.io/2d-top-down-pixel-art-tileset-casino
- **License:** Free for commercial and non-commercial use (credit requested)

## Ornate interior floors (carpet, VIP, felt, lobby, path, trim, spa, wall, glass)

- **Files:** `carpet*.png`, `vip*.png`, `felt*.png`, `lobby*.png`, `path*.png`, `trim*.png`, `spa*.png`, `wall*.png`, `stage*.png`, `glass*.png`
- **Source pack:** [LPC] Floors — https://opengameart.org/content/lpc-floors
- **License:** CC-BY-SA 4.0
- **Credits:** See LPC floors CREDITS (bluecarrot16, Lanea Zimmerman (Sharm), William Thompson, Hyptosis, SpiderDave, Cougarmint, Stephen Challener (Redshrike), Bonsaiheldin, Tyler Olsen (Roots), Jetrel, jestan, The Open Surge team, Gaurav Munjal, Reemax, Silveira Neto, bleutailfly, Casper Nilsson, NaRNeRZz, Buch, keith karnage, Arthur Carvalho, Guilherme Vieira (n2liquid), Chris Hamons, and others listed in the pack)

## Outdoor sand / water

- **Files:** `sand*.png`, `water_f*.png`, `aqua*.png`
- **Sand / terrain base:** Kenney RPG Base — https://kenney.nl/assets/rpg-base (CC0 1.0)
- **Water tiles:** 16×16 Grass-Sand-Water TileSet — https://opengameart.org/content/grass-sand-water-tileset (see pack license / attribution on OGA)

## Supplemental outdoor reference

- Demetrius — 16×16 water/grass/sand — https://opengameart.org/content/16x16-tileset-water-grass-and-sand (CC0)
Binary file added docs/rpg/assets/tiles/aqua.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/rpg/assets/tiles/aqua_v1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/rpg/assets/tiles/aqua_v2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/rpg/assets/tiles/bar.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/rpg/assets/tiles/bar_v1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/rpg/assets/tiles/bar_v2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/rpg/assets/tiles/carpet.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/rpg/assets/tiles/carpet_v1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/rpg/assets/tiles/carpet_v2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/rpg/assets/tiles/casino_atlas.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added docs/rpg/assets/tiles/decor/bar.png
Binary file added docs/rpg/assets/tiles/decor/glass.png
Binary file added docs/rpg/assets/tiles/decor/plant.png
Binary file added docs/rpg/assets/tiles/decor/rope.png
Binary file added docs/rpg/assets/tiles/decor/screen.png
Binary file added docs/rpg/assets/tiles/decor/screen_sheet.png
Binary file added docs/rpg/assets/tiles/decor/slot.png
Binary file added docs/rpg/assets/tiles/decor/slot_sheet.png
Binary file added docs/rpg/assets/tiles/felt.png
Binary file added docs/rpg/assets/tiles/felt_v1.png
Binary file added docs/rpg/assets/tiles/felt_v2.png
Binary file added docs/rpg/assets/tiles/glass.png
Binary file added docs/rpg/assets/tiles/glass_v1.png
Binary file added docs/rpg/assets/tiles/glass_v2.png
Binary file added docs/rpg/assets/tiles/lobby.png
Binary file added docs/rpg/assets/tiles/lobby_v1.png
Binary file added docs/rpg/assets/tiles/lobby_v2.png
Binary file added docs/rpg/assets/tiles/path.png
Binary file added docs/rpg/assets/tiles/path_v1.png
Binary file added docs/rpg/assets/tiles/path_v2.png
Binary file added docs/rpg/assets/tiles/plant.png
Binary file added docs/rpg/assets/tiles/plant_v1.png
Binary file added docs/rpg/assets/tiles/plant_v2.png
Binary file added docs/rpg/assets/tiles/road.png
Binary file added docs/rpg/assets/tiles/road_v1.png
Binary file added docs/rpg/assets/tiles/road_v2.png
Binary file added docs/rpg/assets/tiles/rope.png
Binary file added docs/rpg/assets/tiles/rope_v1.png
Binary file added docs/rpg/assets/tiles/rope_v2.png
Binary file added docs/rpg/assets/tiles/sand.png
Binary file added docs/rpg/assets/tiles/sand_v1.png
Binary file added docs/rpg/assets/tiles/sand_v2.png
Binary file added docs/rpg/assets/tiles/screen.png
Binary file added docs/rpg/assets/tiles/screen_v1.png
Binary file added docs/rpg/assets/tiles/screen_v2.png
Binary file added docs/rpg/assets/tiles/slot.png
Binary file added docs/rpg/assets/tiles/slot_v1.png
Binary file added docs/rpg/assets/tiles/slot_v2.png
Binary file added docs/rpg/assets/tiles/spa.png
Binary file added docs/rpg/assets/tiles/spa_v1.png
Binary file added docs/rpg/assets/tiles/spa_v2.png
Binary file added docs/rpg/assets/tiles/stage.png
Binary file added docs/rpg/assets/tiles/stage_v1.png
Binary file added docs/rpg/assets/tiles/stage_v2.png
Binary file added docs/rpg/assets/tiles/trim.png
Binary file added docs/rpg/assets/tiles/trim_v1.png
Binary file added docs/rpg/assets/tiles/trim_v2.png
Binary file added docs/rpg/assets/tiles/vip.png
Binary file added docs/rpg/assets/tiles/vip_v1.png
Binary file added docs/rpg/assets/tiles/vip_v2.png
Binary file added docs/rpg/assets/tiles/void.png
Binary file added docs/rpg/assets/tiles/wall.png
Binary file added docs/rpg/assets/tiles/wall_v1.png
Binary file added docs/rpg/assets/tiles/wall_v2.png
Binary file added docs/rpg/assets/tiles/water_f0.png
Binary file added docs/rpg/assets/tiles/water_f1.png
Binary file added docs/rpg/assets/tiles/water_f2.png
4 changes: 2 additions & 2 deletions docs/rpg/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;600;700&display=swap" rel="stylesheet">
<!-- Terminal styles come first so the RPG's pixel skin overrides them. -->
<link rel="stylesheet" href="../css/casino.css">
<link rel="stylesheet" href="css/rpg.css?v=title-boot-1">
<link rel="stylesheet" href="css/rpg.css?v=env-sprites-1">
<link rel="stylesheet" href="../css/intoxication-effects.css">
<link rel="stylesheet" href="../css/rewards-phone.css">
<script type="importmap">
Expand Down Expand Up @@ -48,7 +48,7 @@ <h1 class="title-intro-logo">The Mandalay Bay</h1>
</div>
</div>
</div>
<script type="module" src="js/main.js?v=title-boot-1"></script>
<script type="module" src="js/main.js?v=env-sprites-1"></script>
<script>
// Surface module-load failures that would otherwise leave a blank title.
window.addEventListener("error", (event) => {
Expand Down
4 changes: 2 additions & 2 deletions docs/rpg/js/main.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import Phaser from "phaser";
import { OverworldScene } from "./scenes/GameScenes.js?v=title-boot-1";
import { TitleScreen, renderHud, renderTrainerCard } from "./scenes/TitleScreen.js?v=title-boot-1";
import { OverworldScene } from "./scenes/GameScenes.js?v=env-sprites-1";
import { TitleScreen, renderHud, renderTrainerCard } from "./scenes/TitleScreen.js?v=env-sprites-1";
import { DialogueManager } from "./systems/DialogueManager.js";
import { SaveAdapter } from "./systems/SaveAdapter.js";
import { defaultAppearance } from "./systems/CharacterAppearance.js";
Expand Down
19 changes: 15 additions & 4 deletions docs/rpg/js/scenes/GameScenes.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,12 @@ import {
playerAnimKey,
tileTextureKey,
preloadCharacterAssets,
preloadEnvironmentAssets,
cachePortraitImages,
setupNpcSprite,
applySpriteAppearance,
resolvePlayerSprite,
} from "../systems/TextureFactory.js?v=title-boot-1";
} from "../systems/TextureFactory.js?v=env-sprites-1";
import { normalizeAppearance } from "../systems/CharacterAppearance.js";
import {
TILE_SIZE, MAP_WIDTH, MAP_HEIGHT, buildMapLayersForId, getNpcsForMap,
Expand Down Expand Up @@ -93,6 +94,7 @@ export class OverworldScene extends Phaser.Scene {
}

preload() {
preloadEnvironmentAssets(this);
preloadCharacterAssets(this);
}

Expand Down Expand Up @@ -214,7 +216,8 @@ export class OverworldScene extends Phaser.Scene {
"char_hero",
0
);
setupNpcSprite(this, sprite, npc.sprite);
const facing = npc.direction || "down";
setupNpcSprite(this, sprite, npc.sprite, facing);
sprite.setDepth(10);
sprite.setData("npc", npc);
this.npcSprites.set(npc.id, sprite);
Expand All @@ -225,7 +228,7 @@ export class OverworldScene extends Phaser.Scene {

if (npc.zone) {
const dealer = this._dealerForZone(npc.zone);
setupNpcSprite(this, sprite, dealer.sprite);
setupNpcSprite(this, sprite, dealer.sprite, facing);
}
}

Expand Down Expand Up @@ -298,6 +301,8 @@ export class OverworldScene extends Phaser.Scene {
this.cameras.main.setRoundPixels(true);

this.facing = "down";
this._lastAnimFacing = null;
this._lastAnimMoving = null;
this.canMove = true;
this.nearbyNpc = null;
this._lastDoorTile = null;
Expand Down Expand Up @@ -632,7 +637,13 @@ export class OverworldScene extends Phaser.Scene {
const appearance = { appearance: this.playerAppearance };
this.player.setFlipX(this.facing === "left");
const key = playerAnimKey(appearance, this.facing, moving);
if (this.player.anims?.currentAnim?.key === key) return;
const facingChanged = this._lastAnimFacing !== this.facing;
const movingChanged = this._lastAnimMoving !== moving;
if (!facingChanged && !movingChanged && this.player.anims?.currentAnim?.key === key) {
return;
}
this._lastAnimFacing = this.facing;
this._lastAnimMoving = moving;
if (this.anims.exists(key)) {
this.player.anims.play(key, true);
} else {
Expand Down
18 changes: 16 additions & 2 deletions docs/rpg/js/systems/CharacterAppearance.js
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,26 @@ export const NPC_PORTRAITS = {
npc_red: { body: 0xf08088, mid: 0xc86068, shade: 0x984048, hair: 0x682830, skin: "tan" },
npc_orange: { body: 0xffb060, mid: 0xd89048, shade: 0xa86830, hair: 0x784820, skin: "tan" },
npc_silver: { body: 0xc0c8d8, mid: 0x9098a8, shade: 0x606878, hair: 0x404850, skin: "fair" },
// Dealer keys share palette slots for any CSS fallback; portraits use raster sheets.
dealer_steve: { body: 0xf0d050, mid: 0xc8a838, shade: 0x987820, hair: 0x685010, skin: "medium" },
dealer_meryl: { body: 0x50e8a0, mid: 0x38b878, shade: 0x288858, hair: 0x186040, skin: "medium" },
dealer_judi: { body: 0x48d8e8, mid: 0x30a8b8, shade: 0x208898, hair: 0x1a6070, skin: "fair" },
dealer_jennifer: { body: 0xd888f0, mid: 0xa868c0, shade: 0x7848a0, hair: 0x503070, skin: "fair" },
dealer_sofia: { body: 0xf08088, mid: 0xc86068, shade: 0x984048, hair: 0x682830, skin: "tan" },
dealer_octavia: { body: 0xffb060, mid: 0xd89048, shade: 0xa86830, hair: 0x784820, skin: "tan" },
dealer_nicole: { body: 0xc0c8d8, mid: 0x9098a8, shade: 0x606878, hair: 0x404850, skin: "fair" },
};

/** Map dialogue speaker names to portrait palette keys. */
export const SPEAKER_PORTRAITS = {
"Chip Chandler": "npc_gold",
"Steve Harvey": "npc_gold",
"Steve Harvey": "dealer_steve",
"Dealer Meryl Screech": "dealer_meryl",
"Croupier Judi Bench": "dealer_judi",
"Jennifer Lawless": "dealer_jennifer",
"Sofia Volume": "dealer_sofia",
"Octavia Spectacular": "dealer_octavia",
"Nicole Widechart": "dealer_nicole",
"Betty": "npc_orange",
"Barkeep Betty": "npc_orange",
"Paula": "npc_pink",
Expand Down Expand Up @@ -111,7 +125,7 @@ export function resolvePalette(appearance) {

export function resolveSpeakerPortrait(speaker) {
const key = SPEAKER_PORTRAITS[speaker] ?? "npc_gold";
const palette = NPC_PORTRAITS[key];
const palette = NPC_PORTRAITS[key] ?? NPC_PORTRAITS.npc_gold;
const skin = SKIN_TONES.find((s) => s.id === palette.skin) ?? SKIN_TONES[1];
return {
body: palette.body,
Expand Down
Loading
Loading