Corrected title on HTML template.
Tweaked readme for clarity.
Link to my own license file instead of the generic template.
This is the source code for Truffle Wizard, a short incremental game with truffles, clicking and almost definitely no mysterious strangers offering forbidden magic.
Play the game in your web browser on itch.io!
The game is built in F#, sitting on the shoulders of many giants, including:
I'm still an apprentice F#-slinger, so if you find the code confusing at any point, that's probably on me! However, I have done my best to write idiomatic Elmish F#, as best as I currently understand it.
"Making of" blog post coming soon, but the short version is that I loved making this. This was my first game in F#, but I very much hope it won't be the last!
Truffle Wizard is open source, under the liberal 2-clause BSD license. As there isn't a meaningful distinction between 'code' and 'content' in this project, everything in the src
folder is open-sourced under the same license.
If you want, you can run Truffle Wizard on your own machine, and even experiment with the code.
My starting point for this project was the excellent Feliz Template by Zaid Ajaj. Feliz is licensed under the MIT License.
I've reproduced most of the Feliz Template instructions below, as they also apply to Truffle Wizard.
To write and edit your code, you can use either VS Code + Ionide, Emacs with fsharp-mode, Rider or Visual Studio.
Before doing anything, start with installing npm dependencies using:
npm install
Then to start development mode with hot module reloading, run:
npm start
This will start the development server after compiling the project, once it is finished, navigate to http://localhost:8080 to view the application .
To build the application and make ready for production:
npm run build
This command builds the application and puts the generated files into the deploy
directory (can be overwritten in webpack.config.js).