├── .gitattributes ├── README.md ├── _config.yml ├── builds ├── README.md ├── b8p.data ├── b8p.js └── play.html ├── docs ├── changelog.md ├── imgs │ ├── coordinate.png │ ├── head.png │ ├── logo.png │ ├── welcome.png │ ├── workshop.png │ ├── workshop_mount.png │ ├── workshop_push.png │ ├── workshop_remove.png │ ├── workshop_submit.png │ └── workshop_subscribe.png ├── manual.md ├── welcome.md └── workshop.md ├── examples ├── Boing Ball │ ├── README.md │ └── content │ │ ├── info.json │ │ ├── main.bas │ │ ├── main.palette │ │ └── sticker.png ├── Cosmos Saga │ ├── README.md │ └── content │ │ ├── enemy_bank.sprite │ │ ├── explosion_bank.sprite │ │ ├── galaxy_scroll.map │ │ ├── info.json │ │ ├── main.bas │ │ ├── main.palette │ │ ├── main.tiles │ │ ├── over_txt.quantized │ │ ├── spaceship.sprite │ │ ├── sticker.png │ │ ├── title_bg.quantized │ │ └── title_txt.quantized └── Infinity Fighter │ ├── README.md │ └── content │ ├── battle_bg.map │ ├── battle_fg.map │ ├── fighter_bank.sprite │ ├── hp_bank.sprite │ ├── info.json │ ├── main.bas │ ├── main.palette │ ├── main.tiles │ ├── sticker.png │ └── title_txt.quantized ├── favicon.ico ├── pages ├── about.md ├── gallery.md ├── imgs │ ├── app.png │ ├── banner_platforms.png │ ├── boing_ball.gif │ ├── cosmos_saga.gif │ ├── creating_images.png │ ├── creating_maps.png │ ├── creating_sprites.png │ ├── infinity_fighter.gif │ ├── integrated.png │ ├── mailto.png │ ├── more_disks1.png │ ├── more_disks2.png │ ├── on_steam.png │ ├── playable_now.png │ ├── steam.png │ ├── tools.png │ └── writing_programs.png └── why.md └── vars └── urls.txt /.gitattributes: -------------------------------------------------------------------------------- 1 | builds/*.html linguist-vendored 2 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ## BASIC8 6 | 7 | [Manual](https://paladin-t.github.io/b8/docs/manual) | 8 | [Changelog](https://paladin-t.github.io/b8/docs/changelog) | 9 | [Wiki](https://github.com/paladin-t/b8/wiki) | 10 | [Gallery](https://paladin-t.github.io/b8/pages/gallery) | 11 | [Why BASIC8?](https://paladin-t.github.io/b8/pages/why) | 12 | [About](https://paladin-t.github.io/b8/pages/about) 13 | 14 | **Get BASIC8!** 15 | 16 | [![BASIC8 on Steam](pages/imgs/steam.png)](https://store.steampowered.com/app/767240/) 17 | 18 | | FANTASY | COMPUTER | 19 | |----|----| 20 | | | BASIC8 is an integrated **Fantasy Computer** for game and other program development. You can create, share and play disks in a modern BASIC dialect, with built-in tools for editing sprite, tiles, map, quantized, etc. | 21 | 22 | It's been a while since we used to enjoy coding and playing straightforward after a computer bootup. The goal of BASIC8 is bringing a sense of joy back from retro/vintage computing and gaming, also being quick at getting higher level stuff done for modern development. 23 | 24 | ### Technical specifications 25 | 26 | * Display: 160x128 pixels 27 | * Audio: 2 music channels, 1 MIDI channel, 4 sound effect channels, 1 speech channel 28 | * Code: BASIC (structured/prototype-based/functional) 29 | * Graphics: up to 65535 drawing commands per cycle 30 | * Palette: 16 colors with transparency support 31 | * Sprite: up to 32x32 pixels per frame, up to 512 frames per sprite 32 | * Tiles: 240 cels 33 | * Map: up to 128x64 tiles per layer, up to 4 layers (including a layer of logic mark) per page 34 | * Gamepad: 6 buttons for each pad (D-Pad + A/B), up to 8 players 35 | * Keyboard and mouse: supported 36 | 37 | ### Creative tools 38 | 39 | ![](pages/imgs/tools.png) 40 | 41 | BASIC8 offers a range of built-in tools for editing sprite, tiles, map, quantized, etc; and extra tools as regular disks, such as the [Wave Maker](https://steamcommunity.com/sharedfiles/filedetails/?id=1352790993), [Player Maker](https://steamcommunity.com/sharedfiles/filedetails/?id=1328727512), and [HTML Maker](https://steamcommunity.com/sharedfiles/filedetails/?id=1391948686). Furthermore it's possible to [bring your own tools](https://steamcommunity.com/sharedfiles/filedetails/?id=1350153766), or [use plugins](https://github.com/paladin-t/b8.plugins). 42 | 43 | ### Shareable disks 44 | 45 | See examples, [Cosmos Saga](https://paladin-t.github.io/b8/examples/Cosmos%20Saga/), [Infinity Fighter](https://paladin-t.github.io/b8/examples/Infinity%20Fighter/), and [Boing Ball](https://paladin-t.github.io/b8/examples/Boing%20Ball/), for the first image. 46 | 47 | ![](pages/imgs/cosmos_saga.gif) ![](pages/imgs/infinity_fighter.gif) ![](pages/imgs/boing_ball.gif) 48 | 49 | BASIC8 disks can be handily shared via the [Workshop](https://steamcommunity.com/app/767240/workshop/) with built-in [tools](https://paladin-t.github.io/b8/docs/workshop); saved as "`*.b8`", "`*.png`" file, or text based through other sharing ways. 50 | 51 | [![Workshop](docs/imgs/workshop.png)](https://steamcommunity.com/app/767240/workshop/) 52 | 53 | ### Redistributing 54 | 55 | ![](pages/imgs/banner_platforms.png) 56 | 57 | BASIC8 is productive. Make redistributable standalone player [as executable binary](https://steamcommunity.com/sharedfiles/filedetails/?id=1328785409) with the [Player Maker](https://steamcommunity.com/sharedfiles/filedetails/?id=1328727512) for Windows, Mac OS X and Linux, and [as web based](https://steamcommunity.com/sharedfiles/filedetails/?id=1391950196) with the [HTML Maker](https://steamcommunity.com/sharedfiles/filedetails/?id=1391948686) for browsers. 58 | 59 | ### Get BASIC8 60 | 61 | [![BASIC8 on Steam](pages/imgs/on_steam.png)](https://store.steampowered.com/app/767240/) 62 | 63 | ### System requirements 64 | 65 | | | Minimum | Recommended | 66 | |----|----|----| 67 | | OS | Windows 7 or later (32/64bit)
MacOS X 10.7 or later (64bit)
Ubuntu (32/64bit) | CosmOS 1.0 | 68 | | CPU | Atom 1.44GHz
Core 2 Duo 1.83GHz | Quantum | 69 | | RAM | 512MB | 38911GB | 70 | | GPU | Intel HD | Dark matter | 71 | | Storage | 50MB available space | 50MB available space | 72 | 73 |
74 | 75 | | Links | | 76 | |----|----| 77 | | Discuss | [Forums](https://steamcommunity.com/app/767240/discussions/) | 78 | | Chat | [#basic8 on Discord](https://discord.gg/jcT9CXDgHB) | 79 | | Twitter | [@wangrenxin](https://twitter.com/wangrenxin) | 80 | | Roadmap | [Tracking boards](https://github.com/paladin-t/b8/projects) | 81 | -------------------------------------------------------------------------------- /_config.yml: -------------------------------------------------------------------------------- 1 | theme: jekyll-theme-hacker 2 | -------------------------------------------------------------------------------- /builds/README.md: -------------------------------------------------------------------------------- 1 | ## BASIC8 Disk Player 2 | 3 | This directory contains prebuilt disk player based on [`asm.js`](https://en.wikipedia.org/wiki/Asm.js). 4 | 5 | ### How to use 6 | 7 | You can reference to the `https://paladin-t.github.io/b8/builds/b8p.js` for your program distributions. 8 | -------------------------------------------------------------------------------- /builds/b8p.data: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/builds/b8p.data -------------------------------------------------------------------------------- /builds/play.html: -------------------------------------------------------------------------------- 1 | 2 | 8 | 9 | 10 | 11 | 12 | BASIC8 Player 13 | 68 | 69 | 70 |
71 |
72 | 73 |
74 |
75 | 78 | 80 |

Powered by BASIC8, disk player build (32)

81 |
82 | 168 | 169 | 170 | 171 | -------------------------------------------------------------------------------- /docs/changelog.md: -------------------------------------------------------------------------------- 1 | 2 | 3 | ### v1.5.5 4 | 5 | Community: 6 | 7 | * Fixed a Workshop submission issue after stuck 8 | 9 | Editor: 10 | 11 | * Added font customization by config for full app 12 | * Added navigation by keypad support 13 | * Changed the in-app document reader to support key navigation and sidebar index 14 | 15 | Player: 16 | 17 | * Added icon, splash, frame customization 18 | 19 | ### v1.5.4 20 | 21 | Driver: 22 | 23 | * Added MIDI support 24 | * Fixed an unexpected error when set SoundFont more than once 25 | 26 | Libraries: 27 | 28 | * Added intersection detection functions 29 | 30 | Editor: 31 | 32 | * Fixed a table splitting issue in the document viewer 33 | * Fixed a mouse cursor rendering issue of the code editor 34 | * Fixed a selection issue after typing in the code editor 35 | 36 | ### v1.5.3 37 | 38 | Libraries: 39 | 40 | * Added a `RAYCASTER` algorithm 41 | * Fixed a crash bug of UDP sending 42 | * Fixed an input value validation issue of the `WALKER` module 43 | 44 | Editor: 45 | 46 | * Fixed a menu loading issue 47 | 48 | Player: 49 | 50 | * Added SoundFont support for HTML5 build 51 | 52 | ### v1.5.2 53 | 54 | Driver: 55 | 56 | * Fixed an indexing bug with multiple joysticks 57 | 58 | Libraries: 59 | 60 | * Added a `WALKER` algorithm 61 | * Added an error code for the `MGET` function instead of raising an error 62 | * Added a new stable random generator 63 | * Fixed a type checking bug with JSON serialization 64 | 65 | Editor: 66 | 67 | * Added font customization by config for code editor 68 | 69 | ### v1.5.1 70 | 71 | Libraries: 72 | 73 | * Added custom headers for the `WEB_REQUEST` function 74 | * Added a return value for expected duration of a `SAY` calling 75 | 76 | Editor: 77 | 78 | * Fixed an inoperable issue after clicking a URL 79 | 80 | ### v1.5 Feb. 2020 81 | 82 | Libraries: 83 | 84 | * Added a `SAY` function to synthesize speech 85 | 86 | Editor: 87 | 88 | * Added a `PICK_DIRECTORY_DIALOG` function to scriptable plugin 89 | * Added `GET_ASSETS`, `OPEN_ASSETS` functions to scriptable plugin 90 | * Fixed a crash bug if frame count was greater than the limitation with scriptable plugin 91 | * Fixed a selection bug when frame count was greater than 256 92 | * Fixed an asset invalidation issue with cross frame operations with scriptable plugin 93 | * Fixed an acquiring issue when copying an entire asset 94 | 95 | ### v1.4.9 96 | 97 | Language: 98 | 99 | * Fixed a crash bug with number parsing 100 | * Fixed a crash bug with invalid expression 101 | * Fixed a crash bug with invalid routine invoking 102 | * Fixed a memory leak when reassigning an array element with string 103 | 104 | Libraries: 105 | 106 | * Added a `PLOT` function to put individual pixels 107 | * Added an `ARC` function to draw arc or pie shapes 108 | * Added an `ARCFILL` function to fill arc or pie shapes 109 | 110 | Editor: 111 | 112 | * Added immediate saving on new sprite, map assets created 113 | * Changed plot mode of the pencil tool to linked 114 | 115 | ### v1.4.8 116 | 117 | Language: 118 | 119 | * Fixed a crash bug when using an iterator in a conditional expression 120 | * Fixed a crash bug when `MOD` by zero 121 | * Fixed a memory leak with wrong iterator usage 122 | * Fixed a wrong scope processing bug when resetting the interpreter 123 | 124 | Libraries: 125 | 126 | * Added file and directory selection dialogs to the GUI library 127 | * Fixed a crash bug with invalid database value 128 | * Fixed a crash bug with closed archive 129 | * Fixed a memory leak with non-closed archive 130 | * Fixed an option accessing issue with the network library 131 | 132 | Editor: 133 | 134 | * Fixed a crash bug with pen size greater than 1px 135 | 136 | ### v1.4.7 137 | 138 | Language: 139 | 140 | * Fixed a multiple disposing bug with lambda 141 | * Fixed a crash bug with incomplete structures 142 | * Fixed a crash bug with unused coroutine 143 | 144 | Libraries: 145 | 146 | * Added a `FONT` function to customize font face with quantized image for the `TEXT` function 147 | * Added a `POLL` function to poll network events manually 148 | * Fixed a return value overwriting bug with network callback 149 | * Fixed a real number formatting bug with different locales 150 | * Fixed a potential crash bug with network callback 151 | * Fixed a random seeding issue 152 | 153 | Editor: 154 | 155 | * Added an assets navigation tab, by pressing Ctrl+Tab 156 | * Added shortcut GUI elements to create new disks 157 | * Fixed a number clamp issue with the ranged slider controls 158 | * Fixed a wrong context menu appearance bug by right mouse click 159 | 160 | Player: 161 | 162 | * Added an option to disable pause on focus lost 163 | 164 | ### v1.4.6 165 | 166 | Driver: 167 | 168 | * Fixed a sharp/flat accidental issue with music playing 169 | 170 | Libraries: 171 | 172 | * Fixed a loop bug with the `PLAY` function 173 | * Fixed a deadlock issue with the `PLAY` function 174 | 175 | Editor: 176 | 177 | * Added an option to disable invoking the `GET_CLIPBOARD_TEXT` function 178 | * Added an option to disable invoking the `SYS` function 179 | * Fixed a real number input bug with different locales 180 | 181 | Player: 182 | 183 | * Added an option to disable invoking the `GET_CLIPBOARD_TEXT` function 184 | * Added an option to disable invoking the `SYS` function 185 | 186 | ### v1.4.5 187 | 188 | Driver: 189 | 190 | * Fixed a crash bug with the `LOAD_BLANK` function 191 | * Fixed an audio sampling issue 192 | 193 | Libraries: 194 | 195 | * Added rotation center specifier to the `SPR`, `SSPR`, `MAP`, `IMG`, `SIMG` functions 196 | * Fixed a crash bug with invalid file accessor 197 | * Fixed potential memory leaks when passing unexpected referenced values to some functions 198 | 199 | Editor: 200 | 201 | * Fixed a crash of wrong error raised with scriptable plugin 202 | * Fixed a target selection bug with scriptable plugin 203 | 204 | Player: 205 | 206 | * Added HTML player for web browsers, as experimental 207 | 208 | ### v1.4.4 209 | 210 | Language: 211 | 212 | * Added call stack checking to prevent stack overflow 213 | 214 | Libraries: 215 | 216 | * Fixed a directory path splitting bug 217 | * Fixed an unzipping bug with sub directories 218 | 219 | Editor: 220 | 221 | * Fixed a crash bug with invalid font setting 222 | 223 | Player: 224 | 225 | * Fixed a crash bug if error occurs at parsing time 226 | 227 | ### v1.4.3 228 | 229 | Language: 230 | 231 | * Fixed a crash bug in invalid conditional expression with class member 232 | * Fixed a wrong error with the `VAL` statement 233 | 234 | Libraries: 235 | 236 | * Added a `TRITEX` function to draw textured triangles 237 | * Fixed a pointing issue on touch screen with the `TOUCH` function 238 | * Fixed a matching issue with regex 239 | 240 | Editor: 241 | 242 | * Added an onscreen gamepad 243 | * Fixed a pointing issue on touch screen 244 | * Fixed a quitting bug when paused a running disk 245 | 246 | ### v1.4.2 247 | 248 | Editor: 249 | 250 | * Changed cursor drawing to always use system's way 251 | * Fixed a crash bug with plugin missing 252 | 253 | Player: 254 | 255 | * Fixed a termination issue with the `END` statement 256 | * Fixed a termination issue with errors 257 | 258 | ### v1.4.1 259 | 260 | Libraries: 261 | 262 | * Added a rotate parameter to the `MAP` function 263 | * Added JPG support to the image library 264 | 265 | Editor: 266 | 267 | * Added a scriptable plugin mechanism to paintable editors 268 | * Added JPG support to the quantized editor 269 | * Fixed a range selection bug with paintable assets 270 | * Fixed an Enter key handling issue on numeric pad in the code editor 271 | 272 | ### v1.4 Apr. 2018 273 | 274 | Driver: 275 | 276 | * Added a switch of automatic frame buffer clearing 277 | * Fixed a state checking bug with right mouse click 278 | * Fixed an accuracy issue with the `TOUCH` function 279 | 280 | Libraries: 281 | 282 | * Added a `CLS` function to clear frame buffer manually 283 | * Added a `SET_CLEARER` function to set the switch of automatic frame buffer clearing 284 | * Fixed a termination issue with music 285 | 286 | ### v1.3.4 287 | 288 | Language: 289 | 290 | * Fixed a boolean evaluating bug with library object 291 | 292 | Libraries: 293 | 294 | * Added an ID type to sound effect 295 | * Added a `WAVE` type to prefab sound effect 296 | * Added functionality to play prefab sound effect with wave object to the `SFX` function 297 | * Added a `STOP` function to stop any audio 298 | 299 | Editor: 300 | 301 | * Added an option to surf Steam pages using internal browser 302 | * Added a welcome page 303 | * Added a frame cache to the sprite editor 304 | * Fixed a tag setting bug with undo operation in the sprite editor 305 | * Fixed a preview issue with inactive map layers 306 | * Fixed an unsaved state issue with new created assets 307 | 308 | ### v1.3.3 309 | 310 | Driver: 311 | 312 | * Added an initialization procedure of the `TICKS` base to the boot program 313 | 314 | Libraries: 315 | 316 | * Added error prompt to the `PERSIST` function 317 | * Added return value to the `OPEN`, and `CLOSE` functions of the archive library 318 | * Added return value to the `OPEN`, and `CLOSE` functions of the database library 319 | * Added return value to the `OPEN`, and `CLOSE` functions of the file library 320 | * Added return value to the `OPEN`, and `CLOSE` functions of the network library 321 | 322 | ### v1.3.2 323 | 324 | Editor: 325 | 326 | * Added an outline view to the code editor 327 | * Fixed a text finding issue with whitespace 328 | 329 | ### v1.3.1 330 | 331 | Libraries: 332 | 333 | * Fixed a blank content issue with the `INPUT` statement 334 | 335 | Editor: 336 | 337 | * Added a disk filter 338 | * Added a sprite to GIF exporter 339 | * Fixed a GIF exporting issue with few color count at the beginning frame 340 | * Fixed an icon arranging issue 341 | 342 | ### v1.3 Mar. 2018 343 | 344 | Libraries: 345 | 346 | * Added a network library 347 | * Fixed popping issues with the bytes library 348 | 349 | Editor: 350 | 351 | * Fixed a key retrieving bug with input config 352 | * Fixed a program locating issue with long path 353 | 354 | Player: 355 | 356 | * Added native player for desktop systems, as experimental 357 | 358 | ### v1.2.3 359 | 360 | Added Linux version. 361 | 362 | Language: 363 | 364 | * Fixed a GC bug with the ranged `FOR` statement 365 | * Fixed a string assignment issue with class member 366 | * Fixed a termination issue with the `END` statement 367 | 368 | Driver: 369 | 370 | * Added fixed function pipeline 371 | 372 | Libraries: 373 | 374 | * Added a `COPY_TO` function to the file information library 375 | * Fixed a path resolving bug of file and directory with UTF-8 character 376 | * Fixed a crash bug with path concatenating 377 | * Fixed a packing issue for existing package with the archive library 378 | 379 | Editor: 380 | 381 | * Added automatic arranging feature to editor windows 382 | * Added a modification indicator to the code editor 383 | * Changed large quantized image to readonly, with configurable threshold 384 | * Fixed a crash bug with undo operation in the code editor 385 | * Fixed an execution issue with large entry code 386 | 387 | ### v1.2.2 388 | 389 | Added MacOS version. 390 | 391 | Editor: 392 | 393 | * Changed the scale item into the expendable bar 394 | * Fixed an error marking bug when importing another source code 395 | * Fixed some text finding issues in the code editor 396 | * Fixed a rendering issue with blank source code 397 | 398 | ### v1.2.1 399 | 400 | Driver: 401 | 402 | * Fixed a frame buffer filling issue 403 | 404 | Libraries: 405 | 406 | * Added a `RESIZE` function to the image library 407 | * Fixed an accessing bug with the `PGET` function 408 | 409 | Editor: 410 | 411 | * Fixed a string literal issue with uppercase 412 | * Fixed some coloring issues with syntax highlighting 413 | 414 | ### v1.2 Feb. 2018 415 | 416 | Libraries: 417 | 418 | * Fixed a vector calculation bug 419 | 420 | Editor: 421 | 422 | * Added syntax highlighting feature to the code editor 423 | * Added navigation methods in the code editor 424 | * Added default license to prebuilt source code 425 | * Fixed a crash bug when switching to layer 0 of a map, with invalid tool selected 426 | 427 | ### v1.1.2 428 | 429 | Language: 430 | 431 | * Fixed a crash bug with invalid collection index 432 | * Fixed a memory leak with invalid invoking 433 | 434 | Libraries: 435 | 436 | * Added a loading option to the `LOAD_BLANK` for quantized image 437 | * Added `TRI`, `TRIFILL` functions to draw triangles 438 | * Added `QUAD`, `QUADFILL` functions to draw quadrangles 439 | * Added `IGET`, `ISET` functions to access quantized image 440 | * Added a new constructor to `VEC2` 441 | * Fixed a palette color setting issue 442 | * Fixed a color interpolation bug 443 | 444 | Editor: 445 | 446 | * Added an editor for quantized image 447 | 448 | ### v1.1.1 449 | 450 | Libraries: 451 | 452 | * Changed IO functions to return uniformed separator 453 | * Fixed an out of bound bug with the pathfinding algorithm 454 | * Fixed a wrong loading bug of map assets if tiles missing 455 | 456 | Editor: 457 | 458 | * Changed disk overwriting to put files and directories into recycle bin 459 | 460 | ### v1.1 Jan. 2018 461 | 462 | Community: 463 | 464 | * Added tools for Steam Workshop 465 | 466 | Language: 467 | 468 | * Fixed a parsing bug with the unary negative operator 469 | * Fixed a real number parsing bug with different locales 470 | 471 | Libraries: 472 | 473 | * Added non-referenced vector and matrix data types, with operators and functions 474 | * Added a pathfinding algorithm 475 | 476 | Editor: 477 | 478 | * Added indicator of unsaved file 479 | * Added a dedicated file type for customized data 480 | * Fixed a running issue under offline mode with Steam 481 | 482 | ### v1.0 Jan. 2018 483 | 484 | Added Windows version. First release with features including: 485 | 486 | * Added a BASIC programming language 487 | * Added programming interfaces 488 | * Added GUI based shell 489 | * Added graphics primitives 490 | * Added input functions 491 | * Added audio functions 492 | -------------------------------------------------------------------------------- /docs/imgs/coordinate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/docs/imgs/coordinate.png -------------------------------------------------------------------------------- /docs/imgs/head.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/docs/imgs/head.png -------------------------------------------------------------------------------- /docs/imgs/logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/docs/imgs/logo.png -------------------------------------------------------------------------------- /docs/imgs/welcome.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/docs/imgs/welcome.png -------------------------------------------------------------------------------- /docs/imgs/workshop.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/docs/imgs/workshop.png -------------------------------------------------------------------------------- /docs/imgs/workshop_mount.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/docs/imgs/workshop_mount.png -------------------------------------------------------------------------------- /docs/imgs/workshop_push.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/docs/imgs/workshop_push.png -------------------------------------------------------------------------------- /docs/imgs/workshop_remove.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/docs/imgs/workshop_remove.png -------------------------------------------------------------------------------- /docs/imgs/workshop_submit.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/docs/imgs/workshop_submit.png -------------------------------------------------------------------------------- /docs/imgs/workshop_subscribe.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/docs/imgs/workshop_subscribe.png -------------------------------------------------------------------------------- /docs/welcome.md: -------------------------------------------------------------------------------- 1 | ![](imgs/welcome.png) 2 | 3 | Press F1 to read the [manual](manual), or click to read about the [Workshop](workshop). 4 | 5 | Double click on a disk to run it directly (this behaviour could be changed by setting); right click on a disk then `Open` it for editing, it will show the entry source code of the disk, click corresponding items under the `Disk` menu on the main menu bar to create, open assets in the editing disk. 6 | 7 | Consider exploring the fantastic world of BASIC8 from [important](https://steamcommunity.com/app/767240/discussions/4/2906376154311390056/) notice, and [learning](https://steamcommunity.com/app/767240/discussions/4/1696040635922300967/) materials. 8 | 9 | There are also some extra tools available as regular disks on Workshop: 10 | 11 | * [Player Maker](https://steamcommunity.com/sharedfiles/filedetails/?id=1328727512) 12 | * [HTML Maker](https://steamcommunity.com/sharedfiles/filedetails/?id=1391948686) 13 | * [Wave Maker](https://steamcommunity.com/sharedfiles/filedetails/?id=1352790993) 14 | 15 | It's also possible to [bring your own tools](https://steamcommunity.com/sharedfiles/filedetails/?id=1350153766) with built-in libraries; and use [plugins](https://github.com/paladin-t/b8.plugins) to extend the editors. 16 | -------------------------------------------------------------------------------- /docs/workshop.md: -------------------------------------------------------------------------------- 1 | ![](imgs/workshop.png) 2 | 3 | ## Sharing via Workshop 4 | 5 | You can share your creative disks with the Steam community via Workshop, subscribe to play others' games and programs, and discuss or comment on any creation. 6 | 7 | Don't forget to close any external editors that opening the source disk you are going to push, pull, etc. 8 | 9 | ### Submitting 10 | 11 | To submit a new disk to Workshop, select it, then click `Community`, `Workshop`, `Push`. It will prompt you to fill in some information as following: 12 | 13 | ![](imgs/workshop_submit.png) 14 | 15 | It's recommended to use a good looking preview, choose a proper genre, and write necessary introduction and notes to help others to get better acquainted with your submission. Then click the `Push` button to submit it, with agreeing to the terms of service. You could edit submitted information in browser later, including changing description, chaging visibility, updating preview images and videos, etc. 16 | 17 | ### Subscribing 18 | 19 | Use a web browser to explore the [BASIC8 Workshop](https://steamcommunity.com/app/767240/workshop/) on Steam to make subscriptions: 20 | 21 | ![](imgs/workshop_subscribe.png) 22 | 23 | All subscribed disks will be automatically downloaded for mounting. Notice that you still have to subscribe to your own disk to keep it up to date, if you were collaborating with other people on a same project. 24 | 25 | ### Unsubscribing 26 | 27 | Click `Unsubscribe` on an already subscribed disk in browser to stop following it. 28 | 29 | Unsubscribe mounted disk when removing it with `Unsubscribe` option checked, otherwise it will be removed from local storage only: 30 | 31 | ![](imgs/workshop_remove.png) 32 | 33 | ### Pushing 34 | 35 | When you want to push modifications of a submitted disk, select the disk, then click `Community`, `Workshop`, `Push`. It will prompt you with a dialog (similar to submission): 36 | 37 | ![](imgs/workshop_push.png) 38 | 39 | It will download and re-mount the disk after success of either submitting and pushing, so **make backup as possible before pushing**, especially when you were collaborating with others. 40 | 41 | ### Pulling 42 | 43 | All subscribed disks are supposed to be updated automatically when BASIC8 boots up, but in case you'd like to check updates manually, just select it, click `Community`, `Workshop`, `Pull`. This will always prompt with a mounting dialog: 44 | 45 | ![](imgs/workshop_mount.png) 46 | 47 | Choose a proper mounting strategy for pulled disk, check `Don't ask me` to make it quiet and keeps the current strategy for future updates. You could change the strategy later in the properties dialog of a disk. 48 | 49 | To pull all disks manually, click `Community`, `Workshop`, `Pull all`; or click `Force to pull all` with `Shift` key pressed to force it showing mounting options for all disks. It's required to have your Steam client to "online" mode to get subscriptions. 50 | 51 | ### Dismounting 52 | 53 | To make a disk into a local one by dismounting it, open the properties dialog of it, then click `Dismount`. 54 | 55 | [HOME](#sharing-via-workshop) 56 | -------------------------------------------------------------------------------- /examples/Boing Ball/README.md: -------------------------------------------------------------------------------- 1 | ## Boing Ball 2 | 3 | ### Preview 4 | 5 | ![](../../pages/imgs/boing_ball.gif) 6 | 7 | ### Content 8 | 9 | [GitHub](https://github.com/paladin-t/b8/tree/master/examples/Boing%20Ball/content) 10 | 11 | ### Code at a glance 12 | 13 | ~~~~~~~~~~bas 14 | REM Boing Ball - Entry program 15 | REM Recreated of the classic Amiga demo. 16 | REM Based on Toddl's work: 17 | REM http://lowres.inutilis.com/programs/?lccpost=YDxBl4UZxp. 18 | REM 19 | REM Press Ctrl+R to run. 20 | 21 | REM Initializes the driver. 22 | 23 | drv = driver() 24 | print drv, ", detail type is: ", typeof(drv); 25 | 26 | REM Constants. 27 | 28 | ' Colors. 29 | RED = rgba(255, 0, 0) 30 | WHITE = rgba(255, 255, 255) 31 | ' How many radians is the ball tilted. 32 | ROTATE_ANGLE = 0.5 33 | 34 | REM Resources. 35 | 36 | the_ball = load_blank("sprite", 61, 61) 37 | 38 | REM Variables. 39 | 40 | white_start = 1 41 | ball_x = 5 42 | parabel_x = 0 43 | ball_dir = 1 44 | parabel_dir = 9.25 45 | 46 | REM Functions. 47 | 48 | ' Shows the background. 49 | def background() 50 | col rgba(225, 150, 225) 51 | for y = 0 to 111 step 16 52 | for x = 23 to 134 step 16 53 | rect x, y, x + 17, y + 17 54 | next 55 | next 56 | for x = 23 to 135 step 16 57 | line x, 112, (x - 80) / 96 * 160 + 81, 127 58 | next 59 | line 15, 116, 144, 116 60 | line 3, 121, 155, 121 61 | line 0, 127, 159, 127 62 | enddef 63 | 64 | ' Cycles the palette. 65 | def cycle_palette() 66 | white_start = white_start - ball_dir 67 | if white_start > 13 then white_start = 2 68 | if white_start < 2 then white_start = 13 69 | for ci = 0 to 11 70 | if ci < 6 then 71 | pv = RED 72 | else 73 | pv = WHITE 74 | endif 75 | c = (ci + (white_start - 2)) mod 12 + 2 76 | pset c, pv 77 | next 78 | enddef 79 | 80 | ' Draws one line of the ball. 81 | def plot_line(x) 82 | for y = 0 to PI step 0.008 83 | c0 = (floor((x + PI) * 15 + 0.5)) mod 12 + 2 84 | c1 = ((c0 - 2) + 6) mod 12 + 2 85 | v = 0 86 | if y * 2.5 mod 2 = 0 then 87 | v = c0 88 | else 89 | v = c1 90 | endif 91 | xx = sin(y) * cos(x) * 30 92 | yy = cos(y) * 30 93 | s = sin(ROTATE_ANGLE) 94 | c = cos(ROTATE_ANGLE) 95 | posx = xx * c - yy * s 96 | posy = xx * s + yy * c 97 | sset the_ball, 1, floor(posx + 30.5), floor(posy + 30.5), v 98 | next 99 | enddef 100 | 101 | ' The main loop. 102 | def update(delta) 103 | ' Shows the background. 104 | background() 105 | ' Processes bouncing. 106 | parabel_x = parabel_x + parabel_dir * delta 107 | ball_y = parabel_x * parabel_x * 1.5 108 | if ball_y >= 45 then 109 | ball_y = 45 110 | parabel_x = sqr(ball_y / 1.5) 111 | parabel_dir = -parabel_dir 112 | endif 113 | ' Moves the ball left and right. 114 | if ball_x <= 0 then 115 | ball_x = 0 116 | ball_dir = -ball_dir 117 | sfx 5,110,0.08 118 | elseif ball_x >= 99 then 119 | ball_x = 99 120 | ball_dir = -ball_dir 121 | sfx 5,110,0.08 122 | endif 123 | ball_x = ball_x + ball_dir * delta * 25 124 | ' Shows shadow of the ball. 125 | clip 23, 0, 113, 128 126 | circfill ball_x + 40, ball_y + 37, 30, rgba(20, 20, 20, 110) 127 | clip 128 | ' Cycles palette and shows the ball. 129 | cycle_palette() 130 | spr the_ball, ball_x, ball_y + 18 131 | if ball_y >= 45 then 132 | sfx 5,80,0.1 133 | endif 134 | enddef 135 | 136 | ' Prefabs the chequered ball. 137 | for i = 0 to 1 138 | text 80, 120, "LOADING..." 139 | sync 140 | next 141 | for x = 0 to PI / 2 + 0.025 step 0.025 142 | plot_line(x) 143 | next 144 | for x = PI to PI / 2 + 0.025 step -0.025 145 | plot_line(x) 146 | next 147 | 148 | ' Enters the main loop. 149 | update_with(drv, call(update)) 150 | ~~~~~~~~~~ 151 | -------------------------------------------------------------------------------- /examples/Boing Ball/content/info.json: -------------------------------------------------------------------------------- 1 | {"lang":1,"usage":1,"ugcid":0,"uid":"31c579df-8f94-4b2d-8a9f-366207b29f4e","sticker":"sticker.png","title":"Boing Ball","description":"","author":"Tony","version":"1.1","genre":"Demo","email":"","url":"https://paladin-t.github.io/b8/examples/Boing%20Ball/","creation":1511589086,"controls":[],"entries":{"main":"main.bas","editor":""}} -------------------------------------------------------------------------------- /examples/Boing Ball/content/main.bas: -------------------------------------------------------------------------------- 1 | REM Boing Ball - Entry program 2 | REM Recreated of the classic Amiga demo. 3 | REM Based on Toddl's work: 4 | REM http://lowres.inutilis.com/programs/?lccpost=YDxBl4UZxp. 5 | REM 6 | REM Press Ctrl+R to run. 7 | 8 | REM Initializes the driver. 9 | 10 | drv = driver() 11 | print drv, ", detail type is: ", typeof(drv); 12 | 13 | REM Constants. 14 | 15 | ' Colors. 16 | RED = rgba(255, 0, 0) 17 | WHITE = rgba(255, 255, 255) 18 | ' How many radians is the ball tilted. 19 | ROTATE_ANGLE = 0.5 20 | 21 | REM Resources. 22 | 23 | the_ball = load_blank("sprite", 61, 61) 24 | 25 | REM Variables. 26 | 27 | white_start = 1 28 | ball_x = 5 29 | parabel_x = 0 30 | ball_dir = 1 31 | parabel_dir = 9.25 32 | 33 | REM Functions. 34 | 35 | ' Shows the background. 36 | def background() 37 | col rgba(225, 150, 225) 38 | for y = 0 to 111 step 16 39 | for x = 23 to 134 step 16 40 | rect x, y, x + 17, y + 17 41 | next 42 | next 43 | for x = 23 to 135 step 16 44 | line x, 112, (x - 80) / 96 * 160 + 81, 127 45 | next 46 | line 15, 116, 144, 116 47 | line 3, 121, 155, 121 48 | line 0, 127, 159, 127 49 | enddef 50 | 51 | ' Cycles the palette. 52 | def cycle_palette() 53 | white_start = white_start - ball_dir 54 | if white_start > 13 then white_start = 2 55 | if white_start < 2 then white_start = 13 56 | for ci = 0 to 11 57 | if ci < 6 then 58 | pv = RED 59 | else 60 | pv = WHITE 61 | endif 62 | c = (ci + (white_start - 2)) mod 12 + 2 63 | pset c, pv 64 | next 65 | enddef 66 | 67 | ' Draws one line of the ball. 68 | def plot_line(x) 69 | for y = 0 to PI step 0.008 70 | c0 = (floor((x + PI) * 15 + 0.5)) mod 12 + 2 71 | c1 = ((c0 - 2) + 6) mod 12 + 2 72 | v = 0 73 | if y * 2.5 mod 2 = 0 then 74 | v = c0 75 | else 76 | v = c1 77 | endif 78 | xx = sin(y) * cos(x) * 30 79 | yy = cos(y) * 30 80 | s = sin(ROTATE_ANGLE) 81 | c = cos(ROTATE_ANGLE) 82 | posx = xx * c - yy * s 83 | posy = xx * s + yy * c 84 | sset the_ball, 1, floor(posx + 30.5), floor(posy + 30.5), v 85 | next 86 | enddef 87 | 88 | ' The main loop. 89 | def update(delta) 90 | ' Shows the background. 91 | background() 92 | ' Processes bouncing. 93 | parabel_x = parabel_x + parabel_dir * delta 94 | ball_y = parabel_x * parabel_x * 1.5 95 | if ball_y >= 45 then 96 | ball_y = 45 97 | parabel_x = sqr(ball_y / 1.5) 98 | parabel_dir = -parabel_dir 99 | endif 100 | ' Moves the ball left and right. 101 | if ball_x <= 0 then 102 | ball_x = 0 103 | ball_dir = -ball_dir 104 | sfx 5,110,0.08 105 | elseif ball_x >= 99 then 106 | ball_x = 99 107 | ball_dir = -ball_dir 108 | sfx 5,110,0.08 109 | endif 110 | ball_x = ball_x + ball_dir * delta * 25 111 | ' Shows shadow of the ball. 112 | clip 23, 0, 113, 128 113 | circfill ball_x + 40, ball_y + 37, 30, rgba(20, 20, 20, 110) 114 | clip 115 | ' Cycles palette and shows the ball. 116 | cycle_palette() 117 | spr the_ball, ball_x, ball_y + 18 118 | if ball_y >= 45 then 119 | sfx 5,80,0.1 120 | endif 121 | enddef 122 | 123 | ' Prefabs the chequered ball. 124 | for i = 0 to 1 125 | text 80, 120, "LOADING..." 126 | sync 127 | next 128 | for x = 0 to PI / 2 + 0.025 step 0.025 129 | plot_line(x) 130 | next 131 | for x = PI to PI / 2 + 0.025 step -0.025 132 | plot_line(x) 133 | next 134 | 135 | ' Enters the main loop. 136 | update_with(drv, call(update)) 137 | -------------------------------------------------------------------------------- /examples/Boing Ball/content/main.palette: -------------------------------------------------------------------------------- 1 | {"colors":[[0,0,0,0],[29,43,83,255],[126,37,83,255],[0,135,81,255],[171,82,54,255],[95,87,79,255],[194,195,199,255],[255,241,232,255],[255,0,77,255],[255,163,0,255],[255,236,39,255],[0,228,54,255],[41,173,255,255],[131,118,156,255],[255,119,168,255],[255,204,170,255]]} -------------------------------------------------------------------------------- /examples/Boing Ball/content/sticker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/examples/Boing Ball/content/sticker.png -------------------------------------------------------------------------------- /examples/Cosmos Saga/README.md: -------------------------------------------------------------------------------- 1 | ## Cosmos Saga 2 | 3 | ### Preview 4 | 5 | ![](../../pages/imgs/cosmos_saga.gif) 6 | 7 | ### Content 8 | 9 | [GitHub](https://github.com/paladin-t/b8/tree/master/examples/Cosmos%20Saga/content) 10 | 11 | ### Code at a glance 12 | 13 | ~~~~~~~~~~bas 14 | REM Cosmos Saga - Entry program 15 | REM Shoot'em up, survive as long as you can. 16 | REM 17 | REM Press Ctrl+R to run. 18 | REM Control: 19 | REM Up/Down: move spaceship 20 | REM A: shoot 21 | 22 | REM Initializes the driver. 23 | 24 | drv = driver() 25 | print drv, ", detail type is: ", typeof(drv); 26 | use_sound_font("soundfonts/pixels.sf2") 27 | 28 | REM Constants. 29 | 30 | ' Colors. 31 | WHITE = rgba(255, 255, 255) 32 | ' Game stages. 33 | INTRO = 0 34 | PLAYING = 1 35 | LOSE = 2 36 | OVER = 3 37 | ' Enemy types. 38 | LETTER = 1 39 | INVADER = 2 40 | ' Gameplay. 41 | OWN_BULLETS_MAX_COUNT = 3 42 | 43 | REM Classes. 44 | 45 | class point 46 | var x = 0 47 | var y = 0 48 | endclass 49 | class bullet(point) 50 | var vx = 0 51 | endclass 52 | class explosion(point) 53 | var res = nil 54 | var elapsed = 0 55 | endclass 56 | 57 | REM Resources. 58 | 59 | title_bg = load_resource("title_bg.quantized") 60 | title_txt = load_resource("title_txt.quantized") 61 | over_txt = load_resource("over_txt.quantized") 62 | galaxy_scroll = load_resource("galaxy_scroll.map") 63 | galaxy1 = galaxy_scroll(1) 64 | galaxy2 = galaxy_scroll(2) 65 | galaxy3 = galaxy_scroll(3) 66 | explosion_bank = load_resource("explosion_bank.sprite") 67 | enemy_bank = load_resource("enemy_bank.sprite") 68 | spaceship = load_resource("spaceship.sprite") 69 | spaceship.play() 70 | 71 | REM Variables. 72 | 73 | ' Bullets and explosions. 74 | own_bullets = list() 75 | enemy_bullets = list() 76 | explosion_fxs = list() 77 | ' Enemies. 78 | spawning = nil 79 | alive_enemies = dict() 80 | dead_enemies = list() 81 | ' Gameplay. 82 | stage = INTRO 83 | score = 0 84 | highscore = 0 85 | persist highscore 86 | gx1 = 0 87 | gx2 = 0 88 | gx3 = 0 89 | sx = 8 90 | sy = 48 91 | t = 0 92 | 93 | REM Functions. 94 | 95 | ' Spawns an enemy. 96 | def spawn(t) 97 | ' Initializes variables. 98 | x = 160 99 | y = 0 100 | dy = 0 101 | mov = nil 102 | emt = nil 103 | ' Chooses behaviours according to enemy type. 104 | if t = LETTER then 105 | y = 48 106 | mov = lambda (delta) 107 | ( 108 | x = x - delta * 24 109 | dy = sin(x / 4) * 20 110 | ) 111 | elseif t = INVADER then 112 | y = rnd(0, 96) 113 | vx = 28 114 | vy = 0 115 | if rnd > 0.25 then 116 | vy = (sy - y) / (160 - sx) * vx 117 | endif 118 | mov = lambda (delta) 119 | ( 120 | x = x - delta * vx 121 | dy = dy + vy * delta 122 | ) 123 | emt = lambda (ty) 124 | ( 125 | if rnd < 0.6 then 126 | b = new(bullet) 127 | b.x = x - 7 128 | b.y = ty + 8 129 | b.vx = -60 130 | push(enemy_bullets, b) 131 | sfx 4096+1,860,0.2, 1,380,0.01 132 | emt = nil 133 | endif 134 | ) 135 | endif 136 | ' Returns an enemy closure. 137 | return lambda (e, delta) 138 | ( 139 | mov(delta) 140 | ty = y + dy 141 | if x < 143 and emt then emt(ty) 142 | if x < -16 then 143 | push(dead_enemies, e) 144 | else 145 | for b in own_bullets 146 | if abs(ty + 8 - b.y) < 12 and x >= b.x and x <= b.x + 10 then ' The bullet has hit an enemy. 147 | b.x = 999 ' Moves it far away. 148 | if not exists(dead_enemies, e) then 149 | push(dead_enemies, e) 150 | score = score + 1 151 | if score > highscore then highscore = score 152 | endif 153 | ex = new(explosion) 154 | ex.x = x 155 | ex.y = ty 156 | ex.res = clone(explosion_bank) 157 | ex.res.play(-1, -1, false) 158 | push(explosion_fxs, ex) 159 | sfx 4096+5,260,0.8, 5,80,0.1 160 | endif 161 | next 162 | endif 163 | if stage < LOSE then 164 | if abs(x - sx) < 10 and abs(ty - sy) < 10 then stage = LOSE 165 | endif 166 | spr e, x, ty 167 | ) 168 | enddef 169 | 170 | ' Initializes states, starts an enemy spawner, etc. 171 | def setup() 172 | ' Initializes variables. 173 | score = 0 174 | sx = 8 175 | sy = 48 176 | ' Clears collections. 177 | clear(alive_enemies) 178 | clear(dead_enemies) 179 | ' Starts an enemy spawner. 180 | if spawning then 181 | abort(spawning) 182 | spawning = nil 183 | endif 184 | spawning = coroutine 185 | ( 186 | lambda () 187 | ( 188 | yield wait_for(1.0) 189 | ' "W". 190 | e = clone(enemy_bank) 191 | e.play("W", "WE") 192 | set(alive_enemies, e, spawn(LETTER)) 193 | yield wait_for(0.8) 194 | ' "E". 195 | e = clone(enemy_bank) 196 | e.play("E", "EE") 197 | set(alive_enemies, e, spawn(LETTER)) 198 | yield wait_for(0.8) 199 | ' "L". 200 | e = clone(enemy_bank) 201 | e.play("L", "LE") 202 | set(alive_enemies, e, spawn(LETTER)) 203 | yield wait_for(0.8) 204 | ' "C". 205 | e = clone(enemy_bank) 206 | e.play("C", "CE") 207 | set(alive_enemies, e, spawn(LETTER)) 208 | yield wait_for(0.8) 209 | ' "O". 210 | e = clone(enemy_bank) 211 | e.play("O", "OE") 212 | set(alive_enemies, e, spawn(LETTER)) 213 | yield wait_for(0.8) 214 | ' "M". 215 | e = clone(enemy_bank) 216 | e.play("M", "ME") 217 | set(alive_enemies, e, spawn(LETTER)) 218 | yield wait_for(0.8) 219 | ' "E". 220 | e = clone(enemy_bank) 221 | e.play("E", "EE") 222 | set(alive_enemies, e, spawn(LETTER)) 223 | yield wait_for(2.8) 224 | ' Invaders. 225 | while true 226 | e = clone(enemy_bank) 227 | e.play("E1", "E1E") 228 | set(alive_enemies, e, spawn(INVADER)) 229 | yield wait_for(rnd(700, 1800) / 1000) 230 | wend 231 | ) 232 | ) 233 | start(spawning) 234 | enddef 235 | 236 | ' Updates bullets. 237 | def pelter(delta) 238 | ' Updates own bullets. 239 | for b in own_bullets 240 | b.x = b.x + b.vx * delta 241 | line b.x, b.y, b.x + 10, b.y, 2, WHITE 242 | next 243 | if len(own_bullets) then 244 | b = get(own_bullets, 0) 245 | if b.x > 160 then 246 | remove(own_bullets, 0) 247 | endif 248 | endif 249 | ' Updates enemies' bullets. 250 | for b in enemy_bullets 251 | b.x = b.x + b.vx * delta 252 | line b.x, b.y, b.x + 10, b.y, 2, WHITE 253 | if stage < LOSE then 254 | if abs(sy + 8 - b.y) < 10 and sx + 16 >= b.x and sx + 16 <= b.x + 10 then stage = LOSE 255 | endif 256 | next 257 | if len(enemy_bullets) then 258 | b = get(enemy_bullets, 0) 259 | if b.x < -10 then 260 | remove(enemy_bullets, 0) 261 | endif 262 | endif 263 | enddef 264 | 265 | ' Updates all explosion effects. 266 | def boom(delta) 267 | for e in explosion_fxs 268 | e.elapsed = e.elapsed + delta 269 | spr e.res, e.x, e.y 270 | next 271 | if len(explosion_fxs) then 272 | e = get(explosion_fxs, 0) 273 | if e.elapsed > 1 then 274 | remove(explosion_fxs, 0) 275 | endif 276 | endif 277 | enddef 278 | 279 | ' Common routine of a galaxy scene. 280 | def galaxy(delta, sp) 281 | ' Updates scrolling variables. 282 | gx1 = gx1 - delta * 120 283 | if gx1 < -160 then gx1 = gx1 + 160 284 | gx2 = gx2 - delta * 150 285 | if gx2 < -160 then gx2 = gx2 + 160 286 | gx3 = gx3 - delta * 170 287 | if gx3 < -160 then gx3 = gx3 + 160 288 | ' Shows the two background layers. 289 | map galaxy1, gx1, 0 290 | map galaxy1, gx1 + 160, 0 291 | map galaxy2, gx2, 0 292 | map galaxy2, gx2 + 160, 0 293 | ' Shows the spaceship. 294 | if sp then spr spaceship, sx, sy 295 | ' Updates and shows all enemies. 296 | for i in alive_enemies 297 | ctrl = alive_enemies(i) 298 | ctrl(i, delta) 299 | next 300 | ' Shows the forground layer. 301 | map galaxy3, gx3, 0 302 | map galaxy3, gx3 + 160, 0 303 | ' Processes bullets and explosions. 304 | pelter(delta) 305 | boom(delta) 306 | ' Processes dead enemies. 307 | if len(dead_enemies) then 308 | for i in dead_enemies 309 | if exists(alive_enemies, i) then 310 | remove(alive_enemies, i) 311 | endif 312 | next 313 | clear(dead_enemies) 314 | endif 315 | ' Shows scores. 316 | text 0, 1, "SCORE:", WHITE 317 | text 47, 1, score, WHITE 318 | text 80, 1, "HI:", WHITE 319 | text 104, 1, highscore 320 | enddef 321 | 322 | ' Game over stage. 323 | def gameover(delta) 324 | ' If just lost. 325 | if stage = LOSE then 326 | t = 0 327 | stage = OVER 328 | if spawning then 329 | abort(spawning) 330 | spawning = nil 331 | endif 332 | clear(own_bullets) 333 | sfx 4,120,0.2, 4,0,0.2, 4,120,0.3, 4,140,0.3, 4,100,0.2, 4,0,0.2, 4,100,0.3 334 | ex = new(explosion) 335 | ex.x = sx 336 | ex.y = sy 337 | ex.res = clone(explosion_bank) 338 | ex.res.play(-1, -1, false) 339 | push(explosion_fxs, ex) 340 | sfx 4096+5,260,0.8, 5,80,0.1 341 | endif 342 | ' Updates the galaxy. 343 | galaxy(delta, false) 344 | ' Shows the "GAME OVER" text. 345 | img over_txt, 0, 128 * (3 - t) / 3 346 | ' Ticks. 347 | if t < 3 then 348 | t = t + delta 349 | if t > 3 then t = 3 350 | else 351 | if btnp() or keyp() then 352 | t = 0 353 | stage = INTRO 354 | endif 355 | endif 356 | enddef 357 | 358 | ' Battle stage. 359 | def battle(delta) 360 | ' Ticks. 361 | t = t + delta 362 | ' Processes input. 363 | if btn(2) then 364 | sy = sy - delta * 50 365 | if sy < 0 then sy = 0 366 | elseif btn(3) then 367 | sy = sy + delta * 50 368 | if sy >= 112 then sy = 111 369 | endif 370 | if btnp(4) then 371 | if len(own_bullets) < OWN_BULLETS_MAX_COUNT then 372 | b = new(bullet) 373 | b.x = sx + 16 374 | b.y = sy + 8 375 | b.vx = 60 376 | push(own_bullets, b) 377 | sfx 4096+2,860,0.2, 2,380,0.01 378 | endif 379 | endif 380 | ' Updates the galaxy. 381 | galaxy(delta, true) 382 | enddef 383 | 384 | ' Title stage. 385 | def title(delta) 386 | ' Plays music. 387 | if not bgm then 388 | bgm = true 389 | play "T128 F8G8A8B8 >C F D C2 F8G8A8B8 >C F D C2 <<", 0, 5, true 390 | play "T128 F A >C C ", 1, 14, true 391 | endif 392 | ' Ticks. 393 | t = t + delta 394 | if not shown then 395 | d = t * 2 396 | if d > 1 then 397 | shown = true 398 | d = 1 399 | endif 400 | by = -59 401 | ey = (128 - 59) / 2 - 20 402 | y = by + (ey - by) * d 403 | endif 404 | ' Shows visuals. 405 | img title_bg, 0, 0 406 | img title_txt, (160 - 138) / 2, y 407 | ' Shows tips and accepts input. 408 | if shown then 409 | if t * 2 mod 2 then text 16, 100, "PRESS ANY BUTTON", WHITE 410 | if btnp() or keyp() then 411 | play "P", 0, 0, false 412 | play "P", 1, 0, false 413 | bgm = false 414 | shown = false 415 | setup() 416 | stage = PLAYING 417 | endif 418 | endif 419 | enddef 420 | 421 | ' Enters the main loop. 422 | update_with 423 | ( 424 | drv, 425 | lambda (delta) 426 | ( 427 | if stage = INTRO then 428 | title(delta) 429 | elseif stage = PLAYING then 430 | battle(delta) 431 | elseif stage = LOSE or stage = OVER then 432 | gameover(delta) 433 | endif 434 | ) 435 | ) 436 | ~~~~~~~~~~ 437 | -------------------------------------------------------------------------------- /examples/Cosmos Saga/content/enemy_bank.sprite: -------------------------------------------------------------------------------- 1 | {"frames":[{"interval":0.20000000298023225,"tag":"W","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,0,0,0,0,0,4,4,0,0,0,0,0,4,4,4,4,0,0,0,0,0,4,4,0,0,0,0,0,4,4,0,4,4,0,0,0,0,4,4,0,0,0,0,4,4,0,0,4,4,0,0,0,4,4,4,4,0,0,0,4,4,0,0,4,4,0,0,0,4,4,4,4,0,0,0,4,4,0,0,4,4,0,0,0,4,4,4,4,0,0,0,4,4,0,0,0,4,4,0,4,4,0,0,4,4,0,4,4,0,0,0,0,4,4,0,4,4,0,0,4,4,0,4,4,0,0,0,0,4,4,0,4,4,0,0,4,4,0,4,4,0,0,0,0,4,4,0,4,4,0,0,4,4,0,4,4,0,0,0,0,0,4,4,4,0,0,0,0,4,4,4,0,0,0,0,0,0,4,4,4,0,0,0,0,4,4,4,0,0,0,0,0,0,4,4,4,0,0,0,0,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},{"interval":0.20000000298023225,"tag":"","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,0,0,0,0,0,0,0,0,0,0,0,0,10,10,10,10,0,0,0,0,0,10,10,0,0,0,0,0,10,10,10,10,0,0,0,0,0,10,10,0,0,0,0,0,10,10,0,10,10,0,0,0,0,10,10,0,0,0,0,10,10,0,0,10,10,0,0,0,10,10,10,10,0,0,0,10,10,0,0,10,10,0,0,0,10,10,10,10,0,0,0,10,10,0,0,10,10,0,0,0,10,10,10,10,0,0,0,10,10,0,0,0,10,10,0,10,10,0,0,10,10,0,10,10,0,0,0,0,10,10,0,10,10,0,0,10,10,0,10,10,0,0,0,0,10,10,0,10,10,0,0,10,10,0,10,10,0,0,0,0,10,10,0,10,10,0,0,10,10,0,10,10,0,0,0,0,0,10,10,10,0,0,0,0,10,10,10,0,0,0,0,0,0,10,10,10,0,0,0,0,10,10,10,0,0,0,0,0,0,10,10,10,0,0,0,0,10,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},{"interval":0.20000000298023225,"tag":"WE","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,0,0,0,0,0,0,0,0,0,0,0,0,9,9,9,9,0,0,0,0,0,9,9,0,0,0,0,0,9,9,9,9,0,0,0,0,0,9,9,0,0,0,0,0,9,9,0,9,9,0,0,0,0,9,9,0,0,0,0,9,9,0,0,9,9,0,0,0,9,9,9,9,0,0,0,9,9,0,0,9,9,0,0,0,9,9,9,9,0,0,0,9,9,0,0,9,9,0,0,0,9,9,9,9,0,0,0,9,9,0,0,0,9,9,0,9,9,0,0,9,9,0,9,9,0,0,0,0,9,9,0,9,9,0,0,9,9,0,9,9,0,0,0,0,9,9,0,9,9,0,0,9,9,0,9,9,0,0,0,0,9,9,0,9,9,0,0,9,9,0,9,9,0,0,0,0,0,9,9,9,0,0,0,0,9,9,9,0,0,0,0,0,0,9,9,9,0,0,0,0,9,9,9,0,0,0,0,0,0,9,9,9,0,0,0,0,9,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},{"interval":0.20000000298023225,"tag":"E","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,11,11,11,11,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},{"interval":0.20000000298023225,"tag":"","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,3,3,3,3,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},{"interval":0.20000000298023225,"tag":"EE","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,12,12,12,12,12,12,12,12,12,12,12,12,12,0,0,12,12,12,12,12,12,12,12,12,12,12,12,12,12,0,0,12,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,12,12,12,12,12,12,12,12,12,12,12,12,0,0,0,12,12,12,12,12,12,12,12,12,12,12,12,12,0,0,0,12,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,12,12,12,12,12,12,12,12,12,12,12,12,12,0,0,12,12,12,12,12,12,12,12,12,12,12,12,12,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},{"interval":0.20000000298023225,"tag":"L","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,0,8,8,8,8,8,8,8,8,8,8,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},{"interval":0.20000000298023225,"tag":"","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},{"interval":0.20000000298023225,"tag":"LE","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,14,14,14,14,14,14,14,14,14,14,14,14,0,0,14,14,14,14,14,14,14,14,14,14,14,14,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},{"interval":0.20000000298023225,"tag":"C","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,4,4,4,0,0,0,0,0,0,0,4,4,4,0,0,4,4,4,0,0,0,0,0,0,0,0,0,4,4,0,0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,4,4,4,0,0,0,0,0,0,0,0,0,4,4,0,0,0,4,4,4,0,0,0,0,0,0,0,4,4,4,0,0,0,0,4,4,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,4,4,4,4,4,4,4,4,4,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},{"interval":0.20000000298023225,"tag":"","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,10,10,10,10,10,10,10,0,0,0,0,0,0,10,10,10,10,10,10,10,10,10,10,10,0,0,0,0,10,10,10,0,0,0,0,0,0,0,10,10,10,0,0,10,10,10,0,0,0,0,0,0,0,0,0,10,10,0,0,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,10,10,0,0,0,0,0,0,0,0,0,10,10,0,0,0,10,10,10,0,0,0,0,0,0,0,10,10,10,0,0,0,0,10,10,10,10,10,10,10,10,10,10,10,0,0,0,0,0,0,10,10,10,10,10,10,10,10,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},{"interval":0.20000000298023225,"tag":"CE","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,9,9,9,9,9,9,9,0,0,0,0,0,0,9,9,9,9,9,9,9,9,9,9,9,0,0,0,0,9,9,9,0,0,0,0,0,0,0,9,9,9,0,0,9,9,9,0,0,0,0,0,0,0,0,0,9,9,0,0,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,9,9,0,0,0,0,0,0,0,0,0,9,9,0,0,0,9,9,9,0,0,0,0,0,0,0,9,9,9,0,0,0,0,9,9,9,9,9,9,9,9,9,9,9,0,0,0,0,0,0,9,9,9,9,9,9,9,9,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},{"interval":0.20000000298023225,"tag":"O","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,11,11,11,0,0,0,0,0,0,11,11,11,0,0,0,11,11,11,0,0,0,0,0,0,0,0,11,11,11,0,0,11,11,0,0,0,0,0,0,0,0,0,0,11,11,0,0,11,11,0,0,0,0,0,0,0,0,0,0,11,11,0,0,11,11,0,0,0,0,0,0,0,0,0,0,11,11,0,0,11,11,0,0,0,0,0,0,0,0,0,0,11,11,0,0,11,11,0,0,0,0,0,0,0,0,0,0,11,11,0,0,11,11,0,0,0,0,0,0,0,0,0,0,11,11,0,0,11,11,11,0,0,0,0,0,0,0,0,11,11,11,0,0,0,11,11,11,0,0,0,0,0,0,11,11,11,0,0,0,0,0,11,11,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,11,11,11,11,11,11,11,11,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},{"interval":0.20000000298023225,"tag":"","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,3,3,3,0,0,0,0,0,0,3,3,3,0,0,0,3,3,3,0,0,0,0,0,0,0,0,3,3,3,0,0,3,3,0,0,0,0,0,0,0,0,0,0,3,3,0,0,3,3,0,0,0,0,0,0,0,0,0,0,3,3,0,0,3,3,0,0,0,0,0,0,0,0,0,0,3,3,0,0,3,3,0,0,0,0,0,0,0,0,0,0,3,3,0,0,3,3,0,0,0,0,0,0,0,0,0,0,3,3,0,0,3,3,0,0,0,0,0,0,0,0,0,0,3,3,0,0,3,3,3,0,0,0,0,0,0,0,0,3,3,3,0,0,0,3,3,3,0,0,0,0,0,0,3,3,3,0,0,0,0,0,3,3,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,3,3,3,3,3,3,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},{"interval":0.20000000298023225,"tag":"OE","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,12,12,12,12,12,12,12,0,0,0,0,0,0,0,12,12,12,12,12,12,12,12,12,12,0,0,0,0,0,12,12,12,0,0,0,0,0,0,12,12,12,0,0,0,12,12,12,0,0,0,0,0,0,0,0,12,12,12,0,0,12,12,0,0,0,0,0,0,0,0,0,0,12,12,0,0,12,12,0,0,0,0,0,0,0,0,0,0,12,12,0,0,12,12,0,0,0,0,0,0,0,0,0,0,12,12,0,0,12,12,0,0,0,0,0,0,0,0,0,0,12,12,0,0,12,12,0,0,0,0,0,0,0,0,0,0,12,12,0,0,12,12,0,0,0,0,0,0,0,0,0,0,12,12,0,0,12,12,12,0,0,0,0,0,0,0,0,12,12,12,0,0,0,12,12,12,0,0,0,0,0,0,12,12,12,0,0,0,0,0,12,12,12,12,12,12,12,12,12,12,0,0,0,0,0,0,0,12,12,12,12,12,12,12,12,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},{"interval":0.20000000298023225,"tag":"M","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,8,8,0,0,0,0,8,8,8,0,0,0,0,0,0,8,8,8,0,0,0,0,8,8,8,0,0,0,0,0,0,8,8,8,0,0,0,0,8,8,8,0,0,0,0,0,8,8,0,8,8,0,0,8,8,0,8,8,0,0,0,0,8,8,0,8,8,0,0,8,8,0,8,8,0,0,0,0,8,8,0,8,8,0,0,8,8,0,8,8,0,0,0,0,8,8,0,8,8,0,0,8,8,0,8,8,0,0,0,8,8,0,0,0,8,8,8,8,0,0,0,8,8,0,0,8,8,0,0,0,8,8,8,8,0,0,0,8,8,0,0,8,8,0,0,0,8,8,8,8,0,0,0,8,8,0,0,8,8,0,0,0,0,8,8,0,0,0,0,8,8,0,8,8,0,0,0,0,0,8,8,0,0,0,0,0,8,8,8,8,0,0,0,0,0,8,8,0,0,0,0,0,8,8,8,8,0,0,0,0,0,0,0,0,0,0,0,0,8,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},{"interval":0.20000000298023225,"tag":"","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,2,2,0,0,0,0,2,2,2,0,0,0,0,0,0,2,2,2,0,0,0,0,2,2,2,0,0,0,0,0,0,2,2,2,0,0,0,0,2,2,2,0,0,0,0,0,2,2,0,2,2,0,0,2,2,0,2,2,0,0,0,0,2,2,0,2,2,0,0,2,2,0,2,2,0,0,0,0,2,2,0,2,2,0,0,2,2,0,2,2,0,0,0,0,2,2,0,2,2,0,0,2,2,0,2,2,0,0,0,2,2,0,0,0,2,2,2,2,0,0,0,2,2,0,0,2,2,0,0,0,2,2,2,2,0,0,0,2,2,0,0,2,2,0,0,0,2,2,2,2,0,0,0,2,2,0,0,2,2,0,0,0,0,2,2,0,0,0,0,2,2,0,2,2,0,0,0,0,0,2,2,0,0,0,0,0,2,2,2,2,0,0,0,0,0,2,2,0,0,0,0,0,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},{"interval":0.20000000298023225,"tag":"ME","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,14,14,0,0,0,0,14,14,14,0,0,0,0,0,0,14,14,14,0,0,0,0,14,14,14,0,0,0,0,0,0,14,14,14,0,0,0,0,14,14,14,0,0,0,0,0,14,14,0,14,14,0,0,14,14,0,14,14,0,0,0,0,14,14,0,14,14,0,0,14,14,0,14,14,0,0,0,0,14,14,0,14,14,0,0,14,14,0,14,14,0,0,0,0,14,14,0,14,14,0,0,14,14,0,14,14,0,0,0,14,14,0,0,0,14,14,14,14,0,0,0,14,14,0,0,14,14,0,0,0,14,14,14,14,0,0,0,14,14,0,0,14,14,0,0,0,14,14,14,14,0,0,0,14,14,0,0,14,14,0,0,0,0,14,14,0,0,0,0,14,14,0,14,14,0,0,0,0,0,14,14,0,0,0,0,0,14,14,14,14,0,0,0,0,0,14,14,0,0,0,0,0,14,14,14,14,0,0,0,0,0,0,0,0,0,0,0,0,14,14,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},{"interval":0.05999999865889549,"tag":"E1","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,0,7,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7,8,0,0,0,0,0,0,0,0,0,7,7,6,7,7,7,8,0,0,0,0,0,0,0,0,7,7,6,6,7,7,7,8,0,0,0,0,0,0,0,7,7,7,7,7,7,0,7,0,0,0,0,0,0,0,7,7,7,6,6,6,7,0,0,0,0,0,0,0,0,6,13,13,7,7,7,7,7,0,0,0,0,0,0,0,0,6,13,13,7,6,6,6,7,0,0,0,0,0,0,0,0,0,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,7,7,7,6,6,7,0,7,0,0,0,0,0,0,0,0,0,7,7,6,6,7,7,7,8,0,0,0,0,0,0,0,0,0,7,7,6,7,7,7,8,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7,8,0,0,0,0,0,0,0,0,0,0,0,7,7,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0]}},{"interval":0.05999999865889549,"tag":"","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,0,7,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,7,7,6,7,7,7,0,0,0,0,0,0,0,0,0,7,7,6,6,7,7,7,0,0,0,0,0,0,0,0,7,7,7,7,7,7,0,7,0,0,0,0,0,0,0,7,7,7,6,6,6,7,0,0,0,0,0,0,0,0,6,13,13,7,7,7,7,7,0,0,0,0,0,0,0,0,6,13,13,7,6,6,6,7,0,0,0,0,0,0,0,0,0,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,7,7,7,6,6,7,0,7,0,0,0,0,0,0,0,0,0,7,7,6,6,7,7,7,0,0,0,0,0,0,0,0,0,0,7,7,6,7,7,7,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,0,0,7,7,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0]}},{"interval":0.05999999865889549,"tag":"","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,0,7,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7,8,0,0,0,0,0,0,0,0,0,7,7,6,7,7,7,8,0,0,0,0,0,0,0,0,7,7,6,6,7,7,7,8,0,0,0,0,0,0,0,7,7,7,7,7,7,0,7,0,0,0,0,0,0,0,7,7,7,6,6,6,7,0,0,0,0,0,0,0,0,6,13,13,7,7,7,7,7,0,0,0,0,0,0,0,0,6,13,13,7,6,6,6,7,0,0,0,0,0,0,0,0,0,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,7,7,7,6,6,7,0,7,0,0,0,0,0,0,0,0,0,7,7,6,6,7,7,7,8,0,0,0,0,0,0,0,0,0,7,7,6,7,7,7,8,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7,8,0,0,0,0,0,0,0,0,0,0,0,7,7,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0]}},{"interval":0.05999999865889549,"tag":"","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,0,7,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7,8,0,0,0,0,0,0,0,0,0,7,7,6,7,7,7,8,8,0,0,0,0,0,0,0,7,7,6,6,7,7,7,8,0,0,0,0,0,0,0,7,7,7,7,7,7,0,7,0,0,0,0,0,0,0,7,7,7,6,6,6,7,0,0,0,0,0,0,0,0,6,13,13,7,7,7,7,7,0,0,0,0,0,0,0,0,6,13,13,7,6,6,6,7,0,0,0,0,0,0,0,0,0,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,7,7,7,6,6,7,0,7,0,0,0,0,0,0,0,0,0,7,7,6,6,7,7,7,8,0,0,0,0,0,0,0,0,0,7,7,6,7,7,7,8,8,0,0,0,0,0,0,0,0,0,7,7,7,7,7,8,0,0,0,0,0,0,0,0,0,0,0,7,7,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0]}},{"interval":0.05999999865889549,"tag":"","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,0,7,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7,8,0,0,0,0,0,0,0,0,0,7,7,6,7,7,7,2,8,0,0,0,0,0,0,0,7,7,6,6,7,7,7,8,0,0,0,0,0,0,0,7,7,7,7,7,7,0,7,0,0,0,0,0,0,0,7,7,7,6,6,6,7,0,0,0,0,0,0,0,0,6,13,13,7,7,7,7,7,0,0,0,0,0,0,0,0,6,13,13,7,6,6,6,7,0,0,0,0,0,0,0,0,0,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,7,7,7,6,6,7,0,7,0,0,0,0,0,0,0,0,0,7,7,6,6,7,7,7,8,0,0,0,0,0,0,0,0,0,7,7,6,7,7,7,2,8,0,0,0,0,0,0,0,0,0,7,7,7,7,7,8,0,0,0,0,0,0,0,0,0,0,0,7,7,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0]}},{"interval":0.05999999865889549,"tag":"E1E","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,0,7,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7,8,0,0,0,0,0,0,0,0,0,7,7,6,7,7,7,8,8,0,0,0,0,0,0,0,7,7,6,6,7,7,7,8,0,0,0,0,0,0,0,7,7,7,7,7,7,0,7,0,0,0,0,0,0,0,7,7,7,6,6,6,7,0,0,0,0,0,0,0,0,6,13,13,7,7,7,7,7,0,0,0,0,0,0,0,0,6,13,13,7,6,6,6,7,0,0,0,0,0,0,0,0,0,7,7,7,7,7,7,7,0,0,0,0,0,0,0,0,0,0,7,7,7,6,6,7,0,7,0,0,0,0,0,0,0,0,0,7,7,6,6,7,7,7,8,0,0,0,0,0,0,0,0,0,7,7,6,7,7,7,8,8,0,0,0,0,0,0,0,0,0,7,7,7,7,7,8,0,0,0,0,0,0,0,0,0,0,0,7,7,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0]}}]} -------------------------------------------------------------------------------- /examples/Cosmos Saga/content/explosion_bank.sprite: -------------------------------------------------------------------------------- 1 | {"frames":[{"interval":0.10000000149011612,"tag":"","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,9,2,10,0,0,0,0,0,0,0,0,0,0,2,10,10,0,10,0,10,2,0,0,0,0,0,0,0,9,10,10,2,10,10,0,10,10,10,0,0,0,0,0,0,0,10,2,0,10,9,10,2,0,2,0,0,0,0,0,0,9,10,2,10,10,10,10,9,10,0,0,0,0,0,0,0,10,0,10,10,10,10,10,9,10,10,0,0,0,0,0,0,10,10,2,9,10,9,2,10,0,0,0,0,0,0,0,0,10,2,10,0,10,10,10,0,10,10,0,0,0,0,0,0,0,10,10,10,10,0,10,9,2,0,0,0,0,0,0,0,0,0,0,2,2,0,9,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},{"interval":0.10000000149011612,"tag":"","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,10,2,2,10,0,0,0,0,0,0,0,0,0,0,2,9,10,10,10,10,9,10,0,0,0,0,0,0,0,10,10,10,9,9,2,10,10,2,10,0,0,0,0,0,0,2,10,9,9,10,10,9,10,10,10,0,0,0,0,0,0,9,10,2,10,10,2,10,10,10,9,0,0,0,0,0,0,2,10,2,10,10,10,10,2,10,2,0,0,0,0,0,0,10,2,10,10,10,10,2,10,10,2,0,0,0,0,0,0,10,10,10,2,2,10,10,10,10,2,0,0,0,0,0,0,0,9,9,10,10,10,10,2,10,0,0,0,0,0,0,0,0,0,0,10,9,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},{"interval":0.10000000149011612,"tag":"","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,9,10,2,2,9,10,0,0,0,0,0,0,0,0,0,10,10,9,9,10,10,10,2,0,0,0,0,0,0,2,10,9,10,10,10,10,10,10,9,9,2,0,0,0,0,9,10,10,2,10,10,2,10,2,10,10,9,0,0,0,9,10,10,9,10,10,9,10,10,10,10,10,10,9,0,0,2,10,2,10,9,10,10,10,2,9,2,10,10,2,0,0,10,10,10,10,10,10,2,10,10,9,10,10,9,10,0,0,10,10,9,2,10,10,10,10,9,10,10,2,10,10,0,0,9,10,10,10,10,10,10,2,10,10,10,10,9,10,0,0,2,9,10,10,2,10,9,10,10,9,2,10,10,2,0,0,0,10,9,10,10,9,10,10,10,2,10,10,9,0,0,0,0,10,2,10,9,10,2,10,10,10,10,9,2,0,0,0,0,0,0,2,10,10,10,10,9,10,9,0,0,0,0,0,0,0,0,0,9,2,9,10,9,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},{"interval":0.10000000149011612,"tag":"","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,10,9,2,9,2,2,0,0,0,0,0,0,0,0,10,9,10,9,10,10,9,10,9,9,0,0,0,0,0,9,2,10,10,10,10,10,10,10,10,10,2,0,0,0,9,10,10,9,10,10,10,2,9,10,2,10,10,9,0,9,10,10,9,10,2,10,10,10,10,10,9,10,10,9,2,10,10,2,9,9,10,10,9,10,10,10,10,9,10,9,2,9,10,10,10,2,9,10,2,2,9,2,10,2,9,10,2,9,10,9,9,10,10,10,9,9,10,10,10,10,2,10,9,9,10,10,10,10,9,10,10,10,10,2,10,9,9,9,10,2,10,2,2,10,9,9,9,10,9,9,10,9,10,10,10,9,10,9,9,10,10,10,9,9,10,10,10,10,2,10,9,2,10,9,10,10,10,2,2,10,2,2,10,9,10,9,10,0,9,10,10,9,9,9,9,10,10,9,2,10,10,10,0,0,0,2,10,10,10,9,10,9,10,10,10,10,9,0,0,0,0,0,9,9,10,10,10,10,10,10,9,2,0,0,0,0,0,0,0,0,10,9,2,9,9,9,0,0,0,0,0]}},{"interval":0.10000000149011612,"tag":"","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,10,2,9,9,9,9,0,0,0,0,0,0,0,0,9,2,10,9,10,10,9,2,9,2,0,0,0,0,0,9,2,2,9,9,9,10,2,10,10,10,2,0,0,0,9,9,8,9,9,8,10,9,2,10,2,2,10,9,0,9,9,2,8,2,2,2,2,10,2,2,9,10,2,9,9,2,9,2,9,2,2,10,2,2,2,2,10,9,2,2,9,9,9,2,10,2,9,9,2,2,2,2,10,2,2,10,2,9,9,8,8,9,9,10,9,9,2,2,9,10,2,9,2,2,10,2,2,2,2,10,2,2,9,2,8,8,8,2,9,2,9,2,2,10,8,9,8,2,9,2,2,8,10,2,10,9,10,9,9,10,2,2,9,8,9,10,2,10,2,2,9,9,2,2,10,2,2,2,9,9,2,9,10,9,2,9,10,0,9,10,2,2,9,9,9,2,10,9,9,2,10,10,0,0,0,2,10,10,2,9,2,2,10,10,10,10,9,0,0,0,0,0,9,9,10,10,10,10,2,2,9,2,0,0,0,0,0,0,0,0,10,9,2,9,2,9,0,0,0,0,0]}},{"interval":0.10000000149011612,"tag":"","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,10,2,0,9,0,9,0,0,0,0,0,0,0,0,8,2,10,9,10,10,9,2,8,0,0,0,0,0,0,9,9,2,8,8,8,10,2,10,10,0,2,0,0,0,8,0,8,9,9,9,0,9,2,10,2,2,8,8,0,9,0,9,9,0,0,9,9,9,9,2,9,10,2,8,8,8,8,2,9,9,2,9,9,9,0,0,9,9,0,0,8,0,0,9,8,9,0,9,9,9,9,9,9,2,2,0,8,0,9,9,9,9,9,10,8,0,8,2,0,10,2,0,8,9,0,0,9,9,2,9,8,8,9,2,9,8,9,9,0,2,0,9,9,9,8,8,9,2,8,2,9,9,9,9,8,8,10,0,0,10,0,0,9,0,0,9,8,8,0,8,8,8,2,8,10,2,2,9,9,9,9,9,8,8,8,9,10,0,8,8,8,0,0,9,9,8,8,9,0,8,10,10,0,0,0,2,10,10,2,9,0,9,10,8,8,10,0,0,0,0,0,0,8,8,10,10,0,8,0,8,9,2,0,0,0,0,0,0,0,0,10,0,2,0,2,0,0,0,0,0,0]}},{"interval":0.10000000149011612,"tag":"","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,10,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,10,9,10,0,0,2,8,0,0,0,0,0,0,0,9,2,8,8,8,0,2,10,10,0,0,0,0,0,8,0,8,9,9,0,0,9,2,0,2,2,0,8,0,0,0,0,0,0,0,0,0,9,0,0,9,10,2,8,8,8,8,2,9,0,0,0,0,0,0,0,9,9,0,0,0,0,0,9,8,9,0,0,9,9,9,9,9,0,0,0,8,0,9,9,0,0,0,0,8,0,8,2,0,10,0,0,8,9,0,0,9,9,2,0,8,8,9,0,0,8,0,0,0,0,0,9,9,0,8,0,0,0,8,2,0,0,0,0,8,8,10,0,0,10,0,0,9,0,0,9,0,0,0,8,8,8,0,0,10,2,0,0,9,0,9,0,8,0,8,0,10,0,8,8,0,0,0,0,0,0,8,9,0,0,0,0,0,0,0,2,0,10,2,9,0,9,10,8,8,10,0,0,0,0,0,0,8,0,0,10,0,8,0,8,0,2,0,0,0,0,0,0,0,0,10,0,0,0,2,0,0,0,0,0,0]}},{"interval":0.10000000149011612,"tag":"","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,6,0,8,0,0,0,0,0,0,0,0,0,0,0,8,0,0,0,9,0,0,6,2,0,2,0,0,0,0,0,0,0,0,0,0,0,0,9,0,0,6,0,0,0,8,8,8,2,9,0,0,0,0,0,0,0,9,6,0,0,0,0,0,9,6,9,0,0,9,9,6,6,9,0,0,0,0,0,0,0,0,0,0,0,8,0,8,2,0,6,0,0,8,0,0,0,9,9,2,0,8,8,9,0,0,8,0,0,0,0,0,9,6,0,8,0,0,0,8,2,0,0,0,0,0,0,10,0,0,10,0,0,9,0,0,6,0,0,0,8,0,8,0,0,10,6,0,0,6,0,6,0,6,0,8,0,0,0,0,0,0,0,0,0,0,0,8,9,0,0,0,0,0,0,0,6,0,0,0,9,0,6,6,6,8,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,0,10,0,0,0,2,0,0,0,0,0,0]}},{"interval":0.10000000149011612,"tag":"","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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]} -------------------------------------------------------------------------------- /examples/Cosmos Saga/content/galaxy_scroll.map: -------------------------------------------------------------------------------- 1 | {"layers":[{"type":"indexed","overlap_x":0,"overlap_y":0,"data":{"width":10,"height":8,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},{"type":"render","overlap_x":0,"overlap_y":0,"data":{"width":10,"height":8,"depth":8,"data":[1,1,1,1,1,4,1,2,1,1,1,2,1,1,1,1,1,1,1,6,1,1,1,1,7,1,1,1,1,1,1,1,3,1,1,1,1,2,1,1,5,1,1,1,1,1,1,1,1,1,1,1,1,1,1,3,1,1,1,7,1,1,1,4,1,1,1,1,2,1,1,1,1,1,1,1,1,1,1,1]}},{"type":"render","overlap_x":0,"overlap_y":0,"data":{"width":10,"height":8,"depth":8,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,9,10,11,12,13,14,15,24,25,16,17,18,19,20,21,22,23,32,33]}},{"type":"render","overlap_x":0,"overlap_y":0,"data":{"width":10,"height":8,"depth":8,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,25,12,13,14,15,8,9,10,11]}}]} -------------------------------------------------------------------------------- /examples/Cosmos Saga/content/info.json: -------------------------------------------------------------------------------- 1 | {"lang":1,"usage":32770,"ugcid":0,"uid":"6f9c96f3-18a4-49bb-a7ef-7e273dca4de2","sticker":"sticker.png","title":"Cosmos Saga","description":"","author":"Tony","version":"1.0","genre":"STG","email":"","url":"https://paladin-t.github.io/b8/examples/Cosmos%20Saga/","creation":1508572680,"controls":[],"entries":{"main":"main.bas","editor":""}} -------------------------------------------------------------------------------- /examples/Cosmos Saga/content/main.bas: -------------------------------------------------------------------------------- 1 | REM Cosmos Saga - Entry program 2 | REM Shoot'em up, survive as long as you can. 3 | REM 4 | REM Press Ctrl+R to run. 5 | REM Control: 6 | REM Up/Down: move spaceship 7 | REM A: shoot 8 | 9 | REM Initializes the driver. 10 | 11 | drv = driver() 12 | print drv, ", detail type is: ", typeof(drv); 13 | use_sound_font("soundfonts/pixels.sf2") 14 | 15 | REM Constants. 16 | 17 | ' Colors. 18 | WHITE = rgba(255, 255, 255) 19 | ' Game stages. 20 | INTRO = 0 21 | PLAYING = 1 22 | LOSE = 2 23 | OVER = 3 24 | ' Enemy types. 25 | LETTER = 1 26 | INVADER = 2 27 | ' Gameplay. 28 | OWN_BULLETS_MAX_COUNT = 3 29 | 30 | REM Classes. 31 | 32 | class point 33 | var x = 0 34 | var y = 0 35 | endclass 36 | class bullet(point) 37 | var vx = 0 38 | endclass 39 | class explosion(point) 40 | var res = nil 41 | var elapsed = 0 42 | endclass 43 | 44 | REM Resources. 45 | 46 | title_bg = load_resource("title_bg.quantized") 47 | title_txt = load_resource("title_txt.quantized") 48 | over_txt = load_resource("over_txt.quantized") 49 | galaxy_scroll = load_resource("galaxy_scroll.map") 50 | galaxy1 = galaxy_scroll(1) 51 | galaxy2 = galaxy_scroll(2) 52 | galaxy3 = galaxy_scroll(3) 53 | explosion_bank = load_resource("explosion_bank.sprite") 54 | enemy_bank = load_resource("enemy_bank.sprite") 55 | spaceship = load_resource("spaceship.sprite") 56 | spaceship.play() 57 | 58 | REM Variables. 59 | 60 | ' Bullets and explosions. 61 | own_bullets = list() 62 | enemy_bullets = list() 63 | explosion_fxs = list() 64 | ' Enemies. 65 | spawning = nil 66 | alive_enemies = dict() 67 | dead_enemies = list() 68 | ' Gameplay. 69 | stage = INTRO 70 | score = 0 71 | highscore = 0 72 | persist highscore 73 | gx1 = 0 74 | gx2 = 0 75 | gx3 = 0 76 | sx = 8 77 | sy = 48 78 | t = 0 79 | 80 | REM Functions. 81 | 82 | ' Spawns an enemy. 83 | def spawn(t) 84 | ' Initializes variables. 85 | x = 160 86 | y = 0 87 | dy = 0 88 | mov = nil 89 | emt = nil 90 | ' Chooses behaviours according to enemy type. 91 | if t = LETTER then 92 | y = 48 93 | mov = lambda (delta) 94 | ( 95 | x = x - delta * 24 96 | dy = sin(x / 4) * 20 97 | ) 98 | elseif t = INVADER then 99 | y = rnd(0, 96) 100 | vx = 28 101 | vy = 0 102 | if rnd > 0.25 then 103 | vy = (sy - y) / (160 - sx) * vx 104 | endif 105 | mov = lambda (delta) 106 | ( 107 | x = x - delta * vx 108 | dy = dy + vy * delta 109 | ) 110 | emt = lambda (ty) 111 | ( 112 | if rnd < 0.6 then 113 | b = new(bullet) 114 | b.x = x - 7 115 | b.y = ty + 8 116 | b.vx = -60 117 | push(enemy_bullets, b) 118 | sfx 4096+1,860,0.2, 1,380,0.01 119 | emt = nil 120 | endif 121 | ) 122 | endif 123 | ' Returns an enemy closure. 124 | return lambda (e, delta) 125 | ( 126 | mov(delta) 127 | ty = y + dy 128 | if x < 143 and emt then emt(ty) 129 | if x < -16 then 130 | push(dead_enemies, e) 131 | else 132 | for b in own_bullets 133 | if abs(ty + 8 - b.y) < 12 and x >= b.x and x <= b.x + 10 then ' The bullet has hit an enemy. 134 | b.x = 999 ' Moves it far away. 135 | if not exists(dead_enemies, e) then 136 | push(dead_enemies, e) 137 | score = score + 1 138 | if score > highscore then highscore = score 139 | endif 140 | ex = new(explosion) 141 | ex.x = x 142 | ex.y = ty 143 | ex.res = clone(explosion_bank) 144 | ex.res.play(-1, -1, false) 145 | push(explosion_fxs, ex) 146 | sfx 4096+5,260,0.8, 5,80,0.1 147 | endif 148 | next 149 | endif 150 | if stage < LOSE then 151 | if abs(x - sx) < 10 and abs(ty - sy) < 10 then stage = LOSE 152 | endif 153 | spr e, x, ty 154 | ) 155 | enddef 156 | 157 | ' Initializes states, starts an enemy spawner, etc. 158 | def setup() 159 | ' Initializes variables. 160 | score = 0 161 | sx = 8 162 | sy = 48 163 | ' Clears collections. 164 | clear(alive_enemies) 165 | clear(dead_enemies) 166 | ' Starts an enemy spawner. 167 | if spawning then 168 | abort(spawning) 169 | spawning = nil 170 | endif 171 | spawning = coroutine 172 | ( 173 | lambda () 174 | ( 175 | yield wait_for(1.0) 176 | ' "W". 177 | e = clone(enemy_bank) 178 | e.play("W", "WE") 179 | set(alive_enemies, e, spawn(LETTER)) 180 | yield wait_for(0.8) 181 | ' "E". 182 | e = clone(enemy_bank) 183 | e.play("E", "EE") 184 | set(alive_enemies, e, spawn(LETTER)) 185 | yield wait_for(0.8) 186 | ' "L". 187 | e = clone(enemy_bank) 188 | e.play("L", "LE") 189 | set(alive_enemies, e, spawn(LETTER)) 190 | yield wait_for(0.8) 191 | ' "C". 192 | e = clone(enemy_bank) 193 | e.play("C", "CE") 194 | set(alive_enemies, e, spawn(LETTER)) 195 | yield wait_for(0.8) 196 | ' "O". 197 | e = clone(enemy_bank) 198 | e.play("O", "OE") 199 | set(alive_enemies, e, spawn(LETTER)) 200 | yield wait_for(0.8) 201 | ' "M". 202 | e = clone(enemy_bank) 203 | e.play("M", "ME") 204 | set(alive_enemies, e, spawn(LETTER)) 205 | yield wait_for(0.8) 206 | ' "E". 207 | e = clone(enemy_bank) 208 | e.play("E", "EE") 209 | set(alive_enemies, e, spawn(LETTER)) 210 | yield wait_for(2.8) 211 | ' Invaders. 212 | while true 213 | e = clone(enemy_bank) 214 | e.play("E1", "E1E") 215 | set(alive_enemies, e, spawn(INVADER)) 216 | yield wait_for(rnd(700, 1800) / 1000) 217 | wend 218 | ) 219 | ) 220 | start(spawning) 221 | enddef 222 | 223 | ' Updates bullets. 224 | def pelter(delta) 225 | ' Updates own bullets. 226 | for b in own_bullets 227 | b.x = b.x + b.vx * delta 228 | line b.x, b.y, b.x + 10, b.y, 2, WHITE 229 | next 230 | if len(own_bullets) then 231 | b = get(own_bullets, 0) 232 | if b.x > 160 then 233 | remove(own_bullets, 0) 234 | endif 235 | endif 236 | ' Updates enemies' bullets. 237 | for b in enemy_bullets 238 | b.x = b.x + b.vx * delta 239 | line b.x, b.y, b.x + 10, b.y, 2, WHITE 240 | if stage < LOSE then 241 | if abs(sy + 8 - b.y) < 10 and sx + 16 >= b.x and sx + 16 <= b.x + 10 then stage = LOSE 242 | endif 243 | next 244 | if len(enemy_bullets) then 245 | b = get(enemy_bullets, 0) 246 | if b.x < -10 then 247 | remove(enemy_bullets, 0) 248 | endif 249 | endif 250 | enddef 251 | 252 | ' Updates all explosion effects. 253 | def boom(delta) 254 | for e in explosion_fxs 255 | e.elapsed = e.elapsed + delta 256 | spr e.res, e.x, e.y 257 | next 258 | if len(explosion_fxs) then 259 | e = get(explosion_fxs, 0) 260 | if e.elapsed > 1 then 261 | remove(explosion_fxs, 0) 262 | endif 263 | endif 264 | enddef 265 | 266 | ' Common routine of a galaxy scene. 267 | def galaxy(delta, sp) 268 | ' Updates scrolling variables. 269 | gx1 = gx1 - delta * 120 270 | if gx1 < -160 then gx1 = gx1 + 160 271 | gx2 = gx2 - delta * 150 272 | if gx2 < -160 then gx2 = gx2 + 160 273 | gx3 = gx3 - delta * 170 274 | if gx3 < -160 then gx3 = gx3 + 160 275 | ' Shows the two background layers. 276 | map galaxy1, gx1, 0 277 | map galaxy1, gx1 + 160, 0 278 | map galaxy2, gx2, 0 279 | map galaxy2, gx2 + 160, 0 280 | ' Shows the spaceship. 281 | if sp then spr spaceship, sx, sy 282 | ' Updates and shows all enemies. 283 | for i in alive_enemies 284 | ctrl = alive_enemies(i) 285 | ctrl(i, delta) 286 | next 287 | ' Shows the forground layer. 288 | map galaxy3, gx3, 0 289 | map galaxy3, gx3 + 160, 0 290 | ' Processes bullets and explosions. 291 | pelter(delta) 292 | boom(delta) 293 | ' Processes dead enemies. 294 | if len(dead_enemies) then 295 | for i in dead_enemies 296 | if exists(alive_enemies, i) then 297 | remove(alive_enemies, i) 298 | endif 299 | next 300 | clear(dead_enemies) 301 | endif 302 | ' Shows scores. 303 | text 0, 1, "SCORE:", WHITE 304 | text 47, 1, score, WHITE 305 | text 80, 1, "HI:", WHITE 306 | text 104, 1, highscore 307 | enddef 308 | 309 | ' Game over stage. 310 | def gameover(delta) 311 | ' If just lost. 312 | if stage = LOSE then 313 | t = 0 314 | stage = OVER 315 | if spawning then 316 | abort(spawning) 317 | spawning = nil 318 | endif 319 | clear(own_bullets) 320 | sfx 4,120,0.2, 4,0,0.2, 4,120,0.3, 4,140,0.3, 4,100,0.2, 4,0,0.2, 4,100,0.3 321 | ex = new(explosion) 322 | ex.x = sx 323 | ex.y = sy 324 | ex.res = clone(explosion_bank) 325 | ex.res.play(-1, -1, false) 326 | push(explosion_fxs, ex) 327 | sfx 4096+5,260,0.8, 5,80,0.1 328 | endif 329 | ' Updates the galaxy. 330 | galaxy(delta, false) 331 | ' Shows the "GAME OVER" text. 332 | img over_txt, 0, 128 * (3 - t) / 3 333 | ' Ticks. 334 | if t < 3 then 335 | t = t + delta 336 | if t > 3 then t = 3 337 | else 338 | if btnp() or keyp() then 339 | t = 0 340 | stage = INTRO 341 | endif 342 | endif 343 | enddef 344 | 345 | ' Battle stage. 346 | def battle(delta) 347 | ' Ticks. 348 | t = t + delta 349 | ' Processes input. 350 | if btn(2) then 351 | sy = sy - delta * 50 352 | if sy < 0 then sy = 0 353 | elseif btn(3) then 354 | sy = sy + delta * 50 355 | if sy >= 112 then sy = 111 356 | endif 357 | if btnp(4) then 358 | if len(own_bullets) < OWN_BULLETS_MAX_COUNT then 359 | b = new(bullet) 360 | b.x = sx + 16 361 | b.y = sy + 8 362 | b.vx = 60 363 | push(own_bullets, b) 364 | sfx 4096+2,860,0.2, 2,380,0.01 365 | endif 366 | endif 367 | ' Updates the galaxy. 368 | galaxy(delta, true) 369 | enddef 370 | 371 | ' Title stage. 372 | def title(delta) 373 | ' Plays music. 374 | if not bgm then 375 | bgm = true 376 | play "T128 F8G8A8B8 >C F D C2 F8G8A8B8 >C F D C2 <<", 0, 5, true 377 | play "T128 F A >C C ", 1, 14, true 378 | endif 379 | ' Ticks. 380 | t = t + delta 381 | if not shown then 382 | d = t * 2 383 | if d > 1 then 384 | shown = true 385 | d = 1 386 | endif 387 | by = -59 388 | ey = (128 - 59) / 2 - 20 389 | y = by + (ey - by) * d 390 | endif 391 | ' Shows visuals. 392 | img title_bg, 0, 0 393 | img title_txt, (160 - 138) / 2, y 394 | ' Shows tips and accepts input. 395 | if shown then 396 | if t * 2 mod 2 then text 16, 100, "PRESS ANY BUTTON", WHITE 397 | if btnp() or keyp() then 398 | play "P", 0, 0, false 399 | play "P", 1, 0, false 400 | bgm = false 401 | shown = false 402 | setup() 403 | stage = PLAYING 404 | endif 405 | endif 406 | enddef 407 | 408 | ' Enters the main loop. 409 | update_with 410 | ( 411 | drv, 412 | lambda (delta) 413 | ( 414 | if stage = INTRO then 415 | title(delta) 416 | elseif stage = PLAYING then 417 | battle(delta) 418 | elseif stage = LOSE or stage = OVER then 419 | gameover(delta) 420 | endif 421 | ) 422 | ) 423 | -------------------------------------------------------------------------------- /examples/Cosmos Saga/content/main.palette: -------------------------------------------------------------------------------- 1 | {"colors":[[0,0,0,0],[29,43,83,255],[255,45,77,255],[0,135,81,255],[171,82,54,255],[95,87,79,255],[194,195,199,255],[255,241,232,255],[255,0,77,255],[255,163,0,255],[255,236,39,255],[0,228,54,255],[41,173,255,255],[131,118,156,255],[255,119,168,255],[8,8,8,255]]} -------------------------------------------------------------------------------- /examples/Cosmos Saga/content/over_txt.quantized: -------------------------------------------------------------------------------- 1 | {"quantized":{"width":160,"height":128,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}} -------------------------------------------------------------------------------- /examples/Cosmos Saga/content/spaceship.sprite: -------------------------------------------------------------------------------- 1 | {"frames":[{"interval":0.05999999865889549,"tag":"","data":{"width":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0,7,0,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0]}},{"interval":0.05999999865889549,"tag":"","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,7,7,0,0,0,0,0,0,0,0,0,0,0,8,7,7,7,7,7,6,6,6,0,0,0,0,0,0,0,8,7,7,7,6,7,7,0,0,0,0,0,0,0,0,0,8,7,7,7,6,6,7,7,0,0,7,0,0,0,0,0,0,7,0,7,7,7,7,7,7,0,7,7,0,0,0,0,0,0,0,7,6,6,6,7,7,7,7,7,7,0,0,0,0,0,0,7,7,7,7,7,7,7,13,13,7,7,6,0,0,0,0,7,6,6,6,7,7,7,13,13,7,7,6,0,0,0,0,7,7,7,7,7,7,7,7,7,7,0,0,0,0,7,0,7,6,6,7,7,7,0,7,7,0,0,0,0,8,7,7,7,6,6,7,7,0,0,7,0,0,0,0,0,8,7,7,7,6,7,7,0,0,0,0,0,0,0,0,0,8,7,7,7,7,7,6,6,6,0,0,0,0,0,0,0,0,7,0,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0]}},{"interval":0.05999999865889549,"tag":"","data":{"width":16,"height":16,"depth":4,"data":[0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,7,7,0,0,0,0,0,0,0,0,0,0,0,8,7,7,7,7,7,6,6,6,0,0,0,0,0,0,8,8,7,7,7,6,7,7,0,0,0,0,0,0,0,0,0,8,7,7,7,6,6,7,7,0,0,7,0,0,0,0,0,0,7,0,7,7,7,7,7,7,0,7,7,0,0,0,0,0,0,0,7,6,6,6,7,7,7,7,7,7,0,0,0,0,0,0,7,7,7,7,7,7,7,13,13,7,7,6,0,0,0,0,7,6,6,6,7,7,7,13,13,7,7,6,0,0,0,0,7,7,7,7,7,7,7,7,7,7,0,0,0,0,7,0,7,6,6,7,7,7,0,7,7,0,0,0,0,8,7,7,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6,7,7,7,13,13,7,7,6,0,0,0,0,7,7,7,7,7,7,7,7,7,7,0,0,0,0,7,0,7,6,6,7,7,7,0,7,7,0,0,0,0,8,7,7,7,6,6,7,7,0,0,7,0,0,0,0,8,8,7,7,7,6,7,7,0,0,0,0,0,0,0,0,0,8,7,7,7,7,7,6,6,6,0,0,0,0,0,0,0,0,7,0,7,7,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,0,0,0,0,0,0,0,0,0,0,0]}}]} -------------------------------------------------------------------------------- /examples/Cosmos Saga/content/sticker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/examples/Cosmos Saga/content/sticker.png -------------------------------------------------------------------------------- /examples/Cosmos Saga/content/title_txt.quantized: -------------------------------------------------------------------------------- 1 | {"quantized":{"width":138,"height":59,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,15,0,0,0,0,0,0,0,0,0,15,0,15,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,15,0,15,0,15,0,15,0,0,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,15,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,15,0,15,0,15,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,5,1,15,0,0,0,0,0,15,15,15,15,15,15,15,15,15,15,15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,15,0,0,0,0,0,0,15,15,15,15,15,15,15,15,15,15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,15,15,15,15,15,15,15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,5,6,1,15,0,0,0,15,15,15,15,1,5,5,13,13,5,13,5,1,1,15,15,15,0,0,0,0,0,0,0,0,0,15,15,1,13,5,13,5,13,5,13,5,15,15,15,1,15,15,0,0,0,0,0,0,0,0,0,0,0,15,15,15,15,15,0,0,0,0,15,15,15,15,5,5,5,5,13,5,5,5,1,15,15,15,15,0,0,0,0,0,0,0,0,15,15,15,4,5,4,5,4,5,5,8,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,13,1,13,1,15,0,0,15,15,15,5,13,13,1,5,1,1,1,1,5,13,13,13,1,15,15,15,0,0,0,0,0,0,15,15,5,13,1,1,1,1,1,1,14,1,15,15,15,13,5,15,15,0,0,0,0,0,0,0,0,0,15,15,15,14,5,15,0,0,15,15,15,1,4,13,5,5,1,5,1,5,5,5,8,13,5,15,15,15,0,0,0,0,0,0,15,15,15,13,5,1,1,1,1,1,8,13,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,13,1,15,13,1,15,0,15,15,1,13,13,1,15,15,15,15,15,15,15,15,15,15,1,13,13,1,15,15,0,0,0,0,15,15,1,13,15,15,15,15,15,15,13,1,15,15,15,15,13,13,5,15,15,0,0,0,0,0,0,0,15,15,15,1,13,5,15,0,15,15,15,13,8,1,1,15,15,15,15,15,15,15,15,15,1,8,13,5,15,15,15,0,0,0,15,15,15,14,1,15,15,15,15,15,4,1,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,13,1,15,15,13,1,15,15,15,13,13,1,15,15,15,15,15,15,15,15,15,15,15,15,15,15,5,14,1,15,15,0,0,15,15,5,13,1,15,15,15,15,15,13,1,15,15,0,15,15,5,15,5,5,15,15,0,0,0,0,0,15,15,15,13,15,5,13,15,15,15,1,14,1,15,15,15,15,15,15,15,15,15,15,15,15,15,15,1,8,13,15,15,15,0,15,15,15,14,1,15,15,15,15,15,4,1,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,13,1,15,15,15,13,1,15,15,13,13,15,15,15,15,15,5,13,13,13,13,13,1,5,15,15,15,15,1,13,13,15,15,15,15,5,13,15,15,15,0,15,15,13,1,15,15,0,0,15,15,13,15,15,13,1,15,15,0,0,0,15,15,15,13,15,15,8,1,15,15,1,14,1,15,15,15,15,1,5,4,13,8,13,1,5,15,15,15,15,15,13,8,15,15,15,15,15,14,15,15,15,0,15,15,5,5,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,13,1,15,15,15,15,13,1,15,5,13,1,15,15,15,1,13,1,13,15,1,13,15,13,13,1,1,15,15,15,15,14,1,15,15,1,13,15,15,15,0,15,15,13,1,15,15,0,0,0,15,15,5,15,15,15,13,5,15,15,0,15,15,15,13,1,15,15,13,5,15,1,14,15,15,15,15,15,13,5,14,1,15,13,15,1,14,5,1,15,15,15,15,13,13,15,15,15,14,1,15,15,0,15,15,4,5,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,13,1,15,15,0,15,15,13,1,15,13,1,15,15,15,13,14,13,1,14,1,13,13,1,13,13,13,14,1,15,15,15,1,13,15,1,13,15,15,15,15,15,15,13,15,15,15,15,15,15,15,15,15,13,15,15,15,15,13,1,15,15,15,15,13,1,15,15,15,5,5,15,13,1,15,15,15,1,14,14,1,8,13,1,14,1,8,13,5,14,5,15,15,15,15,2,1,15,13,15,15,15,0,15,15,5,1,15,15,15,15,15,15,15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,13,1,15,15,0,15,15,5,13,15,13,13,15,15,15,1,13,13,13,13,13,13,13,13,13,13,13,13,13,14,1,15,15,15,13,1,1,5,15,0,15,15,1,14,5,1,5,1,5,1,1,1,1,15,5,1,15,0,15,15,13,5,15,15,13,1,15,15,0,15,13,1,1,8,15,15,15,15,13,8,13,1,13,13,5,8,13,5,14,1,8,14,1,15,15,15,1,2,15,4,15,15,0,15,15,13,8,1,1,5,1,1,5,15,5,15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,13,1,15,15,0,15,15,5,13,1,15,13,1,15,15,15,13,15,13,1,15,13,15,1,13,15,13,1,15,13,13,13,15,15,15,1,13,5,5,15,0,15,15,1,13,1,13,5,8,1,13,4,13,14,1,5,15,15,0,0,15,15,5,13,13,1,15,15,0,0,15,5,5,13,1,15,15,15,13,1,15,13,15,8,1,15,13,15,1,5,15,1,13,8,1,15,15,15,13,1,5,15,0,0,15,15,8,1,8,5,4,4,4,4,5,8,13,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,13,1,15,15,0,15,15,1,6,1,15,1,13,15,15,15,1,6,13,13,13,13,13,13,13,13,13,13,13,13,13,13,14,1,15,15,15,13,13,1,15,0,0,15,15,15,15,15,15,15,15,15,15,15,1,13,5,15,15,0,0,0,15,15,5,1,15,15,0,0,0,15,5,13,8,1,15,15,15,14,5,13,8,13,13,13,13,8,13,13,8,13,13,8,13,5,15,15,15,5,8,1,15,15,0,15,15,15,15,15,15,15,15,15,15,15,15,5,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,13,1,1,15,0,15,15,5,13,1,15,15,13,13,15,15,15,13,13,1,13,13,1,13,1,1,13,1,13,13,1,13,1,13,1,15,15,15,5,13,5,15,0,0,0,0,0,0,0,0,0,0,15,0,15,1,4,1,1,15,0,0,0,0,15,15,15,15,0,0,0,0,15,5,13,5,15,15,15,1,13,15,5,13,1,13,5,15,13,1,1,13,1,5,13,1,8,15,15,15,5,13,5,15,15,0,0,0,0,0,0,0,0,0,15,0,15,1,4,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,13,1,15,15,0,15,15,1,13,1,15,15,15,1,13,15,15,15,5,13,1,13,13,1,13,1,13,13,1,13,13,1,14,1,13,1,15,15,15,13,13,1,15,15,0,0,0,0,0,0,0,0,0,0,0,15,1,13,5,15,15,0,15,15,0,0,15,0,0,15,15,0,0,15,5,13,13,15,15,15,1,8,5,13,8,1,8,13,1,14,5,8,13,5,8,13,13,13,15,15,15,5,8,1,15,15,0,0,0,0,0,0,0,0,0,0,0,15,15,5,15,15,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,13,13,15,15,0,15,15,5,13,1,15,0,0,15,1,13,15,15,15,1,14,13,13,13,13,14,13,13,14,13,14,13,13,13,14,13,1,15,15,15,13,13,1,15,15,15,15,15,15,15,15,15,15,15,15,0,15,5,5,5,1,15,0,15,15,15,15,0,0,15,15,15,15,0,15,5,13,8,15,15,15,15,14,13,13,14,13,13,14,13,14,13,13,14,13,13,8,14,1,15,15,15,5,13,5,15,15,15,15,15,15,15,15,15,15,15,15,0,15,15,8,15,15,0,0,0,0,0,0,0,0,0,0,0,15,15,15,13,1,15,15,0,15,15,1,13,1,15,15,0,0,15,15,13,1,15,15,1,13,1,1,1,1,13,1,15,13,1,1,1,1,13,1,13,15,15,15,1,13,1,14,13,5,13,5,13,5,13,5,13,5,15,15,0,15,1,13,5,15,15,0,15,5,1,15,15,15,15,5,15,15,0,15,5,1,13,1,15,15,15,13,1,15,13,15,13,1,15,13,15,15,13,15,1,13,1,1,15,15,15,8,1,8,13,5,5,4,5,5,5,4,5,8,1,15,0,15,15,13,15,15,0,0,0,0,0,0,0,0,0,0,0,15,15,13,13,15,15,0,15,15,1,13,15,15,15,15,15,15,15,15,13,13,15,15,15,1,13,13,14,13,13,13,13,13,13,13,14,1,14,13,1,15,15,15,13,5,15,1,1,1,1,1,1,1,1,1,1,13,1,15,0,15,1,4,1,1,15,0,15,13,14,15,15,15,5,14,1,15,0,15,13,5,1,2,15,15,15,15,13,8,13,13,8,13,5,8,13,13,8,13,8,14,1,15,15,15,1,13,15,1,1,5,1,1,1,5,1,1,1,5,4,15,0,15,15,4,15,15,0,0,0,0,0,0,0,0,0,0,15,15,13,1,15,15,0,15,15,5,6,13,1,5,1,13,1,5,1,15,1,13,15,15,15,15,13,14,13,13,13,13,13,13,13,13,13,13,14,1,15,15,15,1,13,1,15,15,15,15,15,15,15,15,15,15,15,14,1,15,0,15,1,13,5,15,15,0,15,1,1,13,1,5,1,5,1,15,0,15,5,5,15,13,1,15,15,15,1,14,14,13,13,13,13,14,13,13,13,13,14,13,15,15,15,15,14,1,15,15,15,15,15,15,15,15,15,15,15,8,1,15,15,15,15,5,15,15,0,0,0,0,0,0,0,0,0,0,15,15,13,1,15,15,0,15,15,1,5,1,13,13,1,13,13,13,13,1,15,13,13,15,15,15,15,1,13,13,13,1,1,13,1,13,14,1,1,15,15,15,15,14,1,15,15,15,15,1,13,13,13,13,13,13,13,1,15,15,15,15,13,5,5,15,15,0,15,13,15,15,14,1,15,13,1,15,0,15,13,5,15,1,14,1,15,15,15,1,1,5,14,1,1,13,1,5,14,1,1,15,15,15,15,13,4,15,15,15,15,15,4,13,8,5,8,13,4,13,15,15,15,15,1,8,15,15,0,0,0,0,0,0,0,0,0,0,15,15,15,13,13,15,15,15,15,15,15,15,15,15,15,15,15,15,13,1,15,15,13,13,15,15,15,15,15,1,13,13,13,14,13,13,1,1,15,15,15,15,13,13,15,15,15,15,1,13,1,15,15,15,15,15,15,15,15,15,15,5,13,15,13,15,15,0,15,5,1,15,15,15,15,5,1,15,0,15,5,13,15,15,1,14,15,15,15,15,15,1,13,8,13,8,13,5,5,1,15,15,15,15,4,13,15,15,15,15,15,13,5,15,15,15,15,15,15,15,15,15,15,1,8,1,15,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,13,1,15,15,0,0,15,0,0,0,15,0,15,15,13,1,15,15,15,13,13,1,15,15,15,1,15,1,15,1,15,15,15,15,15,15,5,13,13,15,15,15,15,1,13,15,15,15,15,0,15,15,0,15,15,15,5,13,15,15,13,15,15,0,15,13,1,15,15,15,15,4,1,15,0,15,5,5,15,15,15,1,14,1,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,13,8,15,15,15,15,15,2,1,15,15,15,0,15,15,0,15,15,15,1,2,1,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,1,13,13,15,15,15,15,15,15,15,15,15,15,15,13,1,15,0,15,15,1,13,13,1,15,15,15,15,15,15,15,15,15,15,1,13,13,1,15,15,15,15,1,13,15,15,15,15,15,15,15,15,15,15,15,5,13,15,15,15,5,15,15,15,15,5,1,15,0,0,15,13,15,15,15,15,5,13,15,0,15,15,15,14,13,5,15,15,15,15,15,15,15,15,15,15,1,4,14,1,15,15,15,15,15,13,1,15,15,15,15,15,15,15,15,15,15,1,8,15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,13,13,1,1,1,1,1,1,1,1,1,1,13,1,15,0,0,15,15,1,5,13,13,13,1,1,1,1,1,5,13,13,13,1,1,15,15,15,15,5,14,1,1,1,5,1,1,1,1,1,1,1,5,13,15,15,15,15,13,1,1,1,1,2,1,15,0,0,15,13,5,1,1,1,8,13,15,0,0,15,15,15,1,8,13,5,5,1,1,1,1,5,5,8,13,1,15,15,15,15,15,1,2,5,15,1,15,1,15,1,15,1,15,1,4,8,1,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,13,13,13,13,13,13,13,13,13,13,13,13,15,15,0,0,0,15,15,15,15,1,1,13,13,13,13,5,13,1,1,15,15,15,0,0,15,15,13,13,1,13,8,5,13,4,13,5,4,13,13,5,15,15,0,15,15,5,13,8,5,13,13,15,15,0,0,15,1,8,13,4,13,13,1,15,0,0,0,0,15,15,15,1,1,8,5,8,5,8,1,5,1,15,15,15,15,0,15,15,1,13,5,8,13,8,5,8,13,8,5,8,5,13,15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,0,0,0,0,0,15,15,15,15,15,15,15,15,15,15,15,15,15,0,0,0,0,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,0,0,15,15,15,15,15,15,15,15,15,0,0,15,15,15,15,15,15,15,15,15,0,0,0,0,0,0,15,15,15,15,15,15,15,15,15,15,15,15,0,0,0,0,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,0,15,0,15,0,15,0,15,0,15,0,15,0,0,0,0,0,0,0,0,0,0,15,0,15,0,15,0,0,0,0,0,0,0,0,0,0,15,0,15,0,15,0,15,0,15,0,15,0,15,0,0,0,0,0,0,15,0,15,0,15,0,15,0,0,0,0,15,0,15,0,15,0,15,0,0,0,0,0,0,0,0,0,0,15,0,15,0,15,0,0,0,0,0,0,0,0,0,0,15,0,15,0,15,0,15,0,15,0,15,0,15,0,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0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,0,0,0,0,15,15,15,4,1,15,15,8,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,4,4,15,15,8,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,2,1,15,15,0,15,15,5,5,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,1,4,15,15,15,4,1,15,0,0,0,0,0,0,0,15,15,15,4,1,15,15,1,8,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,4,1,15,15,15,8,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,2,1,15,15,0,15,15,5,4,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,5,8,15,15,15,15,8,1,15,0,0,0,0,0,0,15,15,15,8,1,15,15,15,15,8,15,15,0,0,0,0,0,0,0,0,0,0,0,0,15,15,4,4,15,15,15,15,8,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,4,1,15,15,0,15,15,5,5,15,15,15,15,15,15,15,15,15,0,0,0,0,0,0,15,15,1,8,15,15,0,15,15,4,5,15,0,0,0,0,0,15,15,15,4,1,15,15,0,15,15,8,15,15,0,15,0,15,0,0,0,0,0,0,0,15,15,4,5,15,15,0,15,15,8,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,8,15,15,0,15,15,4,8,15,15,1,15,15,1,15,15,15,15,15,0,0,0,0,15,15,5,8,15,15,15,0,0,15,8,1,15,0,0,0,0,15,15,15,8,1,15,15,0,15,15,8,4,15,15,15,15,15,15,15,0,0,0,0,0,15,15,4,5,15,15,0,0,15,15,8,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,5,15,0,0,15,15,8,1,8,5,8,4,8,4,8,2,5,15,15,0,0,0,15,15,1,8,15,15,15,0,0,15,15,4,1,15,0,0,0,15,15,15,4,1,15,15,0,15,15,4,8,15,5,8,5,4,4,1,15,15,0,0,0,15,15,4,4,15,15,0,0,0,15,15,8,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,4,15,15,0,15,15,15,15,15,15,15,15,15,15,15,15,8,15,15,0,0,15,15,5,8,15,15,0,0,0,0,15,15,8,1,15,0,0,15,15,15,8,1,15,15,0,15,15,4,8,15,5,8,15,15,1,8,8,15,0,0,0,15,15,4,5,15,15,0,0,0,0,15,15,8,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,4,15,15,0,0,0,15,0,15,0,0,15,0,15,15,15,5,15,0,0,15,15,1,8,15,15,15,0,15,15,0,0,15,4,1,15,0,15,15,15,4,1,15,15,0,15,15,4,8,15,5,8,15,15,15,15,15,8,15,0,0,15,15,4,4,15,15,0,15,15,15,0,15,15,8,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,5,15,15,0,0,0,0,0,0,0,0,0,0,0,15,15,8,15,15,15,15,5,8,15,15,0,15,15,15,15,15,0,15,8,1,15,15,15,15,8,1,15,15,0,15,15,4,4,15,5,8,15,15,0,0,15,4,4,15,15,15,15,4,4,15,15,0,15,15,15,15,15,0,15,8,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,8,15,15,15,15,15,15,15,15,15,15,15,15,0,15,15,5,15,15,15,1,8,15,15,15,0,15,15,4,1,15,15,15,4,5,15,15,15,8,1,15,15,0,15,15,4,4,15,1,4,15,15,15,15,0,15,5,4,15,15,15,4,4,15,15,0,15,15,15,8,15,15,15,15,8,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,13,4,5,5,4,5,5,4,5,5,4,15,15,0,15,15,8,15,15,5,8,15,15,15,0,15,15,4,8,1,15,0,15,8,1,15,15,4,1,15,15,0,15,15,5,8,15,5,8,4,5,4,15,15,0,15,4,4,15,15,4,4,15,15,0,15,15,15,8,8,15,15,15,15,8,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,1,5,5,5,1,4,1,5,5,5,8,5,15,0,15,15,5,15,1,8,15,15,15,0,15,15,8,1,4,1,15,0,15,4,15,15,8,1,15,15,0,15,15,5,4,15,15,15,1,15,5,4,4,15,0,15,1,8,15,4,4,15,15,0,15,15,15,8,15,4,15,15,15,15,8,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,15,15,15,15,15,15,15,15,1,8,15,0,15,15,4,5,8,15,15,0,0,15,15,4,1,15,8,1,15,0,15,8,1,4,1,15,15,0,15,15,4,8,1,15,4,15,5,15,15,8,1,15,0,15,4,5,5,4,15,15,0,0,15,15,8,15,15,8,15,15,15,15,8,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,4,8,5,8,5,8,5,8,15,15,15,15,1,4,5,4,15,15,0,0,15,1,8,15,15,4,1,15,0,15,4,4,8,15,15,15,0,15,15,4,4,4,4,4,4,4,8,4,4,15,15,0,15,5,4,4,15,15,15,0,0,15,4,8,15,15,8,15,15,15,15,8,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,4,5,15,15,15,15,15,15,15,15,15,15,15,8,1,15,4,5,15,15,0,15,15,1,8,15,4,1,15,0,15,8,15,1,8,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,0,15,4,4,15,8,5,15,15,0,15,15,1,8,15,4,15,15,0,15,8,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,4,5,15,15,15,15,0,15,15,15,15,15,15,2,1,15,15,15,8,5,15,15,0,15,15,15,8,8,1,15,0,15,4,1,15,1,8,15,15,15,0,0,15,0,0,15,0,0,15,0,0,15,0,0,15,1,8,15,15,8,1,15,15,0,15,15,15,8,8,15,15,0,15,8,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,4,1,15,15,15,15,15,15,0,15,15,15,15,8,1,15,15,0,15,15,4,5,15,15,0,15,15,15,8,1,15,15,15,8,1,15,15,1,8,15,15,15,0,15,15,0,15,15,0,15,15,0,15,15,15,15,4,4,15,15,15,8,5,15,15,0,15,15,1,8,15,15,15,15,4,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,8,1,1,15,15,15,15,15,15,15,15,15,5,8,1,15,15,0,0,15,15,15,8,5,15,15,0,15,15,15,15,15,15,15,8,1,15,15,15,5,8,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,4,8,15,15,15,15,8,15,15,15,0,15,15,15,15,15,15,15,8,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,5,8,5,8,5,8,13,8,5,8,13,8,4,8,1,15,15,0,0,0,0,15,15,15,8,1,15,15,15,15,5,8,8,4,8,5,1,15,0,15,15,1,8,8,4,8,4,8,4,8,4,8,4,8,4,8,4,8,5,1,15,0,15,15,15,8,1,15,15,15,15,4,8,8,4,8,8,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,0,0,0,0,0,0,15,15,15,8,5,15,15,4,8,15,15,15,15,15,15,15,0,0,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,15,0,0,15,15,15,8,5,15,15,8,5,15,15,15,15,15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,0,15,15,0,15,15,0,15,15,0,15,15,0,0,0,0,0,0,0,0,0,15,15,15,8,1,4,5,15,15,15,15,0,15,15,0,0,0,0,15,0,15,15,0,15,15,0,15,15,0,15,15,0,15,15,0,15,15,0,0,0,0,15,15,15,8,1,8,1,15,15,15,0,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,8,5,15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,8,15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,15,15,15,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}} -------------------------------------------------------------------------------- /examples/Infinity Fighter/README.md: -------------------------------------------------------------------------------- 1 | ## Infinity Fighter 2 | 3 | ### Preview 4 | 5 | ![](../../pages/imgs/infinity_fighter.gif) 6 | 7 | ### Content 8 | 9 | [GitHub](https://github.com/paladin-t/b8/tree/master/examples/Infinity%20Fighter/content) 10 | 11 | ### Code at a glance 12 | 13 | ~~~~~~~~~~bas 14 | REM Infinity Fighter - Entry program 15 | REM FTG, you can compete with BASIC8. 16 | REM 1. You are always playing the one in white, your opponent is in red. 17 | REM 2. Both fighters get up to 3 HP, one will die when all HP losts. 18 | REM 3. You will enter next level and get 1 more HP, if the opponent is defeated. 19 | REM 4. The computer will repeat your actions at previous level. 20 | REM 5. Defeat your challengers, and survive as long as you can. 21 | REM 22 | REM Press Ctrl+R to run. 23 | REM Control: 24 | REM Left/Right: move fighter 25 | REM Up: jump 26 | REM A: kick 27 | REM B: shoudouken (aka. bullet in code) 28 | 29 | REM Initializes the driver. 30 | 31 | drv = driver() 32 | print drv, ", detail type is: ", typeof(drv); 33 | 34 | REM Constants. 35 | 36 | ' Colors. 37 | BLACK = rgba(50, 30, 30) ' Um, nearly... 38 | ' Game stages. 39 | INTRO = 0 40 | READY = 1 41 | PLAYING = 2 42 | WIN = 3 43 | LOSE = 4 44 | OVER = 5 45 | ' Actions. 46 | ACT_IDLE = 0 47 | ACT_LEFT = 1 48 | ACT_RIGHT = 2 49 | ACT_HURT = 3 50 | ACT_SHOOT = 4 51 | ACT_KICK = 5 52 | ACT_JUMP = 6 53 | ACT_WIN = 7 54 | ACT_COUNT = 8 55 | ' Animation data; begin frame, end frame, action duration... 56 | ANIMS = list 57 | ( 58 | ' Own fighter. 59 | "IDLE1", "IDLE1E", 0, 60 | "WALK1", "WALK1E", 0, 61 | "WALK1", "WALK1E", 0, 62 | "HURT1", "HURT1", 0.2, 63 | "P1", "P1", 0.7, 64 | "K1", "K1E", 0.5, 65 | "WALK1", "WALK1E", 0.0, 66 | "WIN1", "WIN1E", 0, 67 | ' Opposite fighter. 68 | "IDLE2", "IDLE2E", 0, 69 | "WALK2", "WALK2E", 0, 70 | "WALK2", "WALK2E", 0, 71 | "HURT2", "HURT2", 0.2, 72 | "P2", "P2", 0.7, 73 | "K2", "K2E", 0.5, 74 | "WALK2", "WALK2E", 0.0, 75 | "WIN2", "WIN2E", 0 76 | ) 77 | assert(len(ANIMS) = ACT_COUNT * 3 * 2, "Unmatched animation data.") 78 | ' Gameplay. 79 | JUMP_DURATION = 0.95 80 | HURT_COOLDOWN = 600 81 | BULLET_LIFE = 0.699 82 | 83 | REM Classes. 84 | 85 | class record 86 | var leadtime = 0 87 | var action = ACT_IDLE 88 | endclass 89 | class fighter 90 | var res = nil 91 | var elapsed = 0.0 92 | var hp = 3 93 | var mirror = false 94 | var dir = 0 95 | var x = 0 96 | var y = 0 97 | var action = ACT_IDLE 98 | var last_action = ACT_IDLE 99 | var action_remain = 0.0 100 | var jump_remain = 0.0 101 | var hurt_timestamp = -HURT_COOLDOWN 102 | var bdir = 0 103 | var bx = 0 104 | var by = 0 105 | var bullet_remain = 0.0 106 | endclass 107 | 108 | REM Resources. 109 | 110 | title_txt = load_resource("title_txt.quantized") 111 | battle_bg = load_resource("battle_bg.map") 112 | battle_fg = load_resource("battle_fg.map") 113 | hp_bank = load_resource("hp_bank.sprite") 114 | hp0 = list(clone(hp_bank), clone(hp_bank), clone(hp_bank)) 115 | hp1 = list(clone(hp_bank), clone(hp_bank), clone(hp_bank)) 116 | fighter_bank = load_resource("fighter_bank.sprite") 117 | 118 | REM Variables. 119 | 120 | ' Fighters. 121 | f0 = new(fighter) 122 | f0.res = clone(fighter_bank) 123 | f0.res.set_flip_condition(-1, 0) 124 | f1 = new(fighter) 125 | f1.res = clone(fighter_bank) 126 | f1.res.set_flip_condition(-1, 0) 127 | ' Gameplay. 128 | stage = INTRO 129 | lv = 1 130 | best = 1 131 | persist best 132 | recording = list() 133 | recorded = list() 134 | ppos = 0 135 | t = 0 136 | 137 | REM Functions. 138 | 139 | ' Tells whether two AABBes intersect with each other. 140 | def aabb_hit(l0, t0, r0, b0, l1, t1, r1, b1) 141 | r0x = (r0 - l0) / 2 142 | c0x = l0 + r0x 143 | r1x = (r1 - l1) / 2 144 | c1x = l1 + r1x 145 | if abs(c0x - c1x) > (r0x + r1x) then return false 146 | r0y = (b0 - t0) / 2 147 | c0y = t0 + r0y 148 | r1y = (b1 - t1) / 2 149 | c1y = t1 + r1y 150 | if abs(c0y - c1y) > (r0y + r1y) then return false 151 | return true 152 | enddef 153 | 154 | ' Plays specific animation of a fighter. 155 | def anim(f, act, self) 156 | b = act * 3 157 | e = b + 1 158 | if not self then 159 | b = b + ACT_COUNT * 3 160 | e = e + ACT_COUNT * 3 161 | endif 162 | f.res.play(ANIMS(b), ANIMS(e)) 163 | f.action_remain = ANIMS(b + 2) 164 | enddef 165 | 166 | ' Initializes states, starts recording, etc. 167 | def setup() 168 | ' Initializes variables. 169 | t = 0 170 | ' Decides sides for both fighters. 171 | if lv mod 2 then 172 | fleft = f0 173 | fright = f1 174 | else 175 | fleft = f1 176 | fright = f0 177 | endif 178 | ' Initializes fighters. 179 | anim(f0, ACT_IDLE, true) 180 | anim(f1, ACT_IDLE, false) 181 | f0.elapsed = 0 182 | f1.elapsed = 0 183 | f0.hp = f0.hp + 1 ' Adds 1 more HP. 184 | if f0.hp > 3 then f0.hp = 3 ' Up to 3. 185 | f1.hp = 3 186 | for i = 0 to f0.hp - 1 187 | play(hp0(i), "HP", "HP") 188 | next 189 | for i = 0 to 2 190 | play(hp1(i), "HP", "HP") 191 | next 192 | f1.mirror = false 193 | f0.action = ACT_IDLE 194 | f1.action = ACT_IDLE 195 | f0.last_action = ACT_IDLE 196 | f1.last_action = ACT_IDLE 197 | f0.action_remain = 0 198 | f1.action_remain = 0 199 | f0.jump_remain = 0 200 | f1.jump_remain = 0 201 | f0.hurt_timestamp = HURT_COOLDOWN 202 | f1.hurt_timestamp = HURT_COOLDOWN 203 | f0.bullet_remain = 0 204 | f1.bullet_remain = 0 205 | fleft.res.flip_x(false) 206 | fright.res.flip_x(true) 207 | fleft.dir = 1 208 | fright.dir = -1 209 | fleft.x = 10 : fleft.y = 108 210 | fright.x = 118 : fright.y = 108 211 | spr fleft.res, -999, 0 ' Commits drawing with the fighter on the left once, for automatic flipping with next committing. 212 | spr fright.res, 999, 0 ' Similar to above. 213 | ' Processes records. 214 | clear(recording) 215 | ppos = 0 216 | enddef 217 | 218 | ' Updates jumping of a fighter. 219 | def jumping(fm, fo, delta) 220 | fm.jump_remain = fm.jump_remain - delta 221 | if fm.jump_remain < 0 then fm.jump_remain = 0 222 | jy = sin(fm.jump_remain / JUMP_DURATION * PI) * 50 223 | fm.y = 108 - jy 224 | enddef 225 | 226 | ' Updates a bullet. 227 | def shoudouken(fm, fo, delta) 228 | fm.bullet_remain = fm.bullet_remain - delta 229 | fm.bx = fm.bx + fm.bdir * delta * 40 230 | rm = fm.bullet_remain / BULLET_LIFE * PI 231 | f = sin(rm * 3) + 1 232 | g = cos(rm * 3) + 1 233 | circfill fm.bx, fm.by, 10 - f * 2, rgba(f * 100 + 20, 120, g * 100 + 20, f * 64 + 120) 234 | circfill fm.bx, fm.by, 10 - g * 2, rgba(g * 100 + 20, f * 100 + 20, 120, g * 64 + 120) 235 | enddef 236 | 237 | ' Common routine of a battle yard. 238 | def yard(delta, r0, r1) 239 | ' Shows the background and foreground. 240 | map battle_bg, 0, 0 241 | map battle_fg, 0, 0 242 | ' Shows the HUD. 243 | text 9, 1, "LV." 244 | text 33, 1, lv 245 | text 65, 1, "BEST" 246 | text 101, 1, best 247 | for i = 1 to 3 248 | if lv mod 2 then 249 | spr hp0(i - 1), i * 9, 10 250 | else 251 | spr hp1(i - 1), i * 9, 10 252 | endif 253 | next 254 | for i = 1 to 3 255 | if lv mod 2 then 256 | spr hp1(i - 1), 144 - i * 9, 10 257 | else 258 | spr hp0(i - 1), 144 - i * 9, 10 259 | endif 260 | next 261 | ' Shows the fighters. 262 | if r1 then 263 | spr f1.res, f1.x, step_on(120), r1 264 | spr f0.res, f0.x, step_on(f0.y) 265 | elseif r0 then 266 | spr f0.res, f0.x, step_on(120), r0 267 | spr f1.res, f1.x, step_on(f1.y) 268 | else 269 | spr f1.res, f1.x, step_on(f1.y) 270 | spr f0.res, f0.x, step_on(f0.y) 271 | endif 272 | ' Processes jumping and bullets. 273 | if f0.jump_remain > 0 then jumping(f0, f1, delta) 274 | if f1.jump_remain > 0 then jumping(f1, f0, delta) 275 | if f0.bullet_remain > 0 then shoudouken(f0, f1, delta) 276 | if f1.bullet_remain > 0 then shoudouken(f1, f0, delta) 277 | enddef 278 | 279 | ' Game over stage. 280 | def gameover(delta) 281 | ' Ticks. 282 | t = t + delta 283 | ' Shows the scene. 284 | if t < 0.5 then 285 | yard(delta, 0, 0) 286 | else 287 | if f0.dir = 1 then 288 | f0.res.flip_x(true) 289 | yard(delta, -90, 0) 290 | else 291 | f0.res.flip_x(false) 292 | yard(delta, 90, 0) 293 | endif 294 | text 48, 30, "You Lose" 295 | endif 296 | if t >= 2.5 then 297 | if t * 2 mod 2 then 298 | text 16, 110, "PRESS ANY BUTTON", BLACK 299 | else 300 | text 16, 110, "PRESS ANY BUTTON", rgba(255, 255, 255) 301 | endif 302 | if btnp() or keyp() then 303 | lv = 1 304 | clear(recording) 305 | clear(recorded) 306 | t = 0 307 | stage = INTRO 308 | endif 309 | endif 310 | enddef 311 | 312 | ' Next level stage. 313 | def nextlv(delta) 314 | ' Ticks. 315 | t = t + delta 316 | ' Shows the scene. 317 | if t < 0.5 then 318 | yard(delta, 0, 0) 319 | elseif t < 3 then 320 | if f1.dir = 1 then 321 | f1.res.flip_x(true) 322 | yard(delta, 0, -90) 323 | else 324 | f1.res.flip_x(false) 325 | yard(delta, 0, 90) 326 | endif 327 | text 52, 30, "You Win" 328 | else 329 | lv = lv + 1 330 | if lv > best then best = lv 331 | tmp = recording 332 | recording = recorded 333 | recorded = tmp 334 | tmp = nil 335 | setup() 336 | stage = READY 337 | endif 338 | enddef 339 | 340 | ' Controls a fighter. 341 | def ctrl(fm, fo, delta, act, self) 342 | ' Detects collision. 343 | n = ticks() 344 | def_fol = fo.x + 8 345 | def_fot = fo.y - 28 346 | def_for = fo.x + 24 347 | def_fob = fo.y - 2 348 | if fo.action <> ACT_HURT and n - fo.hurt_timestamp > HURT_COOLDOWN and fm.bullet_remain > 0 then 349 | blt_fml = fm.bx - 6 350 | blt_fmt = fm.by - 6 351 | blt_fmr = fm.bx + 7 352 | blt_fmb = fm.by + 7 353 | if aabb_hit(blt_fml,blt_fmt,blt_fmr,blt_fmb, def_fol,def_fot,def_for,def_fob) then 354 | fm.bullet_remain = 0 355 | fo.hurt_timestamp = n 356 | fo.hp = fo.hp - 1 357 | if fo.hp < 0 then 358 | fo.hp = 0 359 | else 360 | if self then 361 | play(hp1(fo.hp), "HPL", "HPLE", false, true) 362 | else 363 | play(hp0(fo.hp), "HPL", "HPLE", false, true) 364 | endif 365 | endif 366 | if fo.action <> ACT_HURT then 367 | fo.action = ACT_HURT 368 | anim(fo, ACT_HURT, not self) 369 | endif 370 | endif 371 | endif 372 | if fo.action <> ACT_HURT and n - fo.hurt_timestamp > HURT_COOLDOWN and fm.action = ACT_KICK then 373 | atk_fml = fm.x + 8 + fm.dir * 8 374 | atk_fmt = fm.y - 25 375 | atk_fmr = fm.x + 24 + fm.dir * 8 376 | atk_fmb = fm.y - 8 377 | if aabb_hit(atk_fml,atk_fmt,atk_fmr,atk_fmb, def_fol,def_fot,def_for,def_fob) then 378 | fo.hurt_timestamp = n 379 | fo.hp = fo.hp - 1 380 | if fo.hp < 0 then 381 | fo.hp = 0 382 | else 383 | if self then 384 | play(hp1(fo.hp), "HPL", "HPLE", false, true) 385 | else 386 | play(hp0(fo.hp), "HPL", "HPLE", false, true) 387 | endif 388 | endif 389 | if fo.action <> ACT_HURT then 390 | fo.action = ACT_HURT 391 | anim(fo, ACT_HURT, not self) 392 | endif 393 | endif 394 | endif 395 | ' Ticks. 396 | fm.elapsed = fm.elapsed + delta 397 | if fm.action_remain > 0 then 398 | fm.action_remain = fm.action_remain - delta 399 | return 400 | endif 401 | ' Processes mirrored actions. 402 | if act = ACT_LEFT and fm.mirror then 403 | aact = ACT_RIGHT 404 | elseif act = ACT_RIGHT and fm.mirror then 405 | aact = ACT_LEFT 406 | else 407 | aact = act 408 | if act = ACT_KICK then 409 | sfx 5,1860,0.1 410 | elseif act = ACT_SHOOT then 411 | sfx 5,1860,0.1, 5,1060,0.1, 5,1860,0.1, 5,1060,0.1, 5,1860,0.1 412 | elseif act = ACT_JUMP then 413 | sfx 4096+2,660,0.1, 4,860,0.01 414 | endif 415 | endif 416 | ' Plays proper animation. 417 | if fm.action <> aact then 418 | fm.action = aact 419 | anim(fm, aact, self) 420 | endif 421 | ' Makes movement. 422 | d = 0 423 | if aact = ACT_LEFT then 424 | d = -1 425 | fm.dir = -1 426 | elseif aact = ACT_RIGHT then 427 | d = 1 428 | fm.dir = 1 429 | elseif aact = ACT_SHOOT then 430 | if fm.bullet_remain <= 0 then 431 | fm.bullet_remain = BULLET_LIFE 432 | fm.bdir = fm.dir 433 | fm.bx = fm.x + 16 + fm.dir * 20 434 | fm.by = fm.y - 16 435 | endif 436 | elseif aact = ACT_JUMP then 437 | if fm.jump_remain <= 0 then 438 | fm.jump_remain = JUMP_DURATION 439 | endif 440 | endif 441 | if d then 442 | fm.x = fm.x + fm.dir * delta * 50 443 | if fm.x < -12 then 444 | fm.x = -12 445 | if not self then 446 | if act = ACT_LEFT and not fm.mirror then 447 | fm.mirror = not fm.mirror 448 | elseif act = ACT_RIGHT and fm.mirror then 449 | fm.mirror = not fm.mirror 450 | endif 451 | endif 452 | elseif fm.x > 140 then 453 | fm.x = 140 454 | if not self then 455 | if act = ACT_RIGHT and not fm.mirror then 456 | fm.mirror = not fm.mirror 457 | elseif act = ACT_LEFT and fm.mirror then 458 | fm.mirror = not fm.mirror 459 | endif 460 | endif 461 | endif 462 | endif 463 | enddef 464 | 465 | ' Battle stage. 466 | def battle(delta) 467 | ' Shows the scene. 468 | yard(delta, 0, 0) 469 | ' Processes input. 470 | act = ACT_IDLE 471 | if btn(2) and f0.jump_remain <= 0 then ' Up. 472 | act = ACT_JUMP 473 | elseif btn(0) then ' Left. 474 | act = ACT_LEFT 475 | elseif btn(1) then ' Right. 476 | act = ACT_RIGHT 477 | endif 478 | if btnp(4) then ' A. 479 | act = ACT_KICK 480 | elseif btnp(5) then ' B. 481 | act = ACT_SHOOT 482 | endif 483 | ' Controls own fighter, records actions. 484 | ctrl(f0, f1, delta, act, true) 485 | if act <> f0.last_action then 486 | rec = new(record) 487 | rec.action = act 488 | if len(recording) then 489 | rec.leadtime = f0.elapsed 490 | else 491 | rec.leadtime = 0.1 492 | endif 493 | push(recording, rec) 494 | f0.elapsed = 0 495 | f0.last_action = act 496 | endif 497 | ' Controls opposite fighter, plays recorded actions. 498 | act = f1.last_action 499 | l = len(recorded) 500 | if l then 501 | rec = recorded(ppos) 502 | if f1.elapsed >= rec.leadtime then 503 | act = rec.action 504 | if act = ACT_LEFT or act = ACT_RIGHT then 505 | f1.last_action = act 506 | else 507 | f1.last_action = ACT_IDLE 508 | endif 509 | f1.elapsed = 0 510 | ppos = ppos + 1 511 | if ppos >= l then ppos = 0 512 | endif 513 | endif 514 | ctrl(f1, f0, delta, act, false) 515 | ' Checks win or lose. 516 | if f1.hp = 0 and f1.action_remain <= 0 then 517 | t = 0 518 | anim(f0, ACT_WIN, true) 519 | stage = WIN 520 | play "DP", 1, 0, false 521 | elseif f0.hp = 0 and f0.action_remain <= 0 then 522 | t = 0 523 | anim(f1, ACT_WIN, false) 524 | stage = LOSE 525 | play "D8C8= 0.3 and t <= 1 then 540 | text 76, 30, 3 541 | elseif t >= 1.3 and t <= 2 then 542 | text 76, 30, 2 543 | elseif t >= 2.3 and t <= 3 then 544 | text 76, 30, 1 545 | elseif t > 3 and t <= 4 then 546 | text 56, 30, "Fight!" 547 | elseif t > 4 then 548 | sf = false 549 | stage = PLAYING 550 | endif 551 | ' Shows the scene. 552 | yard(delta, 0, 0) 553 | enddef 554 | 555 | ' Title stage. 556 | def title(delta) 557 | ' Runs once. 558 | if not ran then 559 | ran = true 560 | set_orderby(drv, "nil") 561 | f0.res.play("WIN1", "WIN1E", true, true) 562 | spr f0.res, -999, 0 563 | f1.res.play("WIN2", "WIN2E", true, true) 564 | spr f1.res, 999, 0 565 | play "T128 G8 >C8C8 C8C8 C16C16C16C16C16C16C16C16C16C16C16C16C16 1 then 572 | shown = true 573 | d = 1 574 | endif 575 | bx = -138 576 | ex = (160 - 138) / 2 577 | x = bx + (ex - bx) * d 578 | endif 579 | ' Shows visuals. 580 | map battle_bg, 0, 0 581 | map battle_fg, 0, 0 582 | spr f0.res, 10, step_on(108) 583 | spr f1.res, 118, step_on(108) 584 | img title_txt, x, 10 585 | ' Shows tips and accepts input. 586 | if shown then 587 | if t * 2 mod 2 then text 16, 110, "PRESS ANY BUTTON", BLACK 588 | if btnp() or keyp() then 589 | play "P", 0, 0, false 590 | ran = false 591 | shown = false 592 | f0.hp = 3 593 | set_orderby(drv, "map") 594 | setup() 595 | stage = READY 596 | endif 597 | endif 598 | enddef 599 | 600 | ' Enters the main loop. 601 | update_with 602 | ( 603 | drv, 604 | lambda (delta) 605 | ( 606 | if stage = INTRO then 607 | title(delta) 608 | elseif stage = READY then 609 | countdown(delta) 610 | elseif stage = PLAYING then 611 | battle(delta) 612 | elseif stage = WIN then 613 | nextlv(delta) 614 | elseif stage = LOSE or stage = OVER then 615 | gameover(delta) 616 | endif 617 | ) 618 | ) 619 | ~~~~~~~~~~ 620 | -------------------------------------------------------------------------------- /examples/Infinity Fighter/content/battle_bg.map: -------------------------------------------------------------------------------- 1 | {"layers":[{"type":"indexed","overlap_x":0,"overlap_y":0,"data":{"width":10,"height":8,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},{"type":"render","overlap_x":0,"overlap_y":0,"data":{"width":10,"height":8,"depth":8,"data":[1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,2,2,2,2,2,2,2,2,2,2,1,1,1,1,1,1,1,1,1,1,24,25,26,27,28,29,30,31,29,30,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1]}},{"type":"render","overlap_x":0,"overlap_y":0,"data":{"width":10,"height":8,"depth":8,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,8,9,10,11,12,13,14,15,8,9,16,17,18,19,20,21,22,23,16,17,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}}]} -------------------------------------------------------------------------------- /examples/Infinity Fighter/content/battle_fg.map: -------------------------------------------------------------------------------- 1 | {"layers":[{"type":"indexed","overlap_x":0,"overlap_y":0,"data":{"width":10,"height":8,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,1,1,1,1,1,1,1,1,1]}},{"type":"render","overlap_x":0,"overlap_y":0,"data":{"width":10,"height":8,"depth":8,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3,0,0,3,3,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}},{"type":"render","overlap_x":0,"overlap_y":0,"data":{"width":10,"height":8,"depth":8,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,6,6,6,6,6,6,6,6,6,4,4,4,5,4,4,5,4,5,4,4,4,4,4,4,4,4,4,4,4]}},{"type":"render","overlap_x":0,"overlap_y":0,"data":{"width":10,"height":8,"depth":8,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,7,7,7,7,7,7,7,7,7,7]}}]} -------------------------------------------------------------------------------- /examples/Infinity Fighter/content/hp_bank.sprite: -------------------------------------------------------------------------------- 1 | {"frames":[{"interval":0.3330000042915344,"tag":"HP","data":{"width":8,"height":8,"depth":4,"data":[0,0,0,0,0,0,0,0,0,14,14,0,0,14,14,0,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,7,14,0,14,14,14,14,7,14,0,0,0,14,14,7,14,0,0,0,0,0,14,14,0,0,0]}},{"interval":0.10000000149011612,"tag":"HPL","data":{"width":8,"height":8,"depth":4,"data":[0,0,0,0,0,0,0,0,0,14,14,0,0,14,14,0,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,14,7,14,0,14,14,14,14,7,14,0,0,0,14,14,7,14,0,0,0,0,0,14,14,0,0,0]}},{"interval":0.10000000149011612,"tag":"","data":{"width":8,"height":8,"depth":4,"data":[0,0,0,0,0,0,0,0,0,14,14,0,0,0,14,0,14,14,14,0,0,14,14,14,14,14,14,14,0,14,14,14,14,14,14,14,0,14,14,14,0,14,14,0,0,14,14,0,0,0,14,0,14,14,0,0,0,0,0,14,0,0,0,0]}},{"interval":0.10000000149011612,"tag":"","data":{"width":8,"height":8,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,14,0,0,0,14,14,0,14,14,0,0,0,14,0,14,14,0,14,0,0,0,14,14,0,14,0,0,0,14,14,0,0,0,14,0,0,14,0,0,0,0,0,14,0,0,0,0]}},{"interval":0.10000000149011612,"tag":"HPLE","data":{"width":8,"height":8,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}}]} -------------------------------------------------------------------------------- /examples/Infinity Fighter/content/info.json: -------------------------------------------------------------------------------- 1 | {"lang":1,"usage":32770,"ugcid":0,"uid":"a8dba68c-cf50-44a6-819e-dd6019a9911f","sticker":"sticker.png","title":"Infinity Fighter","description":"","author":"Tony","version":"1.0","genre":"FTG","email":"","url":"https://paladin-t.github.io/b8/examples/Infinity%20Fighter/","creation":1510648341,"controls":[],"entries":{"main":"main.bas","editor":""}} -------------------------------------------------------------------------------- /examples/Infinity Fighter/content/main.bas: -------------------------------------------------------------------------------- 1 | REM Infinity Fighter - Entry program 2 | REM FTG, you can compete with BASIC8. 3 | REM 1. You are always playing the one in white, your opponent is in red. 4 | REM 2. Both fighters get up to 3 HP, one will die when all HP losts. 5 | REM 3. You will enter next level and get 1 more HP, if the opponent is defeated. 6 | REM 4. The computer will repeat your actions at previous level. 7 | REM 5. Defeat your challengers, and survive as long as you can. 8 | REM 9 | REM Press Ctrl+R to run. 10 | REM Control: 11 | REM Left/Right: move fighter 12 | REM Up: jump 13 | REM A: kick 14 | REM B: shoudouken (aka. bullet in code) 15 | 16 | REM Initializes the driver. 17 | 18 | drv = driver() 19 | print drv, ", detail type is: ", typeof(drv); 20 | 21 | REM Constants. 22 | 23 | ' Colors. 24 | BLACK = rgba(50, 30, 30) ' Um, nearly... 25 | ' Game stages. 26 | INTRO = 0 27 | READY = 1 28 | PLAYING = 2 29 | WIN = 3 30 | LOSE = 4 31 | OVER = 5 32 | ' Actions. 33 | ACT_IDLE = 0 34 | ACT_LEFT = 1 35 | ACT_RIGHT = 2 36 | ACT_HURT = 3 37 | ACT_SHOOT = 4 38 | ACT_KICK = 5 39 | ACT_JUMP = 6 40 | ACT_WIN = 7 41 | ACT_COUNT = 8 42 | ' Animation data; begin frame, end frame, action duration... 43 | ANIMS = list 44 | ( 45 | ' Own fighter. 46 | "IDLE1", "IDLE1E", 0, 47 | "WALK1", "WALK1E", 0, 48 | "WALK1", "WALK1E", 0, 49 | "HURT1", "HURT1", 0.2, 50 | "P1", "P1", 0.7, 51 | "K1", "K1E", 0.5, 52 | "WALK1", "WALK1E", 0.0, 53 | "WIN1", "WIN1E", 0, 54 | ' Opposite fighter. 55 | "IDLE2", "IDLE2E", 0, 56 | "WALK2", "WALK2E", 0, 57 | "WALK2", "WALK2E", 0, 58 | "HURT2", "HURT2", 0.2, 59 | "P2", "P2", 0.7, 60 | "K2", "K2E", 0.5, 61 | "WALK2", "WALK2E", 0.0, 62 | "WIN2", "WIN2E", 0 63 | ) 64 | assert(len(ANIMS) = ACT_COUNT * 3 * 2, "Unmatched animation data.") 65 | ' Gameplay. 66 | JUMP_DURATION = 0.95 67 | HURT_COOLDOWN = 600 68 | BULLET_LIFE = 0.699 69 | 70 | REM Classes. 71 | 72 | class record 73 | var leadtime = 0 74 | var action = ACT_IDLE 75 | endclass 76 | class fighter 77 | var res = nil 78 | var elapsed = 0.0 79 | var hp = 3 80 | var mirror = false 81 | var dir = 0 82 | var x = 0 83 | var y = 0 84 | var action = ACT_IDLE 85 | var last_action = ACT_IDLE 86 | var action_remain = 0.0 87 | var jump_remain = 0.0 88 | var hurt_timestamp = -HURT_COOLDOWN 89 | var bdir = 0 90 | var bx = 0 91 | var by = 0 92 | var bullet_remain = 0.0 93 | endclass 94 | 95 | REM Resources. 96 | 97 | title_txt = load_resource("title_txt.quantized") 98 | battle_bg = load_resource("battle_bg.map") 99 | battle_fg = load_resource("battle_fg.map") 100 | hp_bank = load_resource("hp_bank.sprite") 101 | hp0 = list(clone(hp_bank), clone(hp_bank), clone(hp_bank)) 102 | hp1 = list(clone(hp_bank), clone(hp_bank), clone(hp_bank)) 103 | fighter_bank = load_resource("fighter_bank.sprite") 104 | 105 | REM Variables. 106 | 107 | ' Fighters. 108 | f0 = new(fighter) 109 | f0.res = clone(fighter_bank) 110 | f0.res.set_flip_condition(-1, 0) 111 | f1 = new(fighter) 112 | f1.res = clone(fighter_bank) 113 | f1.res.set_flip_condition(-1, 0) 114 | ' Gameplay. 115 | stage = INTRO 116 | lv = 1 117 | best = 1 118 | persist best 119 | recording = list() 120 | recorded = list() 121 | ppos = 0 122 | t = 0 123 | 124 | REM Functions. 125 | 126 | ' Tells whether two AABBes intersect with each other. 127 | def aabb_hit(l0, t0, r0, b0, l1, t1, r1, b1) 128 | r0x = (r0 - l0) / 2 129 | c0x = l0 + r0x 130 | r1x = (r1 - l1) / 2 131 | c1x = l1 + r1x 132 | if abs(c0x - c1x) > (r0x + r1x) then return false 133 | r0y = (b0 - t0) / 2 134 | c0y = t0 + r0y 135 | r1y = (b1 - t1) / 2 136 | c1y = t1 + r1y 137 | if abs(c0y - c1y) > (r0y + r1y) then return false 138 | return true 139 | enddef 140 | 141 | ' Plays specific animation of a fighter. 142 | def anim(f, act, self) 143 | b = act * 3 144 | e = b + 1 145 | if not self then 146 | b = b + ACT_COUNT * 3 147 | e = e + ACT_COUNT * 3 148 | endif 149 | f.res.play(ANIMS(b), ANIMS(e)) 150 | f.action_remain = ANIMS(b + 2) 151 | enddef 152 | 153 | ' Initializes states, starts recording, etc. 154 | def setup() 155 | ' Initializes variables. 156 | t = 0 157 | ' Decides sides for both fighters. 158 | if lv mod 2 then 159 | fleft = f0 160 | fright = f1 161 | else 162 | fleft = f1 163 | fright = f0 164 | endif 165 | ' Initializes fighters. 166 | anim(f0, ACT_IDLE, true) 167 | anim(f1, ACT_IDLE, false) 168 | f0.elapsed = 0 169 | f1.elapsed = 0 170 | f0.hp = f0.hp + 1 ' Adds 1 more HP. 171 | if f0.hp > 3 then f0.hp = 3 ' Up to 3. 172 | f1.hp = 3 173 | for i = 0 to f0.hp - 1 174 | play(hp0(i), "HP", "HP") 175 | next 176 | for i = 0 to 2 177 | play(hp1(i), "HP", "HP") 178 | next 179 | f1.mirror = false 180 | f0.action = ACT_IDLE 181 | f1.action = ACT_IDLE 182 | f0.last_action = ACT_IDLE 183 | f1.last_action = ACT_IDLE 184 | f0.action_remain = 0 185 | f1.action_remain = 0 186 | f0.jump_remain = 0 187 | f1.jump_remain = 0 188 | f0.hurt_timestamp = HURT_COOLDOWN 189 | f1.hurt_timestamp = HURT_COOLDOWN 190 | f0.bullet_remain = 0 191 | f1.bullet_remain = 0 192 | fleft.res.flip_x(false) 193 | fright.res.flip_x(true) 194 | fleft.dir = 1 195 | fright.dir = -1 196 | fleft.x = 10 : fleft.y = 108 197 | fright.x = 118 : fright.y = 108 198 | spr fleft.res, -999, 0 ' Commits drawing with the fighter on the left once, for automatic flipping with next committing. 199 | spr fright.res, 999, 0 ' Similar to above. 200 | ' Processes records. 201 | clear(recording) 202 | ppos = 0 203 | enddef 204 | 205 | ' Updates jumping of a fighter. 206 | def jumping(fm, fo, delta) 207 | fm.jump_remain = fm.jump_remain - delta 208 | if fm.jump_remain < 0 then fm.jump_remain = 0 209 | jy = sin(fm.jump_remain / JUMP_DURATION * PI) * 50 210 | fm.y = 108 - jy 211 | enddef 212 | 213 | ' Updates a bullet. 214 | def shoudouken(fm, fo, delta) 215 | fm.bullet_remain = fm.bullet_remain - delta 216 | fm.bx = fm.bx + fm.bdir * delta * 40 217 | rm = fm.bullet_remain / BULLET_LIFE * PI 218 | f = sin(rm * 3) + 1 219 | g = cos(rm * 3) + 1 220 | circfill fm.bx, fm.by, 10 - f * 2, rgba(f * 100 + 20, 120, g * 100 + 20, f * 64 + 120) 221 | circfill fm.bx, fm.by, 10 - g * 2, rgba(g * 100 + 20, f * 100 + 20, 120, g * 64 + 120) 222 | enddef 223 | 224 | ' Common routine of a battle yard. 225 | def yard(delta, r0, r1) 226 | ' Shows the background and foreground. 227 | map battle_bg, 0, 0 228 | map battle_fg, 0, 0 229 | ' Shows the HUD. 230 | text 9, 1, "LV." 231 | text 33, 1, lv 232 | text 65, 1, "BEST" 233 | text 101, 1, best 234 | for i = 1 to 3 235 | if lv mod 2 then 236 | spr hp0(i - 1), i * 9, 10 237 | else 238 | spr hp1(i - 1), i * 9, 10 239 | endif 240 | next 241 | for i = 1 to 3 242 | if lv mod 2 then 243 | spr hp1(i - 1), 144 - i * 9, 10 244 | else 245 | spr hp0(i - 1), 144 - i * 9, 10 246 | endif 247 | next 248 | ' Shows the fighters. 249 | if r1 then 250 | spr f1.res, f1.x, step_on(120), r1 251 | spr f0.res, f0.x, step_on(f0.y) 252 | elseif r0 then 253 | spr f0.res, f0.x, step_on(120), r0 254 | spr f1.res, f1.x, step_on(f1.y) 255 | else 256 | spr f1.res, f1.x, step_on(f1.y) 257 | spr f0.res, f0.x, step_on(f0.y) 258 | endif 259 | ' Processes jumping and bullets. 260 | if f0.jump_remain > 0 then jumping(f0, f1, delta) 261 | if f1.jump_remain > 0 then jumping(f1, f0, delta) 262 | if f0.bullet_remain > 0 then shoudouken(f0, f1, delta) 263 | if f1.bullet_remain > 0 then shoudouken(f1, f0, delta) 264 | enddef 265 | 266 | ' Game over stage. 267 | def gameover(delta) 268 | ' Ticks. 269 | t = t + delta 270 | ' Shows the scene. 271 | if t < 0.5 then 272 | yard(delta, 0, 0) 273 | else 274 | if f0.dir = 1 then 275 | f0.res.flip_x(true) 276 | yard(delta, -90, 0) 277 | else 278 | f0.res.flip_x(false) 279 | yard(delta, 90, 0) 280 | endif 281 | text 48, 30, "You Lose" 282 | endif 283 | if t >= 2.5 then 284 | if t * 2 mod 2 then 285 | text 16, 110, "PRESS ANY BUTTON", BLACK 286 | else 287 | text 16, 110, "PRESS ANY BUTTON", rgba(255, 255, 255) 288 | endif 289 | if btnp() or keyp() then 290 | lv = 1 291 | clear(recording) 292 | clear(recorded) 293 | t = 0 294 | stage = INTRO 295 | endif 296 | endif 297 | enddef 298 | 299 | ' Next level stage. 300 | def nextlv(delta) 301 | ' Ticks. 302 | t = t + delta 303 | ' Shows the scene. 304 | if t < 0.5 then 305 | yard(delta, 0, 0) 306 | elseif t < 3 then 307 | if f1.dir = 1 then 308 | f1.res.flip_x(true) 309 | yard(delta, 0, -90) 310 | else 311 | f1.res.flip_x(false) 312 | yard(delta, 0, 90) 313 | endif 314 | text 52, 30, "You Win" 315 | else 316 | lv = lv + 1 317 | if lv > best then best = lv 318 | tmp = recording 319 | recording = recorded 320 | recorded = tmp 321 | tmp = nil 322 | setup() 323 | stage = READY 324 | endif 325 | enddef 326 | 327 | ' Controls a fighter. 328 | def ctrl(fm, fo, delta, act, self) 329 | ' Detects collision. 330 | n = ticks() 331 | def_fol = fo.x + 8 332 | def_fot = fo.y - 28 333 | def_for = fo.x + 24 334 | def_fob = fo.y - 2 335 | if fo.action <> ACT_HURT and n - fo.hurt_timestamp > HURT_COOLDOWN and fm.bullet_remain > 0 then 336 | blt_fml = fm.bx - 6 337 | blt_fmt = fm.by - 6 338 | blt_fmr = fm.bx + 7 339 | blt_fmb = fm.by + 7 340 | if aabb_hit(blt_fml,blt_fmt,blt_fmr,blt_fmb, def_fol,def_fot,def_for,def_fob) then 341 | fm.bullet_remain = 0 342 | fo.hurt_timestamp = n 343 | fo.hp = fo.hp - 1 344 | if fo.hp < 0 then 345 | fo.hp = 0 346 | else 347 | if self then 348 | play(hp1(fo.hp), "HPL", "HPLE", false, true) 349 | else 350 | play(hp0(fo.hp), "HPL", "HPLE", false, true) 351 | endif 352 | endif 353 | if fo.action <> ACT_HURT then 354 | fo.action = ACT_HURT 355 | anim(fo, ACT_HURT, not self) 356 | endif 357 | endif 358 | endif 359 | if fo.action <> ACT_HURT and n - fo.hurt_timestamp > HURT_COOLDOWN and fm.action = ACT_KICK then 360 | atk_fml = fm.x + 8 + fm.dir * 8 361 | atk_fmt = fm.y - 25 362 | atk_fmr = fm.x + 24 + fm.dir * 8 363 | atk_fmb = fm.y - 8 364 | if aabb_hit(atk_fml,atk_fmt,atk_fmr,atk_fmb, def_fol,def_fot,def_for,def_fob) then 365 | fo.hurt_timestamp = n 366 | fo.hp = fo.hp - 1 367 | if fo.hp < 0 then 368 | fo.hp = 0 369 | else 370 | if self then 371 | play(hp1(fo.hp), "HPL", "HPLE", false, true) 372 | else 373 | play(hp0(fo.hp), "HPL", "HPLE", false, true) 374 | endif 375 | endif 376 | if fo.action <> ACT_HURT then 377 | fo.action = ACT_HURT 378 | anim(fo, ACT_HURT, not self) 379 | endif 380 | endif 381 | endif 382 | ' Ticks. 383 | fm.elapsed = fm.elapsed + delta 384 | if fm.action_remain > 0 then 385 | fm.action_remain = fm.action_remain - delta 386 | return 387 | endif 388 | ' Processes mirrored actions. 389 | if act = ACT_LEFT and fm.mirror then 390 | aact = ACT_RIGHT 391 | elseif act = ACT_RIGHT and fm.mirror then 392 | aact = ACT_LEFT 393 | else 394 | aact = act 395 | if act = ACT_KICK then 396 | sfx 5,1860,0.1 397 | elseif act = ACT_SHOOT then 398 | sfx 5,1860,0.1, 5,1060,0.1, 5,1860,0.1, 5,1060,0.1, 5,1860,0.1 399 | elseif act = ACT_JUMP then 400 | sfx 4096+2,660,0.1, 4,860,0.01 401 | endif 402 | endif 403 | ' Plays proper animation. 404 | if fm.action <> aact then 405 | fm.action = aact 406 | anim(fm, aact, self) 407 | endif 408 | ' Makes movement. 409 | d = 0 410 | if aact = ACT_LEFT then 411 | d = -1 412 | fm.dir = -1 413 | elseif aact = ACT_RIGHT then 414 | d = 1 415 | fm.dir = 1 416 | elseif aact = ACT_SHOOT then 417 | if fm.bullet_remain <= 0 then 418 | fm.bullet_remain = BULLET_LIFE 419 | fm.bdir = fm.dir 420 | fm.bx = fm.x + 16 + fm.dir * 20 421 | fm.by = fm.y - 16 422 | endif 423 | elseif aact = ACT_JUMP then 424 | if fm.jump_remain <= 0 then 425 | fm.jump_remain = JUMP_DURATION 426 | endif 427 | endif 428 | if d then 429 | fm.x = fm.x + fm.dir * delta * 50 430 | if fm.x < -12 then 431 | fm.x = -12 432 | if not self then 433 | if act = ACT_LEFT and not fm.mirror then 434 | fm.mirror = not fm.mirror 435 | elseif act = ACT_RIGHT and fm.mirror then 436 | fm.mirror = not fm.mirror 437 | endif 438 | endif 439 | elseif fm.x > 140 then 440 | fm.x = 140 441 | if not self then 442 | if act = ACT_RIGHT and not fm.mirror then 443 | fm.mirror = not fm.mirror 444 | elseif act = ACT_LEFT and fm.mirror then 445 | fm.mirror = not fm.mirror 446 | endif 447 | endif 448 | endif 449 | endif 450 | enddef 451 | 452 | ' Battle stage. 453 | def battle(delta) 454 | ' Shows the scene. 455 | yard(delta, 0, 0) 456 | ' Processes input. 457 | act = ACT_IDLE 458 | if btn(2) and f0.jump_remain <= 0 then ' Up. 459 | act = ACT_JUMP 460 | elseif btn(0) then ' Left. 461 | act = ACT_LEFT 462 | elseif btn(1) then ' Right. 463 | act = ACT_RIGHT 464 | endif 465 | if btnp(4) then ' A. 466 | act = ACT_KICK 467 | elseif btnp(5) then ' B. 468 | act = ACT_SHOOT 469 | endif 470 | ' Controls own fighter, records actions. 471 | ctrl(f0, f1, delta, act, true) 472 | if act <> f0.last_action then 473 | rec = new(record) 474 | rec.action = act 475 | if len(recording) then 476 | rec.leadtime = f0.elapsed 477 | else 478 | rec.leadtime = 0.1 479 | endif 480 | push(recording, rec) 481 | f0.elapsed = 0 482 | f0.last_action = act 483 | endif 484 | ' Controls opposite fighter, plays recorded actions. 485 | act = f1.last_action 486 | l = len(recorded) 487 | if l then 488 | rec = recorded(ppos) 489 | if f1.elapsed >= rec.leadtime then 490 | act = rec.action 491 | if act = ACT_LEFT or act = ACT_RIGHT then 492 | f1.last_action = act 493 | else 494 | f1.last_action = ACT_IDLE 495 | endif 496 | f1.elapsed = 0 497 | ppos = ppos + 1 498 | if ppos >= l then ppos = 0 499 | endif 500 | endif 501 | ctrl(f1, f0, delta, act, false) 502 | ' Checks win or lose. 503 | if f1.hp = 0 and f1.action_remain <= 0 then 504 | t = 0 505 | anim(f0, ACT_WIN, true) 506 | stage = WIN 507 | play "DP", 1, 0, false 508 | elseif f0.hp = 0 and f0.action_remain <= 0 then 509 | t = 0 510 | anim(f1, ACT_WIN, false) 511 | stage = LOSE 512 | play "D8C8= 0.3 and t <= 1 then 527 | text 76, 30, 3 528 | elseif t >= 1.3 and t <= 2 then 529 | text 76, 30, 2 530 | elseif t >= 2.3 and t <= 3 then 531 | text 76, 30, 1 532 | elseif t > 3 and t <= 4 then 533 | text 56, 30, "Fight!" 534 | elseif t > 4 then 535 | sf = false 536 | stage = PLAYING 537 | endif 538 | ' Shows the scene. 539 | yard(delta, 0, 0) 540 | enddef 541 | 542 | ' Title stage. 543 | def title(delta) 544 | ' Runs once. 545 | if not ran then 546 | ran = true 547 | set_orderby(drv, "nil") 548 | f0.res.play("WIN1", "WIN1E", true, true) 549 | spr f0.res, -999, 0 550 | f1.res.play("WIN2", "WIN2E", true, true) 551 | spr f1.res, 999, 0 552 | play "T128 G8 >C8C8 C8C8 C16C16C16C16C16C16C16C16C16C16C16C16C16 1 then 559 | shown = true 560 | d = 1 561 | endif 562 | bx = -138 563 | ex = (160 - 138) / 2 564 | x = bx + (ex - bx) * d 565 | endif 566 | ' Shows visuals. 567 | map battle_bg, 0, 0 568 | map battle_fg, 0, 0 569 | spr f0.res, 10, step_on(108) 570 | spr f1.res, 118, step_on(108) 571 | img title_txt, x, 10 572 | ' Shows tips and accepts input. 573 | if shown then 574 | if t * 2 mod 2 then text 16, 110, "PRESS ANY BUTTON", BLACK 575 | if btnp() or keyp() then 576 | play "P", 0, 0, false 577 | ran = false 578 | shown = false 579 | f0.hp = 3 580 | set_orderby(drv, "map") 581 | setup() 582 | stage = READY 583 | endif 584 | endif 585 | enddef 586 | 587 | ' Enters the main loop. 588 | update_with 589 | ( 590 | drv, 591 | lambda (delta) 592 | ( 593 | if stage = INTRO then 594 | title(delta) 595 | elseif stage = READY then 596 | countdown(delta) 597 | elseif stage = PLAYING then 598 | battle(delta) 599 | elseif stage = WIN then 600 | nextlv(delta) 601 | elseif stage = LOSE or stage = OVER then 602 | gameover(delta) 603 | endif 604 | ) 605 | ) 606 | -------------------------------------------------------------------------------- /examples/Infinity Fighter/content/main.palette: -------------------------------------------------------------------------------- 1 | {"colors":[[0,0,0,0],[29,43,83,255],[0,0,0,255],[0,135,81,255],[171,82,54,255],[95,87,79,255],[194,195,199,255],[255,255,255,255],[237,28,36,255],[255,120,48,255],[255,236,39,255],[0,228,54,255],[41,173,255,255],[246,229,221,255],[255,89,74,255],[255,204,170,255]]} -------------------------------------------------------------------------------- /examples/Infinity Fighter/content/sticker.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/examples/Infinity Fighter/content/sticker.png -------------------------------------------------------------------------------- /examples/Infinity Fighter/content/title_txt.quantized: -------------------------------------------------------------------------------- 1 | {"quantized":{"width":138,"height":50,"depth":4,"data":[0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,12,13,13,13,3,12,1,1,5,5,0,13,13,5,5,13,0,0,0,0,0,6,13,13,13,13,0,0,13,13,5,0,13,5,13,0,13,5,13,0,13,5,13,0,13,13,5,0,13,5,13,0,13,13,0,13,5,13,0,13,5,13,0,13,0,0,0,0,6,13,13,13,13,0,0,13,13,5,0,13,5,13,0,13,0,0,0,6,12,13,13,0,13,13,5,5,0,13,13,5,13,0,13,5,13,0,13,5,13,0,13,0,0,5,13,0,13,13,5,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,5,13,3,13,13,1,1,0,13,12,6,13,12,13,12,13,12,0,0,0,6,12,13,12,13,3,0,0,13,12,13,12,13,12,13,12,13,13,12,13,12,13,12,5,1,13,12,13,12,13,12,13,12,1,0,5,12,13,12,13,12,13,12,6,1,0,0,13,12,13,12,13,3,1,0,13,12,13,12,13,12,13,12,13,1,0,0,6,13,13,12,13,12,13,12,13,12,13,13,12,5,1,3,13,12,13,12,13,12,13,12,5,5,12,13,12,13,13,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,12,13,13,12,13,3,1,0,0,1,13,13,3,13,5,13,13,1,0,0,13,12,5,13,13,3,1,0,0,0,13,13,13,13,5,13,13,3,13,13,13,5,13,5,1,0,1,13,13,13,3,13,13,5,1,0,0,13,13,13,5,13,13,13,3,1,0,0,6,13,3,13,13,1,0,0,0,13,13,13,13,5,13,13,1,0,0,0,0,12,13,13,13,5,13,5,13,13,3,13,13,1,0,1,13,13,13,13,3,13,13,13,13,13,13,13,13,3,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,13,3,13,3,13,1,1,0,0,0,0,13,13,13,3,13,12,5,1,0,13,13,13,13,12,5,1,0,0,0,0,13,3,13,3,13,12,13,13,12,13,3,12,13,1,0,0,0,13,13,3,13,13,3,1,0,0,0,3,13,13,3,13,3,13,1,0,5,12,13,13,13,13,1,1,0,0,0,3,13,3,13,12,13,1,1,0,0,0,0,13,13,3,13,3,13,12,13,13,12,13,1,1,0,0,5,12,5,13,13,13,3,13,3,13,12,5,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,12,13,13,13,13,13,1,0,0,0,0,0,12,13,3,13,13,13,3,1,0,13,12,5,13,3,1,0,0,0,0,0,13,12,13,13,13,1,1,1,1,1,1,5,1,0,0,0,13,3,13,13,12,13,1,0,0,0,0,13,13,12,13,13,12,13,1,0,13,13,3,13,12,1,1,0,0,0,0,13,13,13,13,13,1,1,0,0,0,0,0,0,13,13,13,13,12,5,1,1,1,1,0,0,0,0,0,13,13,3,13,13,13,13,13,12,5,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,13,13,3,13,12,5,1,1,0,0,0,0,6,13,13,13,12,5,13,1,1,13,13,3,13,13,1,1,0,0,0,0,6,13,13,3,13,1,1,0,0,0,1,0,0,0,0,0,1,13,13,12,13,5,1,0,0,0,0,13,12,5,13,3,13,13,1,1,5,13,13,13,12,1,1,0,0,0,0,6,12,5,12,13,3,1,0,0,0,0,0,0,0,12,13,3,13,5,1,0,1,0,0,0,0,0,0,0,3,13,13,12,3,13,12,13,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,12,13,3,13,13,13,1,1,0,0,0,0,6,12,5,3,13,13,13,3,1,5,13,13,13,12,1,1,0,0,0,0,13,12,3,13,13,1,1,0,0,0,0,0,0,0,0,0,0,6,12,5,13,13,1,1,0,0,0,13,13,13,3,13,13,13,3,1,1,13,3,13,12,5,1,0,0,0,0,13,13,13,3,13,1,1,0,0,0,0,0,0,0,6,13,13,12,13,1,1,0,0,0,0,0,0,0,0,0,13,13,13,5,13,13,3,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,13,3,13,13,12,1,1,0,0,0,0,13,13,13,13,13,3,13,12,1,5,13,3,12,13,1,1,0,0,0,0,13,13,13,13,13,12,1,5,5,0,0,0,0,0,0,0,0,6,13,3,13,12,1,1,0,0,0,5,12,13,13,13,13,3,13,5,1,13,13,13,12,5,1,0,0,0,0,13,12,5,13,13,13,1,0,0,0,0,0,0,0,6,12,3,13,13,1,1,0,0,0,0,0,0,0,0,0,0,12,13,3,13,12,5,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,12,5,13,13,12,1,1,0,0,0,0,13,12,13,3,13,12,13,5,13,5,12,13,13,13,3,1,0,0,0,0,13,13,3,13,3,13,5,13,12,13,1,0,0,0,0,0,0,13,12,13,13,13,1,1,0,0,0,0,6,13,3,13,3,13,12,13,13,13,3,13,12,5,1,0,0,0,0,5,13,13,3,12,5,1,0,0,0,0,0,0,0,6,12,5,13,13,1,1,0,0,0,0,0,0,0,0,0,0,13,13,13,13,12,5,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,13,13,13,3,13,5,1,0,0,0,0,5,13,13,3,13,13,5,13,12,5,13,5,13,12,5,1,0,0,0,0,0,12,13,13,13,13,12,5,13,13,1,0,0,0,0,0,0,13,13,13,3,13,3,1,0,0,0,0,6,12,5,13,12,13,13,5,13,3,12,13,13,13,1,1,0,0,0,0,12,13,13,13,13,1,1,0,0,0,0,0,0,13,13,13,13,12,1,1,0,0,0,0,0,0,0,0,0,0,5,13,13,3,13,5,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,12,3,13,3,12,13,1,0,0,0,0,5,12,13,3,13,13,3,13,3,13,13,3,12,13,5,1,0,0,0,0,0,6,13,3,13,12,13,13,12,13,1,1,0,0,0,0,0,13,12,13,3,13,13,1,0,0,0,0,6,12,5,13,13,1,13,3,13,12,13,5,13,12,1,1,0,0,0,0,6,13,3,13,12,1,1,0,0,0,0,0,0,13,12,5,3,13,5,1,0,0,0,0,0,0,0,0,0,0,0,12,13,3,13,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,13,13,13,13,13,13,1,0,0,0,0,0,6,13,13,13,13,1,5,12,13,13,3,13,13,13,1,0,0,0,0,0,6,12,13,13,13,1,1,1,1,1,0,0,0,0,0,0,5,13,5,13,13,12,1,0,0,0,0,13,13,13,13,12,1,1,13,13,13,3,13,13,13,1,1,0,0,0,0,6,12,13,13,13,1,1,0,0,0,0,0,0,5,13,13,13,12,13,1,0,0,0,0,0,0,0,0,0,0,0,6,13,13,13,12,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,12,5,3,13,12,13,1,1,0,0,0,0,12,13,3,13,12,1,1,13,13,3,13,13,12,13,1,1,0,0,0,0,13,13,5,13,12,1,1,0,0,0,0,0,0,0,0,0,0,12,13,13,12,5,1,1,0,0,0,13,12,13,3,13,1,1,5,12,5,13,13,3,12,1,1,0,0,0,0,13,13,5,13,12,1,1,0,0,0,0,0,0,0,12,13,3,13,13,1,1,0,0,0,0,0,0,0,0,0,0,6,12,5,12,13,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,13,13,13,13,13,13,1,1,0,0,0,0,6,13,13,13,13,1,1,5,13,13,13,3,13,13,1,1,0,0,0,0,13,12,13,3,13,5,1,0,0,0,0,0,0,0,0,0,0,6,13,3,13,13,1,1,0,0,0,13,13,13,3,13,13,1,1,13,13,3,13,12,13,5,1,0,0,0,0,13,12,5,12,13,3,1,0,0,0,0,0,0,0,6,13,13,13,12,1,1,0,0,0,0,0,0,0,0,0,0,13,13,13,3,13,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,13,3,13,3,12,1,1,0,0,0,0,13,13,3,13,12,1,1,0,13,3,13,12,13,13,1,1,0,0,0,0,5,13,13,13,12,5,1,0,0,0,0,0,0,0,0,0,0,6,12,5,13,12,1,1,0,0,0,5,12,5,13,13,13,1,0,13,3,13,13,13,13,3,1,0,0,0,0,5,13,13,3,13,5,1,0,0,0,0,0,0,0,6,12,5,12,13,1,1,0,0,0,0,0,0,0,0,0,0,13,12,5,13,12,5,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,13,13,13,13,12,5,1,0,0,0,0,13,13,12,13,13,5,1,0,5,12,13,13,1,13,3,1,0,0,0,0,0,12,13,3,13,13,1,0,0,0,0,0,0,0,0,0,0,13,13,5,12,13,5,1,0,0,0,0,6,13,3,13,12,1,0,1,13,13,13,3,12,5,1,0,0,0,0,0,12,13,13,13,13,1,1,0,0,0,0,0,0,13,13,13,3,13,1,1,0,0,0,0,0,0,0,0,0,0,5,13,13,3,13,13,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,12,5,12,5,12,5,1,0,0,0,0,5,12,5,13,13,3,1,0,0,13,13,3,13,12,5,1,0,0,0,0,0,6,13,13,13,12,1,1,0,0,0,0,0,0,0,0,0,13,12,13,13,13,3,1,0,0,0,0,6,12,5,13,12,1,1,0,13,13,3,13,13,13,1,1,0,0,0,0,6,13,13,3,12,1,1,0,0,0,0,0,0,13,12,13,3,13,13,1,0,0,0,0,0,0,0,0,0,0,0,12,13,13,12,13,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,12,13,13,13,13,5,1,0,0,0,0,5,12,13,13,12,13,1,1,0,13,12,13,13,13,13,1,0,0,0,0,0,6,12,13,12,13,1,1,0,0,0,0,0,0,0,0,0,13,13,13,3,12,5,1,0,0,0,0,6,12,5,12,13,1,1,0,0,12,13,13,12,13,1,1,0,0,0,0,6,12,13,12,13,1,1,0,0,0,0,0,0,13,13,13,13,12,13,1,0,0,0,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5,1,1,0,1,0,1,0,1,0,1,13,13,12,13,3,12,13,12,5,0,1,12,13,3,13,13,12,13,13,13,13,12,13,13,12,13,1,1,12,13,13,12,13,3,12,13,1,5,12,13,3,12,13,1,0,0,12,13,13,13,13,12,13,12,13,12,13,12,13,3,1,13,12,13,13,12,13,12,13,3,12,13,13,12,13,12,1,0,0,3,12,13,13,13,13,12,13,13,12,13,3,12,13,12,13,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,13,5,3,13,13,13,1,0,0,0,0,0,0,0,0,0,0,1,13,3,13,13,13,13,1,1,0,0,13,13,13,12,5,13,3,13,3,13,13,3,13,3,1,0,0,5,13,3,13,13,13,13,1,1,13,5,13,13,13,1,0,0,0,5,12,13,3,13,5,13,3,13,5,3,13,5,1,0,1,13,3,13,3,13,5,13,13,13,3,13,3,13,5,1,0,0,0,5,13,3,13,3,13,3,13,3,13,13,13,13,13,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,13,13,13,13,12,5,1,0,0,0,0,0,0,0,0,0,0,0,0,13,13,13,3,13,3,1,0,0,0,1,13,3,13,13,13,13,12,13,13,12,13,13,1,1,0,0,1,13,13,3,13,12,1,1,5,13,3,12,13,1,1,0,0,0,0,13,13,13,12,5,13,13,13,12,13,13,1,0,0,0,13,13,13,13,13,12,13,3,13,13,12,13,5,1,0,0,0,0,0,12,13,13,13,13,13,13,13,13,3,13,13,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,13,3,13,3,13,13,1,1,1,0,13,0,0,0,0,0,0,0,0,0,12,13,13,13,13,1,0,0,0,0,13,13,13,13,12,1,1,1,1,1,1,1,1,0,0,0,0,13,12,13,13,13,1,1,5,13,12,13,13,1,1,0,0,0,0,0,0,13,3,13,13,12,1,1,1,1,1,0,0,0,0,13,3,13,12,5,1,1,1,1,1,1,1,1,0,0,0,0,0,13,13,13,3,12,1,1,3,13,12,13,12,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,12,13,13,13,13,12,5,13,13,13,6,1,0,0,0,0,0,0,0,0,6,13,3,13,12,1,1,0,0,0,13,12,3,13,13,3,1,0,0,0,0,0,0,0,0,0,0,13,13,3,13,12,1,1,5,13,3,13,13,1,1,0,0,0,0,0,0,3,13,13,13,12,5,1,0,0,0,0,0,0,0,6,12,13,13,13,1,1,0,0,0,0,0,0,0,0,0,0,0,13,13,13,3,13,5,1,1,13,13,5,13,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,13,3,13,3,13,13,3,13,12,13,3,1,0,0,0,0,0,0,0,6,12,13,13,13,1,1,0,0,0,5,13,13,13,12,5,1,0,0,0,0,0,0,0,0,0,0,13,13,13,13,13,1,1,1,13,13,13,12,1,1,0,0,0,0,0,0,13,12,13,13,3,13,1,0,0,0,0,0,0,0,12,13,5,13,3,1,1,0,0,0,0,0,0,0,0,0,0,0,5,12,13,3,13,13,1,1,13,13,3,12,5,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,12,13,13,13,13,3,13,13,13,13,3,1,0,0,0,0,0,0,0,13,13,13,3,13,3,1,0,0,0,5,12,13,3,13,5,1,1,5,5,5,13,0,0,0,0,0,0,12,13,3,13,3,5,5,13,3,13,13,3,1,0,0,0,0,0,0,0,6,13,3,13,13,1,1,0,0,0,0,0,0,13,13,13,13,12,5,1,5,5,13,0,0,0,0,0,0,0,0,0,6,5,13,13,12,1,5,13,13,3,13,13,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,13,5,13,3,13,12,13,12,13,12,1,1,0,0,0,0,0,0,0,13,12,13,3,13,5,1,0,0,0,0,6,13,13,13,12,1,1,13,13,12,13,12,1,0,0,0,0,6,13,13,13,12,13,13,12,13,13,12,5,1,0,0,0,0,0,0,0,6,12,13,13,12,1,1,0,0,0,0,0,0,13,13,13,3,13,5,13,13,12,13,1,0,0,0,0,0,0,0,0,6,12,13,3,13,13,13,13,3,13,12,13,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,13,13,13,3,13,13,1,1,1,1,5,1,0,0,0,0,0,0,0,13,13,13,3,13,13,1,0,0,0,0,6,12,5,12,13,1,1,5,13,3,13,13,1,0,0,0,0,6,12,5,12,5,5,13,3,13,3,13,13,1,1,0,0,0,0,0,0,6,12,5,13,13,1,1,0,0,0,0,0,0,5,12,5,12,13,13,12,5,13,13,3,1,0,0,0,0,0,0,0,6,13,3,13,13,13,3,13,12,13,13,5,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,13,13,3,13,12,13,1,1,0,0,1,0,0,0,0,0,0,0,0,5,12,5,13,13,12,1,0,0,0,0,6,13,3,13,13,1,1,5,13,13,13,12,1,1,0,0,0,6,13,13,3,13,13,12,5,13,13,13,12,1,1,0,0,0,0,0,0,13,13,3,13,12,3,1,0,0,0,0,0,0,0,6,13,13,5,13,3,13,12,13,3,1,0,0,0,0,0,0,0,13,12,13,13,13,3,13,12,5,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,5,12,5,12,13,13,13,1,1,0,0,0,0,0,0,0,0,0,0,0,0,13,13,13,12,5,1,1,0,0,0,13,12,5,13,12,1,1,5,13,3,12,13,1,1,0,0,0,13,12,5,13,12,1,1,5,13,12,5,13,1,1,0,0,0,0,0,0,13,12,13,13,13,5,1,0,0,0,0,0,0,0,6,12,5,12,13,1,1,1,1,1,1,0,0,0,0,0,0,0,13,13,13,3,13,3,13,13,13,1,1,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,13,3,13,13,13,1,1,0,0,0,0,0,0,0,0,0,0,0,0,6,12,5,13,13,1,1,0,0,0,13,13,5,12,13,5,1,1,13,13,13,13,1,1,0,0,0,13,13,13,3,13,5,1,1,13,3,13,12,1,1,0,0,0,0,0,0,5,13,13,3,13,3,1,0,0,0,0,0,0,0,6,13,3,13,13,1,1,0,0,0,0,0,0,0,0,0,0,0,13,13,3,13,13,13,12,13,3,12,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,6,12,5,13,13,12,1,1,0,0,0,0,0,0,0,0,0,0,0,0,6,13,13,3,12,1,1,0,0,0,5,12,5,13,13,3,1,1,13,3,13,12,5,1,0,0,0,5,12,5,13,12,5,1,1,13,13,13,13,5,1,0,0,0,0,0,0,0,12,13,13,13,12,1,1,0,0,0,0,0,0,13,12,13,13,13,1,1,0,0,0,0,0,0,0,0,0,0,0,0,12,13,13,12,5,13,3,13,13,13,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,12,13,5,13,3,13,5,1,0,0,0,0,0,0,0,0,0,0,0,0,13,12,5,12,13,5,1,0,0,0,0,13,13,13,3,13,1,5,13,13,13,13,3,1,0,0,0,0,6,13,3,13,13,1,1,13,3,13,12,5,1,0,0,0,0,0,0,0,6,13,13,3,13,1,1,0,0,0,0,0,0,13,13,3,13,3,13,3,1,5,5,1,13,0,0,0,0,0,0,0,6,13,3,13,13,3,13,13,13,12,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,13,13,13,13,12,13,13,1,0,0,0,0,0,0,0,0,0,0,0,0,13,13,13,3,13,5,1,0,0,0,0,6,12,5,12,13,13,13,12,5,13,12,5,1,0,0,0,0,6,12,5,13,12,1,1,5,13,13,13,3,1,0,0,0,0,0,0,0,6,12,5,12,13,1,1,0,0,0,0,0,0,5,12,13,13,13,13,13,13,13,12,13,12,13,1,0,0,0,0,0,6,12,13,13,13,1,13,12,5,13,13,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0]}} -------------------------------------------------------------------------------- /favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/favicon.ico -------------------------------------------------------------------------------- /pages/about.md: -------------------------------------------------------------------------------- 1 | ## About 2 | 3 | Call me Tony Wang, or just Tony. I used to develop video games in big companies for quite a bit of time, and also developed some indie games. Eventually I found myself doing significantly successful at two kind of things: making unsuccessful indie games, and making game development tools. So I decided to put efforts on the latter, then made BASIC8, everything here begins from that day, hope you enjoy it as much as I do creating it. 4 | 5 | ### Built with 6 | 7 | * CML [https://github.com/demianmnave/CML/](https://github.com/demianmnave/CML/) 8 | * ImGui [https://github.com/ocornut/imgui/](https://github.com/ocornut/imgui/) 9 | * jo_gif [https://www.jonolick.com/home/gif-writer/](https://www.jonolick.com/home/gif-writer/) 10 | * libcurl [https://curl.haxx.se/libcurl/](https://curl.haxx.se/libcurl/) 11 | * libtsf [https://github.com/paladin-t/libtsf/](https://github.com/paladin-t/libtsf/) 12 | * md4c [https://github.com/mity/md4c/](https://github.com/mity/md4c/) 13 | * Mongoose [https://github.com/cesanta/mongoose/](https://github.com/cesanta/mongoose/) 14 | * MY-BASIC [https://github.com/paladin-t/my_basic/](https://github.com/paladin-t/my_basic/) 15 | * RapidJSON [https://github.com/Tencent/rapidjson/](https://github.com/Tencent/rapidjson/) 16 | * SDL [https://www.libsdl.org/](https://www.libsdl.org/) 17 | * SQLite [https://sqlite.org/](https://sqlite.org/) 18 | * stb [https://github.com/nothings/stb/](https://github.com/nothings/stb/) 19 | * zlib [https://zlib.net/](https://zlib.net/) 20 | 21 |
22 | 23 | Email: 24 | 25 | ![](imgs/mailto.png) 26 | -------------------------------------------------------------------------------- /pages/gallery.md: -------------------------------------------------------------------------------- 1 | ## Gallery 2 | 3 | Create sprites: 4 | 5 | ![](imgs/creating_sprites.png) 6 | 7 | Create maps: 8 | 9 | ![](imgs/creating_maps.png) 10 | 11 | Import and edit quantize images: 12 | 13 | ![](imgs/creating_images.png) 14 | 15 | Write programs in BASIC, compose music, sound effects and speech: 16 | 17 | ![](imgs/writing_programs.png) 18 | 19 | Then mix all your work into a playable game, or a decent program: 20 | 21 | ![](imgs/playable_now.png) 22 | 23 | Create, edit, import, export, and play sharable disks in an integrated environment: 24 | 25 | ![](imgs/integrated.png) 26 | 27 | ![](imgs/more_disks1.png) 28 | 29 | ![](imgs/more_disks2.png) 30 | -------------------------------------------------------------------------------- /pages/imgs/app.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/pages/imgs/app.png -------------------------------------------------------------------------------- /pages/imgs/banner_platforms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/pages/imgs/banner_platforms.png -------------------------------------------------------------------------------- /pages/imgs/boing_ball.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/pages/imgs/boing_ball.gif -------------------------------------------------------------------------------- /pages/imgs/cosmos_saga.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/pages/imgs/cosmos_saga.gif -------------------------------------------------------------------------------- /pages/imgs/creating_images.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/pages/imgs/creating_images.png -------------------------------------------------------------------------------- /pages/imgs/creating_maps.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/pages/imgs/creating_maps.png -------------------------------------------------------------------------------- /pages/imgs/creating_sprites.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/pages/imgs/creating_sprites.png -------------------------------------------------------------------------------- /pages/imgs/infinity_fighter.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/pages/imgs/infinity_fighter.gif -------------------------------------------------------------------------------- /pages/imgs/integrated.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/pages/imgs/integrated.png -------------------------------------------------------------------------------- /pages/imgs/mailto.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/pages/imgs/mailto.png -------------------------------------------------------------------------------- /pages/imgs/more_disks1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/pages/imgs/more_disks1.png -------------------------------------------------------------------------------- /pages/imgs/more_disks2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/pages/imgs/more_disks2.png -------------------------------------------------------------------------------- /pages/imgs/on_steam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/pages/imgs/on_steam.png -------------------------------------------------------------------------------- /pages/imgs/playable_now.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/pages/imgs/playable_now.png -------------------------------------------------------------------------------- /pages/imgs/steam.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/pages/imgs/steam.png -------------------------------------------------------------------------------- /pages/imgs/tools.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/pages/imgs/tools.png -------------------------------------------------------------------------------- /pages/imgs/writing_programs.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/paladin-t/b8/f025e2555aac7afced7321419cee2619a17603e6/pages/imgs/writing_programs.png -------------------------------------------------------------------------------- /pages/why.md: -------------------------------------------------------------------------------- 1 | ## Why BASIC8? 2 | 3 | There are several fantasy computers/consoles coming up these days, it is possible to program, play and share games and other programs in a retro fashion again. And BASIC8 embraces modern standard to be a simple yet efficient tool. 4 | 5 | BASIC8 is different from existing fantasy computers. It's designed by thinking of three aspects: how it looks and sounds, how it works, and how it speaks to a human. I'm not willing to make everything strictly retro, instead I prefer to make it retro at appearance, simple to work with, and fun to play with. I hope BASIC8 brings the fun back, as straightforward coding and playing after a home computer bootup. 6 | 7 | ### BASIC vs. Lua 8 | 9 | Lua is nice, it fits well in particular fields. BASIC8 offers both retro BASIC syntax, and modern concepts. You would find BASIC8 easy to learn regardless you are experienced with programming or not. Overall it's great to introduce BASIC to the fantasy computer genre, since BASIC is significant to me. 10 | 11 | ### No RAM, VRAM or ROM mapping 12 | 13 | Most of the other fantasy computers manage memory in static layouts, where you can access its content by "PEEK" and "POKE"; or even directly map from ROM to runtime space. It makes simple for loading, but brings an extra abstraction layer of particular (virtual) hardware. I'd prefer to be able to do everything in a generic way, not go so far as programming with puzzle-like address. 14 | 15 | ### 160x128 display 16 | 17 | It's a reasonable resolution because: 18 | 19 | * Neither too small to represent sufficient visuals 20 | * Nor too big, or requires more work of contents to fill it 21 | * Can make exact divisions by 8, 16, 32 at both dimensions, good for arranging graphics 22 | * Is approximate to 4:3 23 | * Is a common to see resolution of electronic display components 24 | 25 | ### GUI 26 | 27 | PalmOS is a good model of stylus based GUI. It is my favourite mobile OS. I make the GUI of BASIC8 with an ideal combination of PalmOS, AmigaOS, and a part of my own idea. The goal is to make it possible to do most of the operations (except for coding) by mouse/touch; moreover to make it friendly to modern touch screens. 28 | 29 | ### BASIC8 vs. open source engines 30 | 31 | The major difference is, open source graphics libraries and engines come with none or few limitation or toolchain, for deep customization. BASIC8 and other fantasy computers have limitations and a number of built-in editors, that makes it possible focusing on what we want to express, other than thinking about how to build fundamental facilities from zero. Besides, you'll find it easier to communicate and share with others with the same specifications. 32 | 33 | ### BASIC8 vs. Unity3D 34 | 35 | I've used Unity3D and Unreal for work. Quite differently BASIC8 was not intending and would never be giant. It's just something meaningful that I can keep iterating and polishing for long. 36 | -------------------------------------------------------------------------------- /vars/urls.txt: -------------------------------------------------------------------------------- 1 | Discover = 2 | Workshop = https://steamcommunity.com/app/767240/workshop/ 3 | Artwork = https://steamcommunity.com/app/767240/images/ 4 | Screenshots = https://steamcommunity.com/app/767240/screenshots/ 5 | = end 6 | Forums = 7 | General Discussions = https://steamcommunity.com/app/767240/discussions/4/ 8 | Help Wanted = https://steamcommunity.com/app/767240/discussions/7/ 9 | Workshop Discussions = https://steamcommunity.com/workshop/discussions/18446744073709551615/?appid=767240 10 | = end 11 | Utilities = 12 | Player Maker = https://steamcommunity.com/sharedfiles/filedetails/?id=1328727512 13 | HTML Maker = https://steamcommunity.com/sharedfiles/filedetails/?id=1391948686 14 | Wave Maker = https://steamcommunity.com/sharedfiles/filedetails/?id=1352790993 15 | Plugins = https://github.com/paladin-t/b8.plugins 16 | = end 17 | Learning = https://steamcommunity.com/app/767240/discussions/4/1696040635922300967/ 18 | Chat on Discord (#basic8, FC 2.0) = https://discord.gg/jcT9CXDgHB 19 | --------------------------------------------------------------------------------