Читать книгу Raspberry Pi For Dummies - McManus Sean, Evans Jonathan, Sean McManus - Страница 69
Playing the Games
ОглавлениеA number of games are included in Raspberry Pi OS. You’ll find them all in the Games section of the Applications menu. Here’s a quick roundup:
Boing!: This is a version of Pong, a bit like digital tennis. Two players bounce a ball, left and right, between them. If one player misses, the other player scores a point. If you play alone, your bat is on the left. You can choose one or two players on the start screen using the arrow keys. Press the Spacebar to start the game or get back to the menu when it ends. Player 1 (left) uses the A and Z or Up and Down keys to move. Player 2 (right) uses the K and M keys. The computer can be your Player 2. The first player to score 10 points wins.
Bunner: This a clone of Frogger, where your challenge is to move safely up the screen, dodging traffic and crossing rivers by leaping onto logs. Press the Spacebar to start the game and get back to the title screen at the end, and press the arrow keys to move.
Cavern (see Figure 4-10): This game is inspired by Bubble Bobble, another classic from the ’80s. Move your monkey character with the arrow keys, avoiding the robots. Use the Spacebar to fire a bubble to entrap the robots, as you zip around collecting fruit. When you fall off the bottom of the screen, you come back at the top.
Minecraft Pi: See Chapter 13 for information on playing and programming this game.
Myriapod: Use the arrow keys to move and the Spacebar to fire in this Centipede clone. Your gun is at the bottom of the screen. Your aim is to shoot and destroy the centipede that crawls down the screen and to avoid getting hit by the fly, which you can also zap. Destroy rocks to make it easier to shoot the centipede. We use a screen resolution of 1,024 x 768 usually, but we had to change it to 1,152 x 864 to see the whole game arena.
Substitute Soccer: This football game has three difficulty levels. Move using the arrow keys and Spacebar to pass or shoot. If you have a friend over, they can play using the W, A, S, and D keys to move and the left Shift key to pass/shoot. A triangle above a player shows which one is active.
These games were coded by Raspberry Pi cofounder Eben Upton, and come from the book Code the Classics, Volume 1. Find it in the Bookshelf app.
There is also an entry called Python Games, which gives you access to 12 further games, written by Al Sweigart. Click a game to select it. The games are as follows:
Flippy: A version of Reversi. Click to place your counter. Any counters in a line between your new counter and any of your other counters will switch to your color. The winner is the one with the most counters in their color.
Four in a Row: Click and drag the pieces to drop them into the frame. The winner is the first to get four pieces in a row, in any direction. The computer AI is pretty smart!Raspberry Pi FoundationFIGURE 4-10: Cavern, one of the games in Raspberry Pi OS.
Gemgem: In this game, there’s a grid of gems. You can swap any two neighboring gems to make a row of three, which then disappear. Use the mouse to click the two gems you want to swap. It’s against the clock. Achieving a row of three extends your time.
Inkspill: This is a favorite of Sean’s. You have a grid of colored squares. Starting at the top left, you change the color of the ink. Any squares of the same color that are touching the square join your ink spill, making it bigger. The idea is to keep changing colors to try to fill the screen with a single color.
Memory Puzzle: This is a version of Pairs or Concentration, a classic card game. You click a card to turn it over, and then click another card to see if they match. Your aim is to pair up all the cards.
Pentomino: This version of Tetris uses the arrow keys to move the blocks and the Q key to rotate them. The aim is to stop the blocks from piling up to the top of the screen. When you complete a row, it disappears. This game has some different tile designs from the original game.
Simulate: This game is a pattern repeating one. Click the panels to repeat the sequence that’s played to you.
Slide Puzzle: This sliding puzzle game uses the arrow keys or mouse to move tiles. Can you unscramble the puzzle?
Squirrel: Your aim is to eat the smaller squirrels, while avoiding the bigger ones. Each time you eat, you grow. Move using the arrow keys.
Starpusher: This puzzle game starts easy but gets harder. The game challenges you to move stars onto the target spaces on the floor. You’ll need to think clearly to avoid getting any stuck in corners. Arrow keys move your character, and you’ll probably need to use the Backspace key to restart the level sometimes.
Tetromino: This game is like Tetris with the original tile designs. Arrow keys move the pieces and the Q key rotates them.
Wormy: This version of the classic mobile phone game Snake uses the arrow keys to move the snake. The aim is to eat the red blocks, without bumping into your own tail or the edge of the screen. Each time you eat, you grow, so the game gets harder and harder.