COMPUTER BIBLE GAMES
FOR MICROSOFT SMALL BASIC
4th Edition
TABLE OF CONTENTS
- Introducing Small Basic
Preview 1-1
Why Learn Small Basic? 1-2
A Brief History of Small Basic 1-4
Let’s Get Started 1-12
Downloading and Installing Small Basic 1-14
Starting Small Basic 1-18
Opening a Small Basic Program 1-21
Running a Small Basic Program 1-23
Stopping Small Basic 1-25
Summary 1-26
- Small Basic Program Basics
Review and Preview 2-1
The Welcome Program (Revisited) 2-2
Some Rules of Small Basic Programming 2-5
Creating Small Basic Programs 2-7
Saving Small Basic Programs 2-12
Small Basic Files 2-15
Review and Preview 2-16
The Welcome Program (Revisited) 2-2
- Your First Small Basic Program
Review and Preview 3-1
Creating a Small Basic Program 3-2
Small Basic – The First Lesson 3-6
Variables 3-6
Variable Names 3-7
Variable Types 3-8
Assignment Statement 3-10
Arithmetic Operators 3-11
String Concatenation 3-15
Comments 3-16
Program Output 3-17
Program – Sub Sandwich Party 3-21
Program Design 3-21
Program Development 3-22
Run the Program 3-25
Other Things to Try 3-26
Summary 3-28
- Small Basic Program Design, Input Methods
Review and Preview 4-1
Program Design 4-2
Small Basic – The Second Lesson 4-4
Mathematical Functions 4-4
Program Input Methods 4-9
Input Methods Example 4-10
Program – Savings Calculator 4-14
Program Design 4-14
Program Development 4-15
Run the Program 4-18
Other Things to Try 4-20
Summary 4-22
- Debugging, Decisions, Random Numbers
Review and Preview 5-1
Debugging a Small Basic Program 5-2
Syntax Errors 5-3
Run-Time Errors 5-6
Logic Errors 5-9
Small Basic – The Third Lesson 5-10
Logical Expressions 5-10
Comparison Operators 5-11
Logical Operators 5-14
Decisions – The If Statement 5-19
Random Number Generator 5-24
Program – Guess the Number Game 5-27
Program Design 5-27
Program Development 5-28
Run the Program 5-31
Other Things to Try 5-32
Summary 5-34
- Small Basic Looping, Subroutines
Review and Preview 6-1
Small Basic -The Fourth Lesson 6-2
Small Basic Loops 6-2
A Brief Interlude – Guess the Number Game (Revisited) 6-12
Small Basic – The Fourth Lesson (Continued) 6-14
Small Basic Subroutines 6-14
Program – Lemonade Stand 6-18
Program Design 6-19
Program Development 6-20
Run the Program 6-27
Other Things to Try 6-29
Summary 6-30
- More Small Basic Looping, Arrays
Review and Preview 7-1
Small Basic -The Fifth Lesson 7-2
Small Basic For Loops 7-2
Variable Arrays 7-6
“Shuffle” Method 7-11
Program – Card Wars 7-18
Program Design 7-18
Program Development 7-19
Run the Program 7-27
Other Things to Try 7-29
Summary 7-30
- Small Basic Graphics, Mouse Methods
Review and Preview 8-1
Graphic User Interfaces (GUI) 8-2
Small Basic Graphics 8-7
Graphics Window 8-7
Colors 8-9
Pen Object 8-10
Graphics Coordinates 8-11
DrawLine Method 8-12
DrawRectangle Method 8-16
Brush Object 8-19
FillRectangle Method 8-19
Clear Method 8-22
Small Basic -The Sixth Lesson 8-23
Mouse Events 8-23
MouseDown Event 8-23
Mouse Properties 8-26
MouseMove Event 8-30
Program -Blackboard Fun 8-33
Program Design 8-33
Program Development 8-34
Run the Program 8-44
Other Things to Try 8-46
Summary 8-49
- Timers, Animation, Keyboard Methods
Review and Preview 9-1
Timer Object 9-2
Small Basic – The Final Lesson 9-10
DrawText Method 9-10
Animation 9-12
Object Disappearance 9-21
Border Crossing 9-24
Object Erasure 9-28
Collision Detection 9-29
Keyboard Methods 9-34
KeyDown Event 9-34
Program – Balloons 9-39
Program Design 9-39
Program Development 9-40
Run the Program 9-56
Other Things to Try 9-58
Sharing a Small Basic Program 9-60
Summary 9-69
- Noah’s Ark Project
Preview 10-1
Program – Noah’s Ark 10-2
Noah’s Ark Windows Design 10-6
Noah’s Ark Code Design10-8
Noah’s ArkProgram Listing 10-29
Noah’s ArkProgram Preview10-33
- Daniel and the Lions Project
Preview11-1
Program – Daniel and the Lions 11-2
Daniel and the Lions Window Design 11-9
Daniel and the Lions Code Design11-11
Daniel and the Lions Program Listing 11-65
Daniel and the Lions Program Review11-75
- Elijah and the Ravens Project
Preview 12-1
Program – Elijah and the Ravens 12-2
Elijah and the Ravens Window Design 12-6
Elijah and the Ravens Code Design 12-8
Elijah and the Ravens Program Listing 12-45
Elijah and the Ravens Program Review 12-51
- Additional COMPUTER BIBLE GAMES & Learning Games Projects
Preview 13-1
Program 1 – Computer Stopwatch 13-2
Program 2 – Loan Calculator 13-5
Program 3 – Units Conversion 13-8
Program 4 – Times Tables 13-11
Program 5 – State Capitals 13-14
Program 6 – Bible Book Scramble 13-20
Program 7 – Memory Game 13-29
Program 8 – The Prodigal Son Game 13-35
Program 9 – Decode 13-44
Program 10 – The Good Shepherd 13-51
Program 11 – The Lost Coin 13-59
Appendix I. Small Basic Colors