3 ms·
Show HN: Dogecoin Simulator – A Game About Dogecoin
- theobr 5y agoHey HN! Excited to share this dumb little game I made over the last week. I had the idea Thursday and couldn't shake it so I hacked it out over the last few days. The core loop is heavily inspired by Universal Paperclips https://www.decisionproblem.com/paperclips/index2.html https://www.decisionproblem.com/paperclips/index2.html Tech stack is React + Typescript with a pile of helper tools such as Zustand, Victory and react-modal. There's a somewhat complete list in the in-game settings window. Happy to go more into detail on any of this if there's interest - the Zustand state machine in particular was quite fun :) Source code is available on Github https://github.com/TheoBr/dogecoin-simulator/ https://github.com/TheoBr/dogecoin-simulator/
- kavehacker 5y agoWe are all the Dogefather now
- mr_ralph 5y agoReally cool stuff. Can you elaborate on how you used Zustand for this?
- theobr 5y agoGladly :) Zustand is a state management library for React, similar to Redux or Mobx. It’s super minimal, allowing you to configure a single object with values and functions that is shared across the codebase Almost all of the “game logic” lives in a single file that only depends on Zustand: https://github.com/TheoBr/dogecoin-simulator/blob/main/src/engine/game.ts https://github.com/TheoBr/dogecoin-simulator/blob/main/src/e... I am also using Zustand for my job: https://tt.fm https://tt.fm I’ve been super impressed with Zustand’s conciseness and performance. Recently have been impressed with portability too, all our Zustand stores have been copy-pasteable between our React and RN apps :)