2022-11-23 17:16:21 +01:00
# Building Games with DragonRuby
2022-11-23 16:58:58 +01:00
An open source book that walks you through how to build games with [DragonRuby Game Toolkit ](https://dragonruby.org/toolkit/game ).
2022-12-11 17:43:48 +01:00
[Play the game you'll be building, right in the browser. ](https://dragonridersunite.itch.io/dragonruby-book )
2022-12-08 12:58:41 +01:00
[Support the creation and expansion of this book. ](https://buymeacoffee.com/brettchalupa )
2022-11-24 01:48:21 +01:00
## Developing
2022-11-24 03:55:38 +01:00
The book is authored and published with [mdBook ](https://rust-lang.github.io/mdBook/guide/installation.html ). Follow the installation instructions to get the `mdbook` binary installed.
Run `mdbook serve` to boot up the web server that handles compiling everything.
When the code is pushed to the `main` branch on GitHub, an action runs that deploys it to the `gh-pages` branch.
2022-12-06 13:38:19 +01:00
## Key Versions
2023-01-08 18:38:39 +01:00
- DragonRuby Game Toolkit: v3.24, v4.0
2022-12-13 18:33:01 +01:00
- mdbook: v0.4.22
2022-12-06 13:38:19 +01:00
2022-12-03 13:07:33 +01:00
## Running Samples
The repository contains complete games for each separate code sample to ensure the code works and runs.
Code samples live in `src/code` and then are organized by chapter and then sections within a chapter.
Clone this book repository into a DragonRuby GTK engine directory and run the samples with:
``` console
./dragonruby book/src/code/chapter_03/01_input
```
2022-11-24 01:48:21 +01:00
## Publishing
2023-01-08 18:59:53 +01:00
How to make a release:
1. Merge the `main` branch into `offline`
2. Generate a new PDF via printing in Firefox and turning off the header and footer
3. Generate an HTML version of the book and zip it up
4. Create zips and upload on itch.io
5. Create tags and releases for offline branch and the main branch
2022-11-24 01:48:21 +01:00
The 3D cover file is generated with https://diybookcovers.com/