Small Electron + Vite app containing a simple input-list creator and a Plinko-style game.
This README shows how to install, run and test the app locally.
- Node.js (LTS recommended — e.g. 18+). The project uses Electron 39 and Vite plugin via Electron Forge.
- npm (bundled with Node) or yarn/pnpm.
From the project root (the folder that contains package.json):
cd /path/to/PlinkoHack/electron-app
npm installStart the Electron app (will launch the renderer):
npm run startThis runs electron-forge start configured in package.json and will open the app window.
- Press "Start" on the home page.
- Add text into the input rows.
- Click the Done button. That handler will:
- collect the non-empty input strings,
- save them to
sessionStorageunder the keygameInputs, and - navigate to the Plinko page (
plinko.html).
- The Plinko page reads
sessionStorage.gameInputsto get the list of possible solutions and uses it at runtime.
This means you can move between pages and the list will persist during the browser session.
- If you see input rows appearing in the Plinko page, ensure
src/game.jsinitialization is guarded against running when the module is imported elsewhere. The project has a guard to only initialize inputs when the expected game container exists. - If
gameInputsis not present insessionStorage, the Plinko game falls back to an empty list (no labels). Use the DevTools method above to populate the key for testing. - If Electron fails to start, ensure your Node/Electron versions are compatible; try using Node 18 or 20.
src/game.js— input UI,Donebutton that writessessionStorage.gameInputs.src/plinko.js— readssessionStorage.gameInputsand runs the Plinko game.src/*.html— HTML pages used by the app.