game/README.md

121 lines
5.3 KiB
Markdown

# *game* — a game boy advance game
Currently under development, with very few current updates here. See my
[blog][1] for updates, with it mirrored on gemini
(<gemini://tilde.team/~nytpu/blog/>) and gopher
(<gopher://tilde.team:70/1/~nytpu/blog>), with all game-related posts under the
heading `making-a-gba-game`.
I will update this README when more progress is made.
## building
I'm preparing for the future here, by writing everything I know now, but this
may change later as I work on the code
### dependencies
You can [follow the instructions][bld-1] to install DevKitARM and that should
provide you with all of the unusual or nonstandard tools you need. However,
I'll enumerate the specific tools you need if you want to install them
individually:
* Proper environment variables set up for `$DEVKITPRO` and `$DEVKITARM`
pointing towards the correct install locations
* `grit` — for converting exported maps or tilesets to `.h` and `.c` files for
use in the game
* `gbfs` — for building the GBFS filesystem
* `portlibs` installed to `$DEVKITPRO/portlibs`
* `libtonc` installed to `$DEVKITPRO/libtonc`
* Working installations of all `arm-none-eabi-` tools
* ...seriously, just install DevKitARM because everything weird is installed,
and I'm not sure if I even listed everything needed here
* `sed` — used in the makefiles
* `make` — used to make the darn thing
* Aseprite — optional, for editing the sprites
* mgba — optional, used for debugging and testing
**Note: the instructions don't really work yet because I have literally no code
for the game, but right now it will range from not working to displaying 3
beautifully colored RGB pixels**
Clone the repo and checkout the most recent release:
```
git clone https://tildegit.org/nytpu/game.git
cd game
git checkout $(git describe --tags --abbrev=0)
make
```
You should get `game.gba` spat out in the project root. You can then run that
on your flashcart or in an emulator and it should just work™.
If you modified graphics at all, you *must* regenerate the bin files manually
(using `grit <file>.png -ff` or `grit <file>.png -ff<file>_f<frame>.grit` for
animations) and place the `bin`s in the graphics folder. `make` will take care
of creating the GBFS file and adding it to the finished ROM for you though.
### repo layout
I don't expect anyone else to work on this, so it's more for my reference than
anyone else's.
`master` is reserved for currently working code. It should never be directly
committed to, and release commits should be tagged with their version number.
`next` is used for staging changes to be merged into master, and can have minor
fixes directly committed, but major features or additions should be in their
own project branch.
Project branches should be created for each feature or component addition, for
example `art` is used to work on art without conflicting on existing exported
artwork when working on code. Should only be merged when the current
implementation of a feature is complete, and other branches should not be
merged into project branches unless their additions are necessary.
Basically, follow the recommended [git workflows][bld-2].
Current branches:
* `art` — for working on artwork
* `video` — for working on displaying stuff
* `input` — moving the stuff displayed in `video` around
* `next` — for changes waiting to be tested/merged
* `master` — main branch
## special thanks to
* [DevKitPro][stt-1] for their amazing [DevKitARM][stt-2] toolchain, complete
with a custom `libc` and `gcc`, without which I wouldn't have even
thought of attempting anything with the GBA.
* [cearn][stt-3] for his wonderful [tonclib][stt-4] as well as his very
in-depth and useful [tonc tutorial][stt-5]. Without these tools and
references, I would have been totally unable to make anything like this.
* [Damian Yerrick][stt-6] for [GBFS][stt-7], which makes it so much easier for
* [Squirm][stt-8], [Hollow Knight][stt-9], [Celeste][stt-10], [PICO-8][stt-11]
& its entire community, and an unenumerable number of other places for
inspiring this game.
## copyright
I'm not worried about Nintendo doing anything because they only bring action
against people who pirate their games or who make fan games with their IP, like
Pokémon fan games (I'll leave my defense of fair use for another time), not
homebrew devs making original games. However, if Nintendo sees any legal issues
with this game, please contact me at <nytpu@tilde.team> before contacting
tildegit and I will take down this repository or take any other action
requested.
This project, including artwork, sound, etc. is dual-licensed under the
Unlicense and the MIT License, and you can use the project under the terms of
either license. For more details, see COPYING.
[1]: https://tilde.team/~nytpu/blog/tag_gbagame.html
[bld-1]: https://devkitpro.org/wiki/Getting_Started/devkitARM
[bld-2]: http://schacon.github.io/git/gitworkflows.html
[stt-1]: https://devkitpro.org/wiki/about
[stt-2]: https://devkitpro.org/wiki/devkitARM
[stt-3]: http://www.coranac.com/
[stt-4]: http://www.coranac.com/projects/tonc/
[stt-5]: http://www.coranac.com/tonc/text/toc.htm
[stt-6]: https://pineight.com/
[stt-7]: https://pineight.com/gba/#gbfs
[stt-8]: https://alpenter.space/squirm.html
[stt-9]: http://www.hollowknight.com/
[stt-10]: https://www.lexaloffle.com/bbs/?pid=11722
[stt-11]: https://www.lexaloffle.com/pico-8.php