Typescript version of the classic Duck Game Simulator
JSLegendDev youtube tutorial here:
duckGame/
├── README.md
├── .gitignore
├── index.html
├── vite.config.ts
├── tsconfig.json
├── package-lock.json
├── package.json
├── public/
│ ├── fonts
│ ├── nintendo-nes-font
│ └── license.txt
│ └── nintendo-nes-font.tff
│ └── readme.txt
│ ├── graphics
│ └── background.png
│ └── cursor.png
│ └── duck.png
│ └── menu.png
│ └── text-box.png
│ └── dog.png
│ ├── sounds
│ └── barking.wav
│ └── credits.txt
│ └── fall.wav
│ └── flapping.ogg
│ └── forest-ambiance.wav
│ └── gun-shot.wav
│ └── impact.wav
│ └── laughing.wav
│ └── quacking.wav
│ └── sniffing.wav
│ └── successful-hunt.wav
│ └── ui-appear.wav
├── src
│ ├── entities
│ └── dog.ts
│ └── duck.ts
│ └── constants.ts
│ └── gameManager.ts
│ └── kaplayCtx.ts
│ └── main.ts
│ └── utils.js
In order to get audioCtx to work from a global context. May not work in later versions of Kaplay.
const audioCtx = (k as any).audioCtx;Download zip
npm installthen
npm run devoptionally build
npm run buildtesting build
npm run preview