bash-pac v1.2.0
bash-pac » Devlog




new update componets
Here's a breakdown of its components:
- Animation Function (
display_animation): This function displays a brief animation of the characters "G" and "C" moving towards each other. It clears the screen and prints "G C", then pauses for a short duration before gradually moving the characters closer together until they merge into "GC". - Game Logic Function (
start_game): This function initializes the game variables, defines the game board layout, and implements the game logic. Key functionalities include:- Moving the player character ("C") using the "WASD" keys.
- Moving the ghost character ("G") towards the player.
- Collecting food (".") to increase the score.
- Detecting collisions between the player and the ghost.
- Detecting when all food items are collected to end the game with victory.
- Offering options to restart or exit the game when the player loses.
- Helper Functions:
print_board: Prints the current game board.is_valid_position: Checks if a given position is valid on the board.spawn_ghostsandspawn_food: Randomly place ghosts and food on the board.game_over_with_timerandgame_over_with_victory: Display game over messages and handle player input.reset_game: Resets the game state for a new playthrough.display_help: Displays game instructions and controls.
- Main Menu Function (
main_menu): This function displays the main menu with options to start the game, display help, or exit. - Miscellaneous:
- The script utilizes loops to continuously update the game state and respond to user input.
- It clears the screen before printing each frame to create a smooth display.
Files
bash-pac v1.2.0.zip 2.9 kB
Apr 21, 2024
Get bash-pac
bash-pac
About bash-pac is an "clone of pacman" that is writen in bash
| Status | Released |
| Author | stuff by max |
| Genre | Action |
| Tags | Arcade, Open Source, Retro, Text based |
| Languages | Czech, English |
| Accessibility | Color-blind friendly |
Leave a comment
Log in with itch.io to leave a comment.