1 / 8

Microsoft ® Small Basic

Microsoft ® Small Basic. Advanced Games. Estimated time to complete this lesson : 1 hour. Advanced Games. In this lesson, you will learn how to:. Create advanced games by using basic elements, objects, and other advanced concepts of Small Basic. Advanced Games in Small Basic .

garima
Download Presentation

Microsoft ® Small Basic

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Microsoft® Small Basic Advanced Games Estimated time to complete this lesson: 1 hour

  2. Advanced Games In this lesson, you will learn how to: Create advanced games by using basic elements, objects, and other advanced concepts of Small Basic.

  3. Advanced Games in Small Basic Let’s see how we can use all these concepts to create advanced games. Congratulations! You are now well acquainted with programming fundamentals and advanced concepts of Small Basic. You have learned to use basic programming concepts in Small Basic. You have also been introduced to Small Basic objects and advanced concepts.

  4. Tic-Tac-Toe – The Game You are probably familiar with the popular Tic-Tac-Toe game. Let’s see how we can create our own version of this game. Notice how you use the Shapes object to draw various game elements. You use mouse events to enable the user to place Xs in the graphics window. The user and the computer try to win the game by placing Xs or Os in a horizontal, vertical, or diagonal row before the other player does.

  5. Tic-Tac-Toe – How to Play So how do you play this game? • Steps to play the game: • This game involves two players: the user and the computer. Each player takes a turn placing an X or an O in the 3x3 playing area. To start the game, the user places an X on the board. • The players alternate placing Xs or Os on the playing area. • The player who first places three Xs or three Os in a horizontal, vertical, or diagonal line wins the game.

  6. Tic-Tac-Toe – The Code Now let’s understand the code for the game in detail… • Create the game interface by using the GraphicsWindow object. • Use the Shapes object to create the playing area for the Xs and Os in the graphics window. • Use mouse events and conditions such as If-Else to describe various actions that the user and the computer perform during the game.

  7. Let’s Summarize… Congratulations! Now you know how to: • Create advanced games by using basic elements, objects, and advanced concepts of Small Basic.

  8. Show What You Know Create a game that involves the following objects: a wall of colored and grey blocks, a ball, and a paddle. The wall slowly moves down toward the paddle. Using the paddle, you must hit all the colored blocks with the ball before the wall hits the paddle. You use the mouse to move the paddle; the paddle controls the movement of the ball. The ball will bounce off grey blocks. After you hit all the colored blocks, you win the game. You lose the game if the paddle misses the ball or if the blocks hit the paddle before you can remove all the colored blocks.

More Related