Go to file
Gwilym Inzani a30bb9a774
Use own gbafix implementation (#464)
Breaks the dependency on the gbafix crate and implements the header
fixing code internally.

Also, relicence `agb-gbafix` to MPL to match everything else.

- [x] Changelog updated
2023-07-26 10:39:26 +01:00
.github Schedule nightly run to be at 6:10 rather than 5:10 2023-06-25 16:07:59 +01:00
.vscode go back to tab spacing 2023-04-25 20:39:25 +01:00
agb Channel counts as finished if the channel position reaches the end of the effect 2023-07-25 23:24:40 +01:00
agb-fixnum Release v0.16.0 2023-07-18 18:55:12 +01:00
agb-gbafix Update the licence to be MPL since we have no GPL dependency any more 2023-07-26 10:23:34 +01:00
agb-hashmap Release v0.16.0 2023-07-18 18:55:12 +01:00
agb-image-converter Release v0.16.0 2023-07-18 18:55:12 +01:00
agb-macros Release v0.16.0 2023-07-18 18:55:12 +01:00
agb-sound-converter Release v0.16.0 2023-07-18 18:55:12 +01:00
book Release v0.16.0 2023-07-18 18:55:12 +01:00
examples Don't need to call it levels16 any more 2023-07-25 23:22:08 +01:00
mgba-test-runner Update lockfiles 2023-06-30 22:03:31 +01:00
template Release v0.16.0 2023-07-18 18:55:12 +01:00
tools Attempt to update the tools to the new folder 2023-07-23 18:35:50 +01:00
tracker Fix a bunch of bugs after playing with different tracks 2023-07-23 23:37:14 +01:00
.gitignore Delete library cargo.locks 2022-03-12 23:39:58 +00:00
CHANGELOG.md Add changelog entry for licence change 2023-07-26 10:25:02 +01:00
justfile Import dungeon puzzler's lament (#459) 2023-07-25 20:52:48 +01:00
LICENSE add project wide MPLv2 license 2021-05-29 15:22:19 +01:00
logo-original.png Add logo to repo and readme 2021-07-05 23:56:43 +01:00
README.md Update the licence to be MPL since we have no GPL dependency any more 2023-07-26 10:23:34 +01:00

AGB

Rust for the Game Boy Advance

Docs Build Licence Crates.io

AGB logo

This is a library for making games on the Game Boy Advance using the Rust programming language. The library's main focus is to provide an abstraction that allows you to develop games which take advantage of the GBA's capabilities without needing to have extensive knowledge of its low-level implementation.

agb provides the following features:

  • Simple build process with minimal dependencies
  • Built in importing of sprites, backgrounds, music and sound effects
  • High performance audio mixer
  • Easy to use sprite and tiled background usage
  • A global allocator allowing for use of both core and alloc

The documentation for the latest release can be found on docs.rs.

Getting started

The best way to get started with agb is to use the template, either within the template directory in this repository or cloning the template repository.

Once you have done this, you will find further instructions within the README in the template.

There is an (in progress) tutorial which you can find on the project website.

Help / Support

If you need any help, the discussions page is a great place to get help from the creators and contributors.

Feel free to create a new discussion in the Q&A category and we'll do our best to help!

Contributing to agb itself

In order to contribute to agb itself, you will need a few extra tools on top of what you would need to just write games for the Game Boy Advance using this library:

  • Recent rustup, see the rust website for instructions for your operating system.
    • You can update rustup with rustup update, or using your package manager if you obtained rustup in this way.
  • libelf and cmake
    • Debian and derivatives: sudo apt install libelf-dev cmake
    • Arch Linux and derivatives: pacman -S libelf cmake
  • mgba-test-runner
    • Run cargo install --path mgba-test-runner inside this directory
  • The 'just' build tool
    • Install with cargo install just
  • mdbook
    • Install with cargo install mdbook
  • miri
    • Some of the unsafe code is tested using miri, install with rustup component add miri

With all of this installed, you should be able to run a full build of agb using by running

just ci

Note that before you create a PR, please file an issue so we can discuss what you are looking to change.

Structure of the repo

agb-fixnum - a simple fixed point number storage since the GBA doesn't have a floating point unit, so required for performant decimals.

agb-image-converter - a crate which converts images in normal formats to a format supported by the game boy advance

agb-macros - miscellaneous proc-macros which have to be in a different crate

agb-sound-converter - a crate which converts wav files into a format supported by the game boy advance

agb-hashmap - an no_std hashmap implementation tuned for use on the game boy advance

agb - the main library code

agb/examples - basic examples often targeting 1 feature, you can run these using just run-example <example-name>

tracker - crates that make up the agb-tracker library which allows playing of tracker files

book - the source for the tutorial and website

book/games - games made as part of the tutorial

examples - bigger examples of a complete game, made during game jams

mgba-test-runner - a wrapper around the mgba emulator which allows us to write unit tests in rust

template - the source for the template repository

Stability

While agb is in the pre-1.0 phase, we follow a semi-semantic versioning scheme to ensure compatibility between minor releases. Specifically, any 0.x.y release is guaranteed to be compatible with another 0.x.z release provided that y > z, but there may be breaking changes between minor releases (i.e., changes to the second digit, e.g., between 0.1 and 0.2).

Once agb reaches version 1.0, we will transition to stronger semantic versioning, meaning that any breaking changes will be indicated by an increment to the major version (i.e., the first digit, e.g., from 1.0 to 2.0).

Acknowledgments

agb would not be possible without the help from the following (non-exhaustive) list of projects:

  • The amazing work of the rust-console for making this all possible in the first place
  • The asefile crate for loading aseprite files
  • agbabi for providing high performance alternatives to common methods
  • mgba for all the useful debugging / developer tools built in to the emulator

Licence

agb and all its subcrates are released under MPL version 2.0. See full licence text in the LICENSE file.

agb contains a subset of the code from agbabi which is released under a zlib style licence, details for which you can find under agb/src/agbabi.

The template is released under CC0 to allow you to make whatever changes you wish.

The agb logo is released under Creative Commons Attribution-ShareAlike 4.0

The music used for the examples is by Josh Woodward and released under Creative Commons Attribution 4.0