My actor.rpg avatar walking around on a GBA game
2
fork

Configure Feed

Select the types of activity you want to include in your feed.

Little off on top and bottom, but working

+699 -75
+5 -1
.gitignore
··· 1 - target 1 + target 2 + agb 3 + pumpkin_head.gba 4 + pumpkin_head.sav 5 + .DS_Store
+584
Cargo.lock
··· 1 + # This file is automatically @generated by Cargo. 2 + # It is not intended for manual editing. 3 + version = 4 4 + 5 + [[package]] 6 + name = "adler2" 7 + version = "2.0.1" 8 + source = "registry+https://github.com/rust-lang/crates.io-index" 9 + checksum = "320119579fcad9c21884f5c4861d16174d0e06250625266f50fe6898340abefa" 10 + 11 + [[package]] 12 + name = "agb" 13 + version = "0.23.1" 14 + source = "registry+https://github.com/rust-lang/crates.io-index" 15 + checksum = "8f82890a21e1b80ed4cf32487ed08691e90b42c7e36b3a85c8b82d4319e6b7eb" 16 + dependencies = [ 17 + "agb_fixnum", 18 + "agb_hashmap", 19 + "agb_image_converter", 20 + "agb_macros", 21 + "agb_save", 22 + "agb_sound_converter", 23 + "bilge", 24 + "critical-section", 25 + "once_cell", 26 + "portable-atomic", 27 + "qrcodegen-no-heap", 28 + "serde", 29 + ] 30 + 31 + [[package]] 32 + name = "agb_fixnum" 33 + version = "0.23.1" 34 + source = "registry+https://github.com/rust-lang/crates.io-index" 35 + checksum = "4cab9f0be30139b28ca818cb0b3f13b64ea45c657bd5aa28cde40ff5a5f48b78" 36 + dependencies = [ 37 + "const_soft_float", 38 + "num-traits", 39 + "quote", 40 + "serde", 41 + "typewit", 42 + ] 43 + 44 + [[package]] 45 + name = "agb_hashmap" 46 + version = "0.23.1" 47 + source = "registry+https://github.com/rust-lang/crates.io-index" 48 + checksum = "af833f0741bd0837c596aec2ece5666658a54737dbce59d5032c01cc8d7ac8ba" 49 + dependencies = [ 50 + "rustc-hash", 51 + "serde", 52 + ] 53 + 54 + [[package]] 55 + name = "agb_image_converter" 56 + version = "0.23.1" 57 + source = "registry+https://github.com/rust-lang/crates.io-index" 58 + checksum = "9e734785d954fb1bc8e90bd96ea74608612fabd048824f8c65a3e3368afe81b9" 59 + dependencies = [ 60 + "asefile", 61 + "fontdue", 62 + "image", 63 + "pagination-packing", 64 + "proc-macro2", 65 + "quote", 66 + "snafu", 67 + "syn", 68 + ] 69 + 70 + [[package]] 71 + name = "agb_macros" 72 + version = "0.23.1" 73 + source = "registry+https://github.com/rust-lang/crates.io-index" 74 + checksum = "71baacd13fa836201d6591673d573a813b8ee2efc33f1137df90320cbd8ab5e3" 75 + dependencies = [ 76 + "proc-macro2", 77 + "quote", 78 + "syn", 79 + ] 80 + 81 + [[package]] 82 + name = "agb_save" 83 + version = "0.23.1" 84 + source = "registry+https://github.com/rust-lang/crates.io-index" 85 + checksum = "ec10f0eb65287c68b61ba5c83bcd1f24cd8c1fbf514771a28184e830d648990c" 86 + dependencies = [ 87 + "crc16", 88 + "postcard", 89 + "serde", 90 + ] 91 + 92 + [[package]] 93 + name = "agb_sound_converter" 94 + version = "0.23.1" 95 + source = "registry+https://github.com/rust-lang/crates.io-index" 96 + checksum = "08c27fa374177a02e751b0e390da8ec79339990dd7439db0ada56aef5df0dd31" 97 + dependencies = [ 98 + "hound", 99 + "proc-macro2", 100 + "quote", 101 + "syn", 102 + ] 103 + 104 + [[package]] 105 + name = "agb_template" 106 + version = "0.1.0" 107 + dependencies = [ 108 + "agb", 109 + ] 110 + 111 + [[package]] 112 + name = "allocator-api2" 113 + version = "0.2.21" 114 + source = "registry+https://github.com/rust-lang/crates.io-index" 115 + checksum = "683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923" 116 + 117 + [[package]] 118 + name = "arbitrary-int" 119 + version = "2.1.1" 120 + source = "registry+https://github.com/rust-lang/crates.io-index" 121 + checksum = "993a810118f8f37e9c4411c86f1c4c940a09a7ab34b7bf2d88d06f50c553fab7" 122 + 123 + [[package]] 124 + name = "asefile" 125 + version = "0.3.8" 126 + source = "registry+https://github.com/rust-lang/crates.io-index" 127 + checksum = "556cab74f613f2bcf3ab5dc5bbd2220fe2e1a4e7380fbaff96c5333a117066b4" 128 + dependencies = [ 129 + "bitflags 2.11.1", 130 + "byteorder", 131 + "flate2", 132 + "image", 133 + "log", 134 + "nohash", 135 + ] 136 + 137 + [[package]] 138 + name = "autocfg" 139 + version = "1.5.0" 140 + source = "registry+https://github.com/rust-lang/crates.io-index" 141 + checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8" 142 + 143 + [[package]] 144 + name = "bilge" 145 + version = "0.3.0" 146 + source = "registry+https://github.com/rust-lang/crates.io-index" 147 + checksum = "279c74986684d5cc7bbbd079aa448e8f852992cd385d85bb3a37e374c087b065" 148 + dependencies = [ 149 + "arbitrary-int", 150 + "bilge-impl", 151 + ] 152 + 153 + [[package]] 154 + name = "bilge-impl" 155 + version = "0.3.0" 156 + source = "registry+https://github.com/rust-lang/crates.io-index" 157 + checksum = "a1176e49f42fe135cd2b56465e4f7d07038d3728f5e9f27fb2f08ed3fef75339" 158 + dependencies = [ 159 + "itertools", 160 + "proc-macro-error2", 161 + "proc-macro2", 162 + "quote", 163 + "syn", 164 + ] 165 + 166 + [[package]] 167 + name = "bitflags" 168 + version = "1.3.2" 169 + source = "registry+https://github.com/rust-lang/crates.io-index" 170 + checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 171 + 172 + [[package]] 173 + name = "bitflags" 174 + version = "2.11.1" 175 + source = "registry+https://github.com/rust-lang/crates.io-index" 176 + checksum = "c4512299f36f043ab09a583e57bceb5a5aab7a73db1805848e8fef3c9e8c78b3" 177 + 178 + [[package]] 179 + name = "bytemuck" 180 + version = "1.25.0" 181 + source = "registry+https://github.com/rust-lang/crates.io-index" 182 + checksum = "c8efb64bd706a16a1bdde310ae86b351e4d21550d98d056f22f8a7f7a2183fec" 183 + 184 + [[package]] 185 + name = "byteorder" 186 + version = "1.5.0" 187 + source = "registry+https://github.com/rust-lang/crates.io-index" 188 + checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 189 + 190 + [[package]] 191 + name = "cfg-if" 192 + version = "1.0.4" 193 + source = "registry+https://github.com/rust-lang/crates.io-index" 194 + checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801" 195 + 196 + [[package]] 197 + name = "cobs" 198 + version = "0.3.0" 199 + source = "registry+https://github.com/rust-lang/crates.io-index" 200 + checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1" 201 + dependencies = [ 202 + "thiserror", 203 + ] 204 + 205 + [[package]] 206 + name = "color_quant" 207 + version = "1.1.0" 208 + source = "registry+https://github.com/rust-lang/crates.io-index" 209 + checksum = "3d7b894f5411737b7867f4827955924d7c254fc9f4d91a6aad6b097804b1018b" 210 + 211 + [[package]] 212 + name = "const_soft_float" 213 + version = "0.1.4" 214 + source = "registry+https://github.com/rust-lang/crates.io-index" 215 + checksum = "87ca1caa64ef4ed453e68bb3db612e51cf1b2f5b871337f0fcab1c8f87cc3dff" 216 + 217 + [[package]] 218 + name = "crc16" 219 + version = "0.4.0" 220 + source = "registry+https://github.com/rust-lang/crates.io-index" 221 + checksum = "338089f42c427b86394a5ee60ff321da23a5c89c9d89514c829687b26359fcff" 222 + 223 + [[package]] 224 + name = "crc32fast" 225 + version = "1.5.0" 226 + source = "registry+https://github.com/rust-lang/crates.io-index" 227 + checksum = "9481c1c90cbf2ac953f07c8d4a58aa3945c425b7185c9154d67a65e4230da511" 228 + dependencies = [ 229 + "cfg-if", 230 + ] 231 + 232 + [[package]] 233 + name = "critical-section" 234 + version = "1.2.0" 235 + source = "registry+https://github.com/rust-lang/crates.io-index" 236 + checksum = "790eea4361631c5e7d22598ecd5723ff611904e3344ce8720784c93e3d83d40b" 237 + 238 + [[package]] 239 + name = "either" 240 + version = "1.15.0" 241 + source = "registry+https://github.com/rust-lang/crates.io-index" 242 + checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" 243 + 244 + [[package]] 245 + name = "embedded-io" 246 + version = "0.4.0" 247 + source = "registry+https://github.com/rust-lang/crates.io-index" 248 + checksum = "ef1a6892d9eef45c8fa6b9e0086428a2cca8491aca8f787c534a3d6d0bcb3ced" 249 + 250 + [[package]] 251 + name = "embedded-io" 252 + version = "0.6.1" 253 + source = "registry+https://github.com/rust-lang/crates.io-index" 254 + checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d" 255 + 256 + [[package]] 257 + name = "equivalent" 258 + version = "1.0.2" 259 + source = "registry+https://github.com/rust-lang/crates.io-index" 260 + checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" 261 + 262 + [[package]] 263 + name = "fdeflate" 264 + version = "0.3.7" 265 + source = "registry+https://github.com/rust-lang/crates.io-index" 266 + checksum = "1e6853b52649d4ac5c0bd02320cddc5ba956bdb407c4b75a2c6b75bf51500f8c" 267 + dependencies = [ 268 + "simd-adler32", 269 + ] 270 + 271 + [[package]] 272 + name = "flate2" 273 + version = "1.1.9" 274 + source = "registry+https://github.com/rust-lang/crates.io-index" 275 + checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c" 276 + dependencies = [ 277 + "crc32fast", 278 + "miniz_oxide", 279 + ] 280 + 281 + [[package]] 282 + name = "foldhash" 283 + version = "0.1.5" 284 + source = "registry+https://github.com/rust-lang/crates.io-index" 285 + checksum = "d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2" 286 + 287 + [[package]] 288 + name = "fontdue" 289 + version = "0.9.3" 290 + source = "registry+https://github.com/rust-lang/crates.io-index" 291 + checksum = "2e57e16b3fe8ff4364c0661fdaac543fb38b29ea9bc9c2f45612d90adf931d2b" 292 + dependencies = [ 293 + "hashbrown", 294 + "ttf-parser", 295 + ] 296 + 297 + [[package]] 298 + name = "hashbrown" 299 + version = "0.15.5" 300 + source = "registry+https://github.com/rust-lang/crates.io-index" 301 + checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1" 302 + dependencies = [ 303 + "allocator-api2", 304 + "equivalent", 305 + "foldhash", 306 + ] 307 + 308 + [[package]] 309 + name = "heck" 310 + version = "0.5.0" 311 + source = "registry+https://github.com/rust-lang/crates.io-index" 312 + checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 313 + 314 + [[package]] 315 + name = "hound" 316 + version = "3.5.1" 317 + source = "registry+https://github.com/rust-lang/crates.io-index" 318 + checksum = "62adaabb884c94955b19907d60019f4e145d091c75345379e70d1ee696f7854f" 319 + 320 + [[package]] 321 + name = "image" 322 + version = "0.24.9" 323 + source = "registry+https://github.com/rust-lang/crates.io-index" 324 + checksum = "5690139d2f55868e080017335e4b94cb7414274c74f1669c84fb5feba2c9f69d" 325 + dependencies = [ 326 + "bytemuck", 327 + "byteorder", 328 + "color_quant", 329 + "num-traits", 330 + "png", 331 + ] 332 + 333 + [[package]] 334 + name = "itertools" 335 + version = "0.14.0" 336 + source = "registry+https://github.com/rust-lang/crates.io-index" 337 + checksum = "2b192c782037fadd9cfa75548310488aabdbf3d2da73885b31bd0abd03351285" 338 + dependencies = [ 339 + "either", 340 + ] 341 + 342 + [[package]] 343 + name = "log" 344 + version = "0.4.29" 345 + source = "registry+https://github.com/rust-lang/crates.io-index" 346 + checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897" 347 + 348 + [[package]] 349 + name = "miniz_oxide" 350 + version = "0.8.9" 351 + source = "registry+https://github.com/rust-lang/crates.io-index" 352 + checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316" 353 + dependencies = [ 354 + "adler2", 355 + "simd-adler32", 356 + ] 357 + 358 + [[package]] 359 + name = "nohash" 360 + version = "0.2.0" 361 + source = "registry+https://github.com/rust-lang/crates.io-index" 362 + checksum = "a0f889fb66f7acdf83442c35775764b51fed3c606ab9cee51500dbde2cf528ca" 363 + 364 + [[package]] 365 + name = "num-traits" 366 + version = "0.2.19" 367 + source = "registry+https://github.com/rust-lang/crates.io-index" 368 + checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 369 + dependencies = [ 370 + "autocfg", 371 + ] 372 + 373 + [[package]] 374 + name = "once_cell" 375 + version = "1.21.4" 376 + source = "registry+https://github.com/rust-lang/crates.io-index" 377 + checksum = "9f7c3e4beb33f85d45ae3e3a1792185706c8e16d043238c593331cc7cd313b50" 378 + dependencies = [ 379 + "critical-section", 380 + "portable-atomic", 381 + ] 382 + 383 + [[package]] 384 + name = "pagination-packing" 385 + version = "2.1.3" 386 + source = "registry+https://github.com/rust-lang/crates.io-index" 387 + checksum = "fee2531e9fa461274702c7fca3ad82af33297de093c323ec36bbc2fb2091953b" 388 + 389 + [[package]] 390 + name = "png" 391 + version = "0.17.16" 392 + source = "registry+https://github.com/rust-lang/crates.io-index" 393 + checksum = "82151a2fc869e011c153adc57cf2789ccb8d9906ce52c0b39a6b5697749d7526" 394 + dependencies = [ 395 + "bitflags 1.3.2", 396 + "crc32fast", 397 + "fdeflate", 398 + "flate2", 399 + "miniz_oxide", 400 + ] 401 + 402 + [[package]] 403 + name = "portable-atomic" 404 + version = "1.13.1" 405 + source = "registry+https://github.com/rust-lang/crates.io-index" 406 + checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49" 407 + 408 + [[package]] 409 + name = "postcard" 410 + version = "1.1.3" 411 + source = "registry+https://github.com/rust-lang/crates.io-index" 412 + checksum = "6764c3b5dd454e283a30e6dfe78e9b31096d9e32036b5d1eaac7a6119ccb9a24" 413 + dependencies = [ 414 + "cobs", 415 + "embedded-io 0.4.0", 416 + "embedded-io 0.6.1", 417 + "serde", 418 + ] 419 + 420 + [[package]] 421 + name = "proc-macro-error-attr2" 422 + version = "2.0.0" 423 + source = "registry+https://github.com/rust-lang/crates.io-index" 424 + checksum = "96de42df36bb9bba5542fe9f1a054b8cc87e172759a1868aa05c1f3acc89dfc5" 425 + dependencies = [ 426 + "proc-macro2", 427 + "quote", 428 + ] 429 + 430 + [[package]] 431 + name = "proc-macro-error2" 432 + version = "2.0.1" 433 + source = "registry+https://github.com/rust-lang/crates.io-index" 434 + checksum = "11ec05c52be0a07b08061f7dd003e7d7092e0472bc731b4af7bb1ef876109802" 435 + dependencies = [ 436 + "proc-macro-error-attr2", 437 + "proc-macro2", 438 + "quote", 439 + ] 440 + 441 + [[package]] 442 + name = "proc-macro2" 443 + version = "1.0.106" 444 + source = "registry+https://github.com/rust-lang/crates.io-index" 445 + checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934" 446 + dependencies = [ 447 + "unicode-ident", 448 + ] 449 + 450 + [[package]] 451 + name = "qrcodegen-no-heap" 452 + version = "1.8.1" 453 + source = "registry+https://github.com/rust-lang/crates.io-index" 454 + checksum = "d0e2c0bf8be8a1c4a4f48973dabf26943f05da2bfc2d3180aae62409dbba6f0c" 455 + 456 + [[package]] 457 + name = "quote" 458 + version = "1.0.45" 459 + source = "registry+https://github.com/rust-lang/crates.io-index" 460 + checksum = "41f2619966050689382d2b44f664f4bc593e129785a36d6ee376ddf37259b924" 461 + dependencies = [ 462 + "proc-macro2", 463 + ] 464 + 465 + [[package]] 466 + name = "rustc-hash" 467 + version = "2.1.2" 468 + source = "registry+https://github.com/rust-lang/crates.io-index" 469 + checksum = "94300abf3f1ae2e2b8ffb7b58043de3d399c73fa6f4b73826402a5c457614dbe" 470 + 471 + [[package]] 472 + name = "serde" 473 + version = "1.0.228" 474 + source = "registry+https://github.com/rust-lang/crates.io-index" 475 + checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e" 476 + dependencies = [ 477 + "serde_core", 478 + "serde_derive", 479 + ] 480 + 481 + [[package]] 482 + name = "serde_core" 483 + version = "1.0.228" 484 + source = "registry+https://github.com/rust-lang/crates.io-index" 485 + checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad" 486 + dependencies = [ 487 + "serde_derive", 488 + ] 489 + 490 + [[package]] 491 + name = "serde_derive" 492 + version = "1.0.228" 493 + source = "registry+https://github.com/rust-lang/crates.io-index" 494 + checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79" 495 + dependencies = [ 496 + "proc-macro2", 497 + "quote", 498 + "syn", 499 + ] 500 + 501 + [[package]] 502 + name = "simd-adler32" 503 + version = "0.3.9" 504 + source = "registry+https://github.com/rust-lang/crates.io-index" 505 + checksum = "703d5c7ef118737c72f1af64ad2f6f8c5e1921f818cdcb97b8fe6fc69bf66214" 506 + 507 + [[package]] 508 + name = "snafu" 509 + version = "0.8.9" 510 + source = "registry+https://github.com/rust-lang/crates.io-index" 511 + checksum = "6e84b3f4eacbf3a1ce05eac6763b4d629d60cbc94d632e4092c54ade71f1e1a2" 512 + dependencies = [ 513 + "snafu-derive", 514 + ] 515 + 516 + [[package]] 517 + name = "snafu-derive" 518 + version = "0.8.9" 519 + source = "registry+https://github.com/rust-lang/crates.io-index" 520 + checksum = "c1c97747dbf44bb1ca44a561ece23508e99cb592e862f22222dcf42f51d1e451" 521 + dependencies = [ 522 + "heck", 523 + "proc-macro2", 524 + "quote", 525 + "syn", 526 + ] 527 + 528 + [[package]] 529 + name = "syn" 530 + version = "2.0.117" 531 + source = "registry+https://github.com/rust-lang/crates.io-index" 532 + checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99" 533 + dependencies = [ 534 + "proc-macro2", 535 + "quote", 536 + "unicode-ident", 537 + ] 538 + 539 + [[package]] 540 + name = "thiserror" 541 + version = "2.0.18" 542 + source = "registry+https://github.com/rust-lang/crates.io-index" 543 + checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4" 544 + dependencies = [ 545 + "thiserror-impl", 546 + ] 547 + 548 + [[package]] 549 + name = "thiserror-impl" 550 + version = "2.0.18" 551 + source = "registry+https://github.com/rust-lang/crates.io-index" 552 + checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5" 553 + dependencies = [ 554 + "proc-macro2", 555 + "quote", 556 + "syn", 557 + ] 558 + 559 + [[package]] 560 + name = "ttf-parser" 561 + version = "0.21.1" 562 + source = "registry+https://github.com/rust-lang/crates.io-index" 563 + checksum = "2c591d83f69777866b9126b24c6dd9a18351f177e49d625920d19f989fd31cf8" 564 + 565 + [[package]] 566 + name = "typewit" 567 + version = "1.15.2" 568 + source = "registry+https://github.com/rust-lang/crates.io-index" 569 + checksum = "214ca0b2191785cbc06209b9ca1861e048e39b5ba33574b3cedd58363d5bb5f6" 570 + dependencies = [ 571 + "typewit_proc_macros", 572 + ] 573 + 574 + [[package]] 575 + name = "typewit_proc_macros" 576 + version = "1.8.1" 577 + source = "registry+https://github.com/rust-lang/crates.io-index" 578 + checksum = "e36a83ea2b3c704935a01b4642946aadd445cea40b10935e3f8bd8052b8193d6" 579 + 580 + [[package]] 581 + name = "unicode-ident" 582 + version = "1.0.24" 583 + source = "registry+https://github.com/rust-lang/crates.io-index" 584 + checksum = "e6e4313cd5fcd3dad5cafa179702e2b244f760991f45397d14d4ebf38247da75"
+5 -62
README.md
··· 1 - # AGBRS template 2 - 3 - ## A basic template example for agb projects 4 - 5 - This makes getting started with a new project for the Game Boy Advance in rust really simple, by providing 6 - all the boiler plate files for you. 7 - 8 - ## Building 9 - 10 - ### Prerequisites 11 - 12 - You will need the following installed in order to build and run this project: 13 - 14 - - A recent version of `rustup`. See the [rust website](https://www.rust-lang.org/tools/install) for instructions for your operating system 15 - 16 - You will also want to install an emulator. The best support in agb is with [mgba](https://mgba.io), with 17 - `println!` support via `agb::println!` but any emulator should work. You'll get the best experience if 18 - `mgba-qt` is in your `PATH`. 1 + # Pumpkin Head The Game 19 2 20 - If you want to run your game on real hardware, you will also need to install `agb-gbafix` which you can do after installing 21 - rust with the following: `cargo install agb-gbafix`. This is not required if you are only running your game in an emulator. 3 + They said it couldn't be done. But now you can play the exciting Pumpkin Head game play. 22 4 23 - ### Running in an emulator 5 + Okay it's just really a demo of my [rpg.actor](https://rpg.actor) sprite walking around in a GBA game built with [agbrs](https://agbrs.dev/) 24 6 25 - Once you have the prerequisites installed, you should be able to build using 7 + Post showing it [here](https://bsky.app/profile/pds.dad/post/3mkgkpk2vi22x) 26 8 27 - ```sh 28 - cargo build 29 - ``` 30 9 31 - or in release mode (recommended for the final version to ship to players) 32 - 33 - ```sh 34 - cargo build --release 35 - ``` 36 - 37 - The resulting file will be in `target/thumbv4t-none-eabi/debug/<your game>` or `target/thumbv4t-none-eabi/release/<your game>` depending on 38 - whether you did a release or debug build. 39 - 40 - If you have `mgba-qt` in your path, you will be able to run your game with 41 - 42 - ```sh 43 - cargo run 44 - ``` 45 - 46 - or in release mode 47 - 48 - ```sh 49 - cargo run --release 50 - ``` 51 - 52 - ## Starting development 53 - 54 - You can find the documentation for agb [here](https://docs.rs/agb/latest/agb/), or follow the tutorial in [the book](https://agbrs.dev/book/). 55 - 56 - You may also want to change the package name and version in `Cargo.toml` before you start. 57 - 58 - ## Shipping a .gba file for real hardware 59 - 60 - To make a game run on real hardware, you will need to convert the built file into a file suitable for 61 - running on the real thing. 62 - 63 - First build the binary in release mode using the instructions above, then do the following: 64 - 65 - ```sh 66 - agb-gbafix target/thumbv4t-none-eabi/release/<your game> -o <your game>.gba 67 - ``` 10 + If you're wanting to learn to build your own GBA with rust or to run this, best to start with [The agb book](https://agbrs.dev/book/introduction/introduction.html).
gfx/pumpkin_head.aseprite

This is a binary file and will not be displayed.

+105 -12
src/main.rs
··· 1 - // Games made using `agb` are no_std which means you don't have access to the standard 2 - // rust library. This is because the game boy advance doesn't have an operating 3 - // system, so most of the content of the standard library doesn't apply. 4 1 #![no_std] 5 - // `agb` defines its own `main` function, so you must declare your game's main function 6 - // using the #[agb::entry] proc macro. Failing to do so will cause failure in linking 7 - // which won't be a particularly clear error message. 8 2 #![no_main] 9 - // This is required to allow writing tests 10 3 #![cfg_attr(test, feature(custom_test_frameworks))] 11 4 #![cfg_attr(test, reexport_test_harness_main = "test_main")] 12 5 #![cfg_attr(test, test_runner(agb::test_runner::test_runner))] 13 6 14 - // By default no_std crates don't get alloc, so you won't be able to use things like Vec 15 - // until you declare the extern crate. `agb` provides an allocator so it will all work 16 7 extern crate alloc; 17 8 18 - // The main function must take 1 arguments and never returns, and must be marked with 19 - // the #[agb::entry] macro. 9 + use agb::{ 10 + display::{ 11 + HEIGHT, WIDTH, 12 + object::{Object, Sprite, Tag}, 13 + }, 14 + fixnum::{Num, Vector2D, num, vec2}, 15 + include_aseprite, 16 + input::ButtonController, 17 + }; 18 + 19 + include_aseprite!(mod sprites, "gfx/pumpkin_head.aseprite"); 20 + use sprites::{FORWARD, LEFT, REVERSE, RIGHT}; 21 + 22 + type Number = Num<i32, 8>; 23 + 24 + #[derive(Clone, Copy)] 25 + enum Facing { 26 + Forward, 27 + Reverse, 28 + Left, 29 + Right, 30 + } 31 + 32 + impl Facing { 33 + fn tag(self) -> &'static Tag { 34 + match self { 35 + Facing::Forward => &FORWARD, 36 + Facing::Reverse => &REVERSE, 37 + Facing::Left => &LEFT, 38 + Facing::Right => &RIGHT, 39 + } 40 + } 41 + } 42 + 43 + const SPEED: Number = num!(0.75); 44 + const SPRITE_SIZE: i32 = 32; 45 + const FRAMES_PER_STEP: usize = 8; 46 + 20 47 #[agb::entry] 21 48 fn main(gba: agb::Gba) -> ! { 22 - agb::no_game(gba); 49 + run(gba); 50 + } 51 + 52 + fn run(mut gba: agb::Gba) -> ! { 53 + let mut gfx = gba.graphics.get(); 54 + let mut input = ButtonController::new(); 55 + 56 + let mut position: Vector2D<Number> = vec2( 57 + Number::new((WIDTH - SPRITE_SIZE) / 2), 58 + Number::new((HEIGHT - SPRITE_SIZE) / 2), 59 + ); 60 + let mut facing = Facing::Forward; 61 + let mut walk_frames: usize = 0; 62 + 63 + let max_x = Number::new(WIDTH - SPRITE_SIZE); 64 + let max_y = Number::new(HEIGHT - SPRITE_SIZE); 65 + 66 + loop { 67 + input.update(); 68 + 69 + let dx = input.x_tri() as i32; 70 + let dy = input.y_tri() as i32; 71 + let moving = dx != 0 || dy != 0; 72 + 73 + if moving { 74 + facing = if dy < 0 { 75 + Facing::Reverse 76 + } else if dy > 0 { 77 + Facing::Forward 78 + } else if dx < 0 { 79 + Facing::Left 80 + } else { 81 + Facing::Right 82 + }; 83 + 84 + position.x += SPEED * dx; 85 + position.y += SPEED * dy; 86 + 87 + if position.x < num!(0.0) { 88 + position.x = num!(0.0); 89 + } 90 + if position.y < num!(0.0) { 91 + position.y = num!(0.0); 92 + } 93 + if position.x > max_x { 94 + position.x = max_x; 95 + } 96 + if position.y > max_y { 97 + position.y = max_y; 98 + } 99 + 100 + walk_frames = walk_frames.wrapping_add(1); 101 + } 102 + 103 + let tag = facing.tag(); 104 + let sprite: &'static Sprite = if moving { 105 + tag.animation_sprite(walk_frames / FRAMES_PER_STEP) 106 + } else { 107 + tag.sprite(0) 108 + }; 109 + 110 + let mut frame = gfx.frame(); 111 + Object::new(sprite) 112 + .set_pos(position.floor()) 113 + .show(&mut frame); 114 + frame.commit(); 115 + } 23 116 }