SlideShare a Scribd company logo
1 of 8
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  Let’s see how we can use all these concepts in Small Basic to create advanced games. Congratulations! You are now well acquainted with programming fundamentals as well as 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.
Tic-Tac-Toe – The Game You are familiar with the popular Tic-Tac-Toe game. Let’s see how we can create a Small Basic version of this popular game. Notice how you use the Shapes object to draw various game elements. You use mouse events to enable the user to place Xs on 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 does.
Tic-Tac-Toe – How to Play So how do you play this game? Steps to play the game: ,[object Object]
The players alternately place Xs and Os and on the playing area.
The player who first places three Xs or three Os in a horizontal, vertical, or diagonal line wins the game.,[object Object]
Use the Shapes object to create the playing area for the Xs and Os on the graphics window.

More Related Content

What's hot

Computer Coding with Scratch: Lesson 2_primaryschoollessons
Computer Coding with Scratch: Lesson 2_primaryschoollessonsComputer Coding with Scratch: Lesson 2_primaryschoollessons
Computer Coding with Scratch: Lesson 2_primaryschoollessonsSeniorInfants
 
Programming in scratch
Programming in scratchProgramming in scratch
Programming in scratchHussam Mostafa
 
Coding Basics with Scratch
Coding Basics with ScratchCoding Basics with Scratch
Coding Basics with ScratchNicole Baratta
 
Scratch programming introduction to game creation
Scratch programming  introduction to game creationScratch programming  introduction to game creation
Scratch programming introduction to game creationAnkita Shirke
 
Scratch Lesson 1 – Basics
Scratch Lesson 1 – BasicsScratch Lesson 1 – Basics
Scratch Lesson 1 – BasicsDavid Oromaner
 
6. production reflection(2)
6. production reflection(2)6. production reflection(2)
6. production reflection(2)rhiannah baker
 
Arcade Game Design with Sploder - Library Program
Arcade Game Design with Sploder - Library ProgramArcade Game Design with Sploder - Library Program
Arcade Game Design with Sploder - Library ProgramRino Landa
 
Houchens jeffrey secret helper gdd
Houchens jeffrey secret helper gddHouchens jeffrey secret helper gdd
Houchens jeffrey secret helper gddjhouchens99
 
Interactive Project - Production Reflection
Interactive Project - Production ReflectionInteractive Project - Production Reflection
Interactive Project - Production ReflectionDaisyPotter
 
SGIS Presentation Advanced Users
SGIS Presentation Advanced UsersSGIS Presentation Advanced Users
SGIS Presentation Advanced UsersWill Kirkwood
 
SGIS Training Introduction
SGIS Training IntroductionSGIS Training Introduction
SGIS Training IntroductionWill Kirkwood
 

What's hot (20)

Computer Coding with Scratch: Lesson 2_primaryschoollessons
Computer Coding with Scratch: Lesson 2_primaryschoollessonsComputer Coding with Scratch: Lesson 2_primaryschoollessons
Computer Coding with Scratch: Lesson 2_primaryschoollessons
 
Programming in scratch
Programming in scratchProgramming in scratch
Programming in scratch
 
Scratch Animation
Scratch AnimationScratch Animation
Scratch Animation
 
3 Kodu
3 Kodu3 Kodu
3 Kodu
 
Coding Basics with Scratch
Coding Basics with ScratchCoding Basics with Scratch
Coding Basics with Scratch
 
Scratch Lesson 5
Scratch Lesson 5Scratch Lesson 5
Scratch Lesson 5
 
Scratch programming introduction to game creation
Scratch programming  introduction to game creationScratch programming  introduction to game creation
Scratch programming introduction to game creation
 
Scratch an Editing App
 Scratch  an Editing App  Scratch  an Editing App
Scratch an Editing App
 
Scratch Lesson 6
Scratch Lesson 6Scratch Lesson 6
Scratch Lesson 6
 
Kodu
KoduKodu
Kodu
 
Scratch Lesson 1 – Basics
Scratch Lesson 1 – BasicsScratch Lesson 1 – Basics
Scratch Lesson 1 – Basics
 
Scratch Programming
Scratch ProgrammingScratch Programming
Scratch Programming
 
Lasso tool
Lasso toolLasso tool
Lasso tool
 
6. production reflection(2)
6. production reflection(2)6. production reflection(2)
6. production reflection(2)
 
Arcade Game Design with Sploder - Library Program
Arcade Game Design with Sploder - Library ProgramArcade Game Design with Sploder - Library Program
Arcade Game Design with Sploder - Library Program
 
Houchens jeffrey secret helper gdd
Houchens jeffrey secret helper gddHouchens jeffrey secret helper gdd
Houchens jeffrey secret helper gdd
 
Interactive Project - Production Reflection
Interactive Project - Production ReflectionInteractive Project - Production Reflection
Interactive Project - Production Reflection
 
SGIS Presentation Advanced Users
SGIS Presentation Advanced UsersSGIS Presentation Advanced Users
SGIS Presentation Advanced Users
 
SGIS Training Introduction
SGIS Training IntroductionSGIS Training Introduction
SGIS Training Introduction
 
Google sketch up
Google sketch upGoogle sketch up
Google sketch up
 

Similar to 4.4 advanced games

tic tac toe.pptx
tic tac toe.pptxtic tac toe.pptx
tic tac toe.pptxrocky720491
 
MIND GAME ZONE - Abhijeet
MIND GAME ZONE - AbhijeetMIND GAME ZONE - Abhijeet
MIND GAME ZONE - AbhijeetAbhijeet Kalsi
 
Galactic Wars XNA Game
Galactic Wars XNA GameGalactic Wars XNA Game
Galactic Wars XNA GameSohil Gupta
 
Android game -english08
Android game -english08Android game -english08
Android game -english08tonychan1972
 
Game Development Company, Flash Game Development,
Game Development Company, Flash Game Development,Game Development Company, Flash Game Development,
Game Development Company, Flash Game Development,Gateway Technolabs
 
The Ring programming language version 1.7 book - Part 53 of 196
The Ring programming language version 1.7 book - Part 53 of 196The Ring programming language version 1.7 book - Part 53 of 196
The Ring programming language version 1.7 book - Part 53 of 196Mahmoud Samir Fayed
 
Applications presentation 2009
Applications presentation 2009Applications presentation 2009
Applications presentation 2009Sasha Gorelik
 
Game maker brief level 2
Game maker brief level 2Game maker brief level 2
Game maker brief level 2iain bruce
 
Scratch for kids syllabus for 5 hours by bibek pandit
Scratch for kids syllabus for 5 hours by bibek panditScratch for kids syllabus for 5 hours by bibek pandit
Scratch for kids syllabus for 5 hours by bibek panditBibekPandit2
 
Play to Learn: Effective Learning Game Design
Play to Learn: Effective Learning Game DesignPlay to Learn: Effective Learning Game Design
Play to Learn: Effective Learning Game DesignSharon Boller
 
Gamecatalog1.01 -english
Gamecatalog1.01 -englishGamecatalog1.01 -english
Gamecatalog1.01 -englishtonychan1972
 
Up cloth - GameDesignDoccument
Up cloth - GameDesignDoccumentUp cloth - GameDesignDoccument
Up cloth - GameDesignDoccumentEléonore Arbaux
 
2d game engine workflow
2d game engine workflow2d game engine workflow
2d game engine workflowluisfvazquez1
 

Similar to 4.4 advanced games (20)

tic tac toe.pptx
tic tac toe.pptxtic tac toe.pptx
tic tac toe.pptx
 
MIND GAME ZONE - Abhijeet
MIND GAME ZONE - AbhijeetMIND GAME ZONE - Abhijeet
MIND GAME ZONE - Abhijeet
 
Galactic Wars XNA Game
Galactic Wars XNA GameGalactic Wars XNA Game
Galactic Wars XNA Game
 
Android game -english08
Android game -english08Android game -english08
Android game -english08
 
Street runner final
Street runner finalStreet runner final
Street runner final
 
Game Development Company, Flash Game Development,
Game Development Company, Flash Game Development,Game Development Company, Flash Game Development,
Game Development Company, Flash Game Development,
 
Offshore Game Development Presentation
Offshore Game Development PresentationOffshore Game Development Presentation
Offshore Game Development Presentation
 
The Ring programming language version 1.7 book - Part 53 of 196
The Ring programming language version 1.7 book - Part 53 of 196The Ring programming language version 1.7 book - Part 53 of 196
The Ring programming language version 1.7 book - Part 53 of 196
 
Applications presentation 2009
Applications presentation 2009Applications presentation 2009
Applications presentation 2009
 
Lesson-6-Fruit-Slicer.pptx
Lesson-6-Fruit-Slicer.pptxLesson-6-Fruit-Slicer.pptx
Lesson-6-Fruit-Slicer.pptx
 
Game maker brief level 2
Game maker brief level 2Game maker brief level 2
Game maker brief level 2
 
Scratch for kids syllabus for 5 hours by bibek pandit
Scratch for kids syllabus for 5 hours by bibek panditScratch for kids syllabus for 5 hours by bibek pandit
Scratch for kids syllabus for 5 hours by bibek pandit
 
TIC-TAC-TOE IN C
TIC-TAC-TOE IN CTIC-TAC-TOE IN C
TIC-TAC-TOE IN C
 
Make a match3
Make a match3Make a match3
Make a match3
 
Lesson-8-Asteroid.pptx
Lesson-8-Asteroid.pptxLesson-8-Asteroid.pptx
Lesson-8-Asteroid.pptx
 
Play to Learn: Effective Learning Game Design
Play to Learn: Effective Learning Game DesignPlay to Learn: Effective Learning Game Design
Play to Learn: Effective Learning Game Design
 
Gamecatalog1.01 -english
Gamecatalog1.01 -englishGamecatalog1.01 -english
Gamecatalog1.01 -english
 
Up cloth - GameDesignDoccument
Up cloth - GameDesignDoccumentUp cloth - GameDesignDoccument
Up cloth - GameDesignDoccument
 
Unity
UnityUnity
Unity
 
2d game engine workflow
2d game engine workflow2d game engine workflow
2d game engine workflow
 

More from allenbailey

5.1 sharing code
5.1   sharing code5.1   sharing code
5.1 sharing codeallenbailey
 
3.6 debugging aids
3.6   debugging aids3.6   debugging aids
3.6 debugging aidsallenbailey
 
3.5 the controls object
3.5   the controls object3.5   the controls object
3.5 the controls objectallenbailey
 
3.4 events and interactivity
3.4   events and interactivity3.4   events and interactivity
3.4 events and interactivityallenbailey
 
3.3 the math object
3.3   the math object3.3   the math object
3.3 the math objectallenbailey
 
3.2 stacks and arrays
3.2   stacks and arrays3.2   stacks and arrays
3.2 stacks and arraysallenbailey
 
3.1 file input and output
3.1   file input and output3.1   file input and output
3.1 file input and outputallenbailey
 
2.6 flickr, image list, and network objects
2.6   flickr, image list, and network objects2.6   flickr, image list, and network objects
2.6 flickr, image list, and network objectsallenbailey
 
2.5 clock, desktop, and dictionary objects
2.5   clock, desktop, and dictionary objects2.5   clock, desktop, and dictionary objects
2.5 clock, desktop, and dictionary objectsallenbailey
 
2.4 sound, program, and text objects
2.4   sound, program, and text objects2.4   sound, program, and text objects
2.4 sound, program, and text objectsallenbailey
 
2.3 exploring shapes
2.3   exploring shapes2.3   exploring shapes
2.3 exploring shapesallenbailey
 
2.2 turtle graphics
2.2   turtle graphics2.2   turtle graphics
2.2 turtle graphicsallenbailey
 
2.1 graphics window
2.1   graphics window2.1   graphics window
2.1 graphics windowallenbailey
 
1.5 branching and subroutines
1.5   branching and subroutines1.5   branching and subroutines
1.5 branching and subroutinesallenbailey
 
1.4 conditions and loops
1.4   conditions and loops1.4   conditions and loops
1.4 conditions and loopsallenbailey
 
1.2 statements, properties, and operations
1.2   statements, properties, and operations1.2   statements, properties, and operations
1.2 statements, properties, and operationsallenbailey
 
1.1 introduction to small basic
1.1   introduction to small basic1.1   introduction to small basic
1.1 introduction to small basicallenbailey
 

More from allenbailey (18)

5.1 sharing code
5.1   sharing code5.1   sharing code
5.1 sharing code
 
3.6 debugging aids
3.6   debugging aids3.6   debugging aids
3.6 debugging aids
 
3.5 the controls object
3.5   the controls object3.5   the controls object
3.5 the controls object
 
3.4 events and interactivity
3.4   events and interactivity3.4   events and interactivity
3.4 events and interactivity
 
3.3 the math object
3.3   the math object3.3   the math object
3.3 the math object
 
3.2 stacks and arrays
3.2   stacks and arrays3.2   stacks and arrays
3.2 stacks and arrays
 
3.1 file input and output
3.1   file input and output3.1   file input and output
3.1 file input and output
 
2.6 flickr, image list, and network objects
2.6   flickr, image list, and network objects2.6   flickr, image list, and network objects
2.6 flickr, image list, and network objects
 
2.5 clock, desktop, and dictionary objects
2.5   clock, desktop, and dictionary objects2.5   clock, desktop, and dictionary objects
2.5 clock, desktop, and dictionary objects
 
2.4 sound, program, and text objects
2.4   sound, program, and text objects2.4   sound, program, and text objects
2.4 sound, program, and text objects
 
2.3 exploring shapes
2.3   exploring shapes2.3   exploring shapes
2.3 exploring shapes
 
2.2 turtle graphics
2.2   turtle graphics2.2   turtle graphics
2.2 turtle graphics
 
2.1 graphics window
2.1   graphics window2.1   graphics window
2.1 graphics window
 
1.5 branching and subroutines
1.5   branching and subroutines1.5   branching and subroutines
1.5 branching and subroutines
 
1.4 conditions and loops
1.4   conditions and loops1.4   conditions and loops
1.4 conditions and loops
 
1.3 variables
1.3   variables1.3   variables
1.3 variables
 
1.2 statements, properties, and operations
1.2   statements, properties, and operations1.2   statements, properties, and operations
1.2 statements, properties, and operations
 
1.1 introduction to small basic
1.1   introduction to small basic1.1   introduction to small basic
1.1 introduction to small basic
 

Recently uploaded

Zoom In Game for ice breaking in a training
Zoom In Game for ice breaking in a trainingZoom In Game for ice breaking in a training
Zoom In Game for ice breaking in a trainingRafik ABDI
 
8377087607 Full Enjoy @24/7 Call Girls in Patel Nagar Delhi NCR
8377087607 Full Enjoy @24/7 Call Girls in Patel Nagar Delhi NCR8377087607 Full Enjoy @24/7 Call Girls in Patel Nagar Delhi NCR
8377087607 Full Enjoy @24/7 Call Girls in Patel Nagar Delhi NCRdollysharma2066
 
GRADE 7 NEW PPT ENGLISH 1 [Autosaved].pp
GRADE 7 NEW PPT ENGLISH 1 [Autosaved].ppGRADE 7 NEW PPT ENGLISH 1 [Autosaved].pp
GRADE 7 NEW PPT ENGLISH 1 [Autosaved].ppJasmineLinogon
 
Call Girls Sanand 7397865700 Ridhima Hire Me Full Night
Call Girls Sanand 7397865700 Ridhima Hire Me Full NightCall Girls Sanand 7397865700 Ridhima Hire Me Full Night
Call Girls Sanand 7397865700 Ridhima Hire Me Full Nightssuser7cb4ff
 
Call Girls Near Taurus Sarovar Portico Hotel New Delhi 9873777170
Call Girls Near Taurus Sarovar Portico Hotel New Delhi 9873777170Call Girls Near Taurus Sarovar Portico Hotel New Delhi 9873777170
Call Girls Near Taurus Sarovar Portico Hotel New Delhi 9873777170Sonam Pathan
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377087607dollysharma2066
 
Taken Pilot Episode Story pitch Document
Taken Pilot Episode Story pitch DocumentTaken Pilot Episode Story pitch Document
Taken Pilot Episode Story pitch Documentf4ssvxpz62
 
NO1 WorldWide Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi ...
NO1 WorldWide Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi ...NO1 WorldWide Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi ...
NO1 WorldWide Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi ...Amil Baba Dawood bangali
 
NO1 Certified Black magic/kala jadu,manpasand shadi in lahore,karachi rawalpi...
NO1 Certified Black magic/kala jadu,manpasand shadi in lahore,karachi rawalpi...NO1 Certified Black magic/kala jadu,manpasand shadi in lahore,karachi rawalpi...
NO1 Certified Black magic/kala jadu,manpasand shadi in lahore,karachi rawalpi...Amil baba
 
定制(UofT毕业证书)加拿大多伦多大学毕业证成绩单原版一比一
定制(UofT毕业证书)加拿大多伦多大学毕业证成绩单原版一比一定制(UofT毕业证书)加拿大多伦多大学毕业证成绩单原版一比一
定制(UofT毕业证书)加拿大多伦多大学毕业证成绩单原版一比一lvtagr7
 
NO1 WorldWide Amil baba in pakistan Amil Baba in Karachi Black Magic Islamaba...
NO1 WorldWide Amil baba in pakistan Amil Baba in Karachi Black Magic Islamaba...NO1 WorldWide Amil baba in pakistan Amil Baba in Karachi Black Magic Islamaba...
NO1 WorldWide Amil baba in pakistan Amil Baba in Karachi Black Magic Islamaba...Amil baba
 
Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...
Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...
Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...First NO1 World Amil baba in Faisalabad
 
Call Girls In Moti Bagh (8377877756 )-Genuine Rate Girls Service
Call Girls In Moti Bagh (8377877756 )-Genuine Rate Girls ServiceCall Girls In Moti Bagh (8377877756 )-Genuine Rate Girls Service
Call Girls In Moti Bagh (8377877756 )-Genuine Rate Girls Servicedollysharma2066
 
Aesthetic Design Inspiration by Slidesgo.pptx
Aesthetic Design Inspiration by Slidesgo.pptxAesthetic Design Inspiration by Slidesgo.pptx
Aesthetic Design Inspiration by Slidesgo.pptxsayemalkadripial4
 
QUIZ BOLLYWOOD ( weekly quiz ) - SJU quizzers
QUIZ BOLLYWOOD ( weekly quiz ) - SJU quizzersQUIZ BOLLYWOOD ( weekly quiz ) - SJU quizzers
QUIZ BOLLYWOOD ( weekly quiz ) - SJU quizzersSJU Quizzers
 
办理滑铁卢大学毕业证成绩单|购买加拿大文凭证书
办理滑铁卢大学毕业证成绩单|购买加拿大文凭证书办理滑铁卢大学毕业证成绩单|购买加拿大文凭证书
办理滑铁卢大学毕业证成绩单|购买加拿大文凭证书zdzoqco
 
Call Girls SG Highway 7397865700 Ridhima Hire Me Full Night
Call Girls SG Highway 7397865700 Ridhima Hire Me Full NightCall Girls SG Highway 7397865700 Ridhima Hire Me Full Night
Call Girls SG Highway 7397865700 Ridhima Hire Me Full Nightssuser7cb4ff
 
Real NO1 Amil baba in Faisalabad Kala jadu in faisalabad Aamil baba Faisalaba...
Real NO1 Amil baba in Faisalabad Kala jadu in faisalabad Aamil baba Faisalaba...Real NO1 Amil baba in Faisalabad Kala jadu in faisalabad Aamil baba Faisalaba...
Real NO1 Amil baba in Faisalabad Kala jadu in faisalabad Aamil baba Faisalaba...Amil Baba Company
 

Recently uploaded (20)

Zoom In Game for ice breaking in a training
Zoom In Game for ice breaking in a trainingZoom In Game for ice breaking in a training
Zoom In Game for ice breaking in a training
 
8377087607 Full Enjoy @24/7 Call Girls in Patel Nagar Delhi NCR
8377087607 Full Enjoy @24/7 Call Girls in Patel Nagar Delhi NCR8377087607 Full Enjoy @24/7 Call Girls in Patel Nagar Delhi NCR
8377087607 Full Enjoy @24/7 Call Girls in Patel Nagar Delhi NCR
 
GRADE 7 NEW PPT ENGLISH 1 [Autosaved].pp
GRADE 7 NEW PPT ENGLISH 1 [Autosaved].ppGRADE 7 NEW PPT ENGLISH 1 [Autosaved].pp
GRADE 7 NEW PPT ENGLISH 1 [Autosaved].pp
 
Call Girls Sanand 7397865700 Ridhima Hire Me Full Night
Call Girls Sanand 7397865700 Ridhima Hire Me Full NightCall Girls Sanand 7397865700 Ridhima Hire Me Full Night
Call Girls Sanand 7397865700 Ridhima Hire Me Full Night
 
Call Girls Near Taurus Sarovar Portico Hotel New Delhi 9873777170
Call Girls Near Taurus Sarovar Portico Hotel New Delhi 9873777170Call Girls Near Taurus Sarovar Portico Hotel New Delhi 9873777170
Call Girls Near Taurus Sarovar Portico Hotel New Delhi 9873777170
 
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377087607FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377087607
FULL ENJOY Call Girls In Mahipalpur Delhi Contact Us 8377087607
 
Call Girls Koti 7001305949 all area service COD available Any Time
Call Girls Koti 7001305949 all area service COD available Any TimeCall Girls Koti 7001305949 all area service COD available Any Time
Call Girls Koti 7001305949 all area service COD available Any Time
 
Taken Pilot Episode Story pitch Document
Taken Pilot Episode Story pitch DocumentTaken Pilot Episode Story pitch Document
Taken Pilot Episode Story pitch Document
 
NO1 WorldWide Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi ...
NO1 WorldWide Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi ...NO1 WorldWide Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi ...
NO1 WorldWide Amil Baba In Karachi Kala Jadu In Karachi Amil baba In Karachi ...
 
NO1 Certified Black magic/kala jadu,manpasand shadi in lahore,karachi rawalpi...
NO1 Certified Black magic/kala jadu,manpasand shadi in lahore,karachi rawalpi...NO1 Certified Black magic/kala jadu,manpasand shadi in lahore,karachi rawalpi...
NO1 Certified Black magic/kala jadu,manpasand shadi in lahore,karachi rawalpi...
 
定制(UofT毕业证书)加拿大多伦多大学毕业证成绩单原版一比一
定制(UofT毕业证书)加拿大多伦多大学毕业证成绩单原版一比一定制(UofT毕业证书)加拿大多伦多大学毕业证成绩单原版一比一
定制(UofT毕业证书)加拿大多伦多大学毕业证成绩单原版一比一
 
NO1 WorldWide Amil baba in pakistan Amil Baba in Karachi Black Magic Islamaba...
NO1 WorldWide Amil baba in pakistan Amil Baba in Karachi Black Magic Islamaba...NO1 WorldWide Amil baba in pakistan Amil Baba in Karachi Black Magic Islamaba...
NO1 WorldWide Amil baba in pakistan Amil Baba in Karachi Black Magic Islamaba...
 
Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...
Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...
Authentic No 1 Amil Baba In Pakistan Authentic No 1 Amil Baba In Karachi No 1...
 
young call girls in Hari Nagar,🔝 9953056974 🔝 escort Service
young call girls in Hari Nagar,🔝 9953056974 🔝 escort Serviceyoung call girls in Hari Nagar,🔝 9953056974 🔝 escort Service
young call girls in Hari Nagar,🔝 9953056974 🔝 escort Service
 
Call Girls In Moti Bagh (8377877756 )-Genuine Rate Girls Service
Call Girls In Moti Bagh (8377877756 )-Genuine Rate Girls ServiceCall Girls In Moti Bagh (8377877756 )-Genuine Rate Girls Service
Call Girls In Moti Bagh (8377877756 )-Genuine Rate Girls Service
 
Aesthetic Design Inspiration by Slidesgo.pptx
Aesthetic Design Inspiration by Slidesgo.pptxAesthetic Design Inspiration by Slidesgo.pptx
Aesthetic Design Inspiration by Slidesgo.pptx
 
QUIZ BOLLYWOOD ( weekly quiz ) - SJU quizzers
QUIZ BOLLYWOOD ( weekly quiz ) - SJU quizzersQUIZ BOLLYWOOD ( weekly quiz ) - SJU quizzers
QUIZ BOLLYWOOD ( weekly quiz ) - SJU quizzers
 
办理滑铁卢大学毕业证成绩单|购买加拿大文凭证书
办理滑铁卢大学毕业证成绩单|购买加拿大文凭证书办理滑铁卢大学毕业证成绩单|购买加拿大文凭证书
办理滑铁卢大学毕业证成绩单|购买加拿大文凭证书
 
Call Girls SG Highway 7397865700 Ridhima Hire Me Full Night
Call Girls SG Highway 7397865700 Ridhima Hire Me Full NightCall Girls SG Highway 7397865700 Ridhima Hire Me Full Night
Call Girls SG Highway 7397865700 Ridhima Hire Me Full Night
 
Real NO1 Amil baba in Faisalabad Kala jadu in faisalabad Aamil baba Faisalaba...
Real NO1 Amil baba in Faisalabad Kala jadu in faisalabad Aamil baba Faisalaba...Real NO1 Amil baba in Faisalabad Kala jadu in faisalabad Aamil baba Faisalaba...
Real NO1 Amil baba in Faisalabad Kala jadu in faisalabad Aamil baba Faisalaba...
 

4.4 advanced games

  • 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 in Small Basic to create advanced games. Congratulations! You are now well acquainted with programming fundamentals as well as 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 familiar with the popular Tic-Tac-Toe game. Let’s see how we can create a Small Basic version of this popular game. Notice how you use the Shapes object to draw various game elements. You use mouse events to enable the user to place Xs on 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 does.
  • 5.
  • 6. The players alternately place Xs and Os and on the playing area.
  • 7.
  • 8. Use the Shapes object to create the playing area for the Xs and Os on the graphics window.
  • 9.
  • 10. It’s Time to Apply Your Learning… Create a game that involves the following objects: a wall of colored and grey blocks, a ball, and a paddle. The wall is slowly moving downwards, towards the paddle. Using the ball, you must get rid of all the colored blocks 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. You win the game if you get rid of all the colored blocks. You lose the game if the paddle misses the ball or if the grey blocks hit the paddle before you can remove all the blocks.

Editor's Notes

  1. Solution:' Copyright (c) Microsoft Corporation. All rights reserved.GraphicsWindow.Hide()GraphicsWindow.Height = 450GraphicsWindow.Width = 600GraphicsWindow.Top = ( Desktop.Height - 450 ) / 2GraphicsWindow.Left = ( Desktop.Width - 600 ) / 2GraphicsWindow.CanResize = "False"GraphicsWindow.Show()paddleImage = Program.Directory + " ectangle.png"ballImage = Program.Directory + "circle.png"Left = 42bStartY = 35CreatUI()hitCount = 0GraphicsWindow.MouseMove = MouseActionFor index = 0 To 15Array.SetValue("PinkBricks", Index, 1)Array.SetValue("VioletBricks", Index, 1)Array.SetValue("AquaBricks", Index, 1)EndforInitBricks()score = 0ShowScore()gw = GraphicsWindow.Widthgh = GraphicsWindow.Heighty = gh - 28Shapes.Move(ball, x, y)dX= 1dY =-2Loop:x = x + dXy = y + dYIf x >= gw - 16 Or x <= 0 ThendX= -dXEndIfIf y <= 0 ThendY = -dYEndIfpadX = Shapes.GetLeft(paddle)If y >= gh - 28 + 2 And x >= padX And x <= padX + 70 Then y = gh - 28 + 2 hitCount = hitCount + 1If Math.Remainder(hitCount, 3) = 0 Then For Index = 0 To 15HidePinkBrick()HideVioletBrick()HideAquaBrick()EndforbStartY = bStartY + 20InitBricks()EndIfTestAqua:For Index = 0 To 15If Array.GetValue("AquaBricks", Index) = 1 ThenIf bStartY > gh - 160 ThenGotoEndGameEndIfEndIfEndForTestViolet:For Index = 0 To 15If Array.GetValue("VioletBricks", Index) = 1 ThenIf bStartY > gh - 100 ThenGotoEndGameEndIfEndIfEndForTestPink:For Index = 0 To 15If Array.GetValue("PinkBricks", Index) = 1 ThenIf bStartY > gh - 40 ThenGotoEndGameEndIfEndIfEndForEndTest:dX= dX- 2 + (x - padX) / 30 If score = oldScore ThenIf score <> 0 Then score = score - 1EndIfEndIfoldScore = scoreShowScore()dY = -dYEndIfShapes.Move(ball, x, y) Program.Delay(5)If y > bStartY - 16 And y < bStartY + 20 Then Index = (x+8) / 40 Index = Math.Floor(Index)If Array.GetValue("PinkBricks", Index) = 1 Then If Index=8 ThenElseArray.SetValue("PinkBricks", Index, 0)HidePinkBrick() Left = Left - 1 score = score + 15ShowScore()EndIfdY = -dYgameFinish() EndIfEndIfIf y > bStartY + 44 And y < bStartY + 80 Then Index = (x + 8) / 40 Index = Math.Floor(Index) If Array.GetValue("VioletBricks", Index) = 1 ThenIf Index=4 Or Index=11 ThenElse Array.SetValue("VioletBricks", Index, 0)HideVioletBrick() Left = Left - 1 score = score + 10ShowScore()EndIfdY = -dYgameFinish() EndIfEndIfIf y > bStartY + 104 And y < bStartY + 140 Then Index = (x + 8) / 40 Index = Math.Floor(Index) If Array.GetValue("AquaBricks", Index) = 1 ThenIf Index = 2 Or Index = 7 Or Index = 13 ThenElse Array.SetValue("AquaBricks", Index, 0)HideAquaBrick() score = score + 5ShowScore() Left = Left - 1EndIfdY = -dYgameFinish()EndIfEndIfIf y < gh Then Goto LoopEndIfEndGame:GraphicsWindow.ShowMessage("Your score is: " + score, "Game Over")Program.End()Sub CreatUIGraphicsWindow.Title = "Paddle Game"GraphicsWindow.FontSize = 14 paddle = Shapes.AddImage(paddleimage) ball = Shapes.AddImage(ballimage)EndSubSub MouseActionpaddleX = GraphicsWindow.MouseXShapes.Move(paddle, paddleX - 10, GraphicsWindow.Height - 14)EndSubSub ShowScoreGraphicsWindow.BrushColor = "White"GraphicsWindow.FillRectangle(520, 10, 200, 20)GraphicsWindow.BrushColor = "Black"GraphicsWindow.DrawText(500, 10, "Score: " + score)EndSubSub InitBricksFor Index = 0 To 15 If Index = 8 ThenGraphicsWindow.PenColor = "Black"GraphicsWindow.BrushColor = "Gray"ElseIf Array.GetValue("PinkBricks", Index) = 1 ThenGraphicsWindow.PenColor = "Black"GraphicsWindow.BrushColor = "Pink"ElseGraphicsWindow.PenColor = "White"GraphicsWindow.BrushColor = "White"EndIfEndIfGraphicsWindow.FillRectangle(Index * 40, bStartY, 40, 20)GraphicsWindow.DrawRectangle(Index * 40, bStartY, 40, 20)GraphicsWindow.BrushColor = "Violet"If Index = 4 Or Index=11 ThenGraphicsWindow.PenColor = "Black"GraphicsWindow.BrushColor = "Gray"ElseIf Array.GetValue("VioletBricks", Index) = 1 ThenGraphicsWindow.PenColor = "Black"GraphicsWindow.BrushColor = "Violet"ElseGraphicsWindow.PenColor = "White"GraphicsWindow.BrushColor = "White"EndIfEndIfGraphicsWindow.FillRectangle(Index * 40, bStartY + 60, 40, 20)GraphicsWindow.DrawRectangle(Index * 40, bStartY + 60, 40, 20)GraphicsWindow.BrushColor = "Aqua"If Index = 2 Or Index = 7 Or Index = 13 ThenGraphicsWindow.PenColor = "Black"GraphicsWindow.BrushColor = "Gray"ElseIf Array.GetValue("AquaBricks", Index) = 1 ThenGraphicsWindow.PenColor = "Black"GraphicsWindow.BrushColor = "Aqua"ElseGraphicsWindow.PenColor = "White"GraphicsWindow.BrushColor = "White"EndIfEndIfGraphicsWindow.FillRectangle(Index * 40, bStartY + 120, 40, 20)GraphicsWindow.DrawRectangle(Index * 40, bStartY + 120, 40, 20)EndForEndSubSub HidePinkBrickGraphicsWindow.PenColor = "White"GraphicsWindow.BrushColor = "White"GraphicsWindow.FillRectangle(Index * 40, bStartY, 40, 20)GraphicsWindow.DrawRectangle(Index * 40, bStartY, 40, 20)EndSubSub HideVioletBrickGraphicsWindow.PenColor = "White"GraphicsWindow.BrushColor = "White"GraphicsWindow.FillRectangle(Index * 40, bStartY + 60, 40, 20)GraphicsWindow.DrawRectangle(Index * 40, bStartY + 60, 40, 20)EndSubSub HideAquaBrickGraphicsWindow.PenColor = "White"GraphicsWindow.BrushColor = "White"GraphicsWindow.FillRectangle(Index * 40, bStartY + 120, 40, 20)GraphicsWindow.DrawRectangle(Index * 40, bStartY + 120, 40, 20)EndSubSub gameFinishIf Left = 0 ThenGraphicsWindow.ShowMessage("Well Done! Your score is: " + score, "Game Over") Program.End() EndIfEndSub