diff --git a/book/src/SUMMARY.md b/book/src/SUMMARY.md index be3bdd75..e6699916 100644 --- a/book/src/SUMMARY.md +++ b/book/src/SUMMARY.md @@ -7,7 +7,7 @@ - [Linux setup](./setup/linux.md) - [Windows setup]() - [Mac OS setup]() - - [Building the game](./setup/building.md) + - [Building the template](./setup/building.md) - [Learn agb part I - pong](./pong/01_introduction.md) - [The Gba struct](./pong/02_the_gba_struct.md) - [Sprites](./pong/03_sprites.md) diff --git a/book/src/introduction/introduction.md b/book/src/introduction/introduction.md index ec14a26e..4529d83e 100644 --- a/book/src/introduction/introduction.md +++ b/book/src/introduction/introduction.md @@ -26,4 +26,5 @@ It is super rewarding being able to play a game you made yourself on a piece of * [agb's crates.io page](https://crates.io/crates/agb) * [agb's documentation](https://docs.rs/agb) which is useful if you need a quick reference * [Awesome Game Boy Advance development](https://github.com/gbdev/awesome-gbadev) contains links to popular libraries, emulators and the super friendly gbadev discord -* [Example game](https://lostimmortal.itch.io/the-hat-chooses-the-wizard) written using agb as part of the 2021 GMTK game jam. \ No newline at end of file +* [Example game](https://lostimmortal.itch.io/the-hat-chooses-the-wizard) written using agb as part of the 2021 GMTK game jam. +* [More example games](https://github.com/agbrs/agb/releases/latest) built using agb. See them in `examples.zip` attached to the latest release. \ No newline at end of file diff --git a/book/src/setup/building.md b/book/src/setup/building.md index 2ce23aec..4b96811e 100644 --- a/book/src/setup/building.md +++ b/book/src/setup/building.md @@ -1,34 +1,31 @@ -# Building the game +# Building the template -By the end of this section, you should be able to build and run an example game made using agb! -**This section is optional.** -If you just want to get straight into building your own games, you don't need to do this. -However, we recommended doing this section to prove that your setup works. +By the end of this section, you should be able to build and run the **agb** template. # 1. Get the source code -The source code can be fetched using `git clone https://github.com/agbrs/joinedtogether.git`. +The source code can be fetched using `git clone https://github.com/agbrs/template.git`. -# 2. Build the game +# 2. Build the template -Build a copy of the game using `cargo build --release`. -This could take quite a while, but eventually you'll end up with a copy of the game in `target/thumbv4t-none-eabi/release/joinedtogether` or `target/thumbv4t-none-eabi/release/joinedtogether.elf` depending on platform. +Build a copy of the template using `cargo build --release`. +This could take quite a while, but eventually you'll end up with a copy of the template in `target/thumbv4t-none-eabi/release/template` or `target/thumbv4t-none-eabi/release/template.elf` depending on platform. This can be run directly by some emulators, but we need to run an extra step in order to convert the elf file into a '.gba' file. ```sh -arm-none-eabi-objcopy -O binary target/thumbv4t-none-eabi/release/joinedtogether joinedtogether.gba -gbafix joinedtogether.gba +arm-none-eabi-objcopy -O binary target/thumbv4t-none-eabi/release/template template.gba +gbafix template.gba ``` or ```sh -arm-none-eabi-objcopy -O binary target/thumbv4t-none-eabi/release/joinedtogether.elf joinedtogether.gba -gbafix joinedtogether.gba +arm-none-eabi-objcopy -O binary target/thumbv4t-none-eabi/release/template.elf template.gba +gbafix template.gba ``` And then load the resulting file in your emulator of choice. That's all there is to it! -If you have `mgba-qt` in your path, then you can launch the game directly using `cargo run --release` \ No newline at end of file +If you have `mgba-qt` in your path, then you can launch the template directly using `cargo run --release`. \ No newline at end of file