Free games for graphing calculators: NumWorks, TI-Nspire CX, Casio fx-CG50 and soon TI-84 Plus CE. Balatro, Celeste, Hollow Knight, Minecraft and more.
C calculatorcalculator-gamescasiochesscrossy-roaddrive-madfx-cg50gamesgeometry-dashgraphing-calculatorndlessnumworksnumworks-appsnumworks-calculatornumworks-gamenumworks-gamestetristi-84-plus-ceti-nspire
Famidash: the collision map keeps the NES's pace with the decoder ahead, and the tower levels say Left and Right walk
Mason363c8a07c7fddb5
diff --git a/games/famidash/src/fd.h b/games/famidash/src/fd.hindex 34f2c495..5a509e5d 100644--- a/games/famidash/src/fd.h+++ b/games/famidash/src/fd.h@@ -67,6 +67,7 @@ void game_begin(void); /* level chosen: attempts from 1 */void game_start(void); /* state_game's set up and reset_level */void game_step(void); /* one frame of play (everything_else) */bool game_dead(void); /* cube_data says the player died this frame */+bool game_platformer(void); /* Left and Right walk (the tower levels, or the fun setting) */void game_death_frame(int f); /* the 30 frames of the explosion */void game_reset(void); /* reset_level (after the fade) */void game_draw(void); /* draw_sprites into the sprite list */diff --git a/games/famidash/src/game.c b/games/famidash/src/game.cindex faf6cbaa..d9ae06f2 100644--- a/games/famidash/src/game.c+++ b/games/famidash/src/game.c@@ -283,10 +283,11 @@ static void draw_screen(void) {drawing_frame = drawing_frame == 1 ? 2 : 0;return;}- if ((uint8_t)((scroll_x & 0xFF) >> 4) == rld_column) {+ /* (rld_column is the count of columns put in the map, mod 16: the decoder may have run ahead of it for+ * the wider screen) */+ if ((uint8_t)((scroll_x & 0xFF) >> 4) == (uint8_t)(coll_cols & 0x0F)) {decode_to(coll_cols + 1);coll_cols++;- rld_column = (uint8_t)(coll_cols & 0x0F);drawing_frame = 1;}}@@ -2535,6 +2536,7 @@ void game_step(void) {if (!(high_byte(player_relx[0]) > 0x20)) cube_data[0] = cube_data[1] = 0;}+bool game_platformer(void) { return force_platformer || (options & platformer); }bool game_dead(void) { return high_byte(player_relx[0]) > 0x20 && (cube_data[0] & 1 || cube_data[1] & 1); }/* ---------------------------------------------------------------- sprites: draw_sprites and the player */diff --git a/games/famidash/src/main.c b/games/famidash/src/main.cindex 97f79068..ed1501ef 100644--- a/games/famidash/src/main.c+++ b/games/famidash/src/main.c@@ -579,7 +579,9 @@ static void attempt_text(void) {if (x + 15 * 8 > sx + 256 + 32) text_n = 0;}+static uint32_t level_frame; /* when the level was chosen */static void play_start(void) {+ if (attemptCounter[0] + attemptCounter[1] + attemptCounter[2] == 0) level_frame = frame;game_start();attempt_text();phase = P_FADEIN, phase_t = 0;@@ -988,8 +990,8 @@ static const char *const help_lines[2][7] = {"Pads and portals act on their own:", "they change your gravity, speed, size and mode.", "Three coins hide in every level."},{"Back pauses: Resume, Practice, Quit game.", "Practice mode puts checkpoints down for you.","In practice: Down places one, backspace removes", "the last one. Coins don't count there.",- "On the title screen: Play has the 27 main levels,", "the right button the 18 community levels.",- "Beat the first 13 levels for the fun settings."}};+ "Play has the 27 main levels, the button on its right", "the 18 community levels. In the tower levels,",+ "walk with Left and Right. Beat the first 13 levels for the fun settings."}};static void scene(void *ctx) {(void)ctx;@@ -1018,7 +1020,8 @@ static void scene(void *ctx) {keyline("Up Down: choose OK: go Back: resume");} else if (practice_point_count && phase == P_RUN) {if (frame < (uint32_t)auto_cp_seen + 240) keyline("Practice: Down places a checkpoint, backspace removes one");- } else if (!(sv.flags & 2) && phase == P_RUN) keyline("OK, EXE or Up: jump (hold to keep jumping) Back: pause");+ } else if (game_platformer() && frame < level_frame + 300) keyline("Left Right: walk OK: jump Back: pause");+ else if (!(sv.flags & 2) && phase == P_RUN) keyline("OK, EXE or Up: jump (hold to keep jumping) Back: pause");break;}}