Skip to content

Latest commit

 

History

History
31 lines (11 loc) · 3 KB

Challenges 91-100.md

File metadata and controls

31 lines (11 loc) · 3 KB

Challenges 91-100: "Anyone seen Fury?"

  1. Give your calculator a programmer's mode. BIN should put the calculator into binary mode. Any number of the screen should be converted into binary. The number buttons should be limited to 0 and 1 but otherwise all other functions should operate as normal. Answers should be displayed in binary. Switching back to DEC mode will cause the binary display to be converted to denary and the other number buttons to appear / be activated.

  2. Now add a HEX mode to your calculator. You'll need extra buttons for A, B, C, D, E and F. As with the binary mode, any number displayed should be converted to hexadecimal. Switching from HEX to BIN should convert the hexadecimal number to binary. It should be possible to switch from any mode to any other and get the current display shown in that number base.

  3. Tank driver. Write a program using a graphical framework such as PyGame. Draw a circle which can be guided by the player by pressing the left/right keys to change direction and the up/down keys to change speed. The tank cannot go off the sides of the screen. Make it so that it is clear what the front of the tank it.

  4. Tank bullet. You have a program to let you guide a tank around the screen. Now make it so that when you press the space bar a bullet is fired from the tank. The bullet should last for approx 10 seconds. It should bounce of any edges. Add obstacles to the game. The tank cannot go through the obstacles and bullets should bounce off them.

  5. Tank battle. Add a second tank to your tank program. Both tanks should behave in the same way - but you must be able to tell them apart. If a tank is hit by a bullet (its own or the other tanks) then it should be destroyed. Include a health guage for each tank. When the guage gets to zero the tank loses a life. When the lives get to zero for either tank that player loses the game.

  6. Tank power. Amend the tank game so that power up appear randomly on the screen. Collecting power ups give that player advantages. Examples of power ups could include: extra speed, bullets last longer, invincibility (for a limited time), teleport, stop the other player being able to fire bullets or making the other player (and/or their bullets) slow down (temporarily).

  7. Animated Sprite: Find a sprite map on the internet. Write a program to show each frame of the sprite in turn. The animation should repeat.

  8. Write some code to allow the user to guide an animated sprite around the screen. The sprite should change depending on the direction it is moving (you can limit it to N, E, S and W only) and should also have a resting animation. You can make the sprites yourself or get hold of a sprite map from the web.

  9. PacMan. Write a PacMan clone.

  10. 3D flying simulation. Write a program in which the player is flying through a 3D space. They should be able to see obstacles coming towards them and should turn left or right to avoid them. The obstacles should grow as they get closer and be convincing. They can be simple geometric shapes.