{
  "id": 737671,
  "title": "I Built a Malaysian Cultural RPG in a Single HTML File — Here's What Broke",
  "url": "https://urgent.news/2026/08/13/i-built-a-malaysian-cultural-rpg-in-a-single-html-file-heres-what",
  "topic": "tech",
  "section": "Tech",
  "published": "2026-08-13T06:05:10.000Z",
  "source": {
    "name": "Dev.to",
    "slug": "dev-to",
    "url": "https://dev.to/ytlow/i-built-a-malaysian-cultural-rpg-in-a-single-html-file-heres-what-broke-43eb"
  },
  "original_language": "en",
  "account": "This is the story of Budak Kampung, a browser-based top-down RPG set across a 1440×1440 world map with Malay, Chinese, and Indian cultural zones. The game was built entirely in one self-contained HTML file, without the use of engines, npm packages, or build steps. The author, intrigued by the cultural richness of Malaysia, decided to create a One Malaysia RPG experience that embraced the country's multicultural heritage.\n\nThe game features an enterable Kampung Melayu (Malay village), Pekan Cina (Chinese village), and Little India, each with unique interiors like kopitiam (Malay coffee shops), surau (Malay mosques), and kovil (Indian temples). The game utilizes localStorage to save the player's position, visited buildings, and dialogue flags, making it accessible to players on any device without the need for CDN dependencies.\n\nDespite careful planning, the author encountered two major bugs during development. Bug #1, \"The blurry canvas (HiDPI hell),\" caused the game to appear blurry on Retina displays and modern phones. The issue stemmed from the author using CSS canvas dimensions instead of actual pixel dimensions, which led to incorrect camera placement and tap detection. To fix this problem, the author adjusted the canvas size based on the devicePixelRatio, ensuring that draw calls used CSS pixel coordinates instead of raw pixels.\n\nThe second bug, \"Emoji rendering killed the game,\" stemmed from the author using emoji (such as 👵 and 🏮) to represent various characters in the game. This decision proved problematic due to platform-dependent emoji rendering, which resulted in wildly different appearances of the same characters across different browsers and devices. To overcome this issue, the author replaced the emoji with vector characters drawn using canvas paths, ensuring consistent visual representation across all platforms.",
  "summary": "This is a cross-post. Original article on onlyWebPro . Budak Kampung is a browser-based, top-down RPG set across a 1440×1440 world map with Malay, Chinese, and Indian cultural zones — built entirely in one self-contained HTML file . No engine, no npm, no build step. This is the honest devlog: every decision I made, and every bug that nearly broke it. Why build this at all I'd already built…",
  "key_points": [],
  "editors_take": null,
  "illustration": null,
  "coverage": {
    "outlets": 1,
    "also_reported_by": []
  },
  "ai_generated": true,
  "disclaimer": "Summaries, key points and the editor’s take are written by software from other outlets’ reporting and may contain errors — always check the linked original."
}