Download GameMaker Studio 100 Programming Challenges (2017).pdf PDF

TitleGameMaker Studio 100 Programming Challenges (2017).pdf
TagsE Books Trademark Copyright
File Size4.2 MB
Total Pages233
Table of Contents
                            Contents at a Glance
Contents
About the Author
About the Technical Reviewer
Acknowledgments
Introduction
Challenge 1: Maths Bar Graph
	Notes on Approaching This Challenge
	Guide
Challenge 2: Draggable and Movable Object
	Notes on Approaching This Challenge
	Guide
Challenge 3: Room Fade In and Out Transition
	Notes on Approaching This Challenge
	Guide
Challenge 4: Typewriter Text Effect
	Notes on Approaching This Challenge
	Guide
Challenge 5: Audio Volume Change Based on Distance
	Notes on Approaching This Challenge
	Guide
Challenge 6: Move Object to Position Using Path
	Notes on Approaching This Challenge
	Guide
Challenge 7: Make the Screen Shake
	Notes on Approaching This Challenge
	Guide
Challenge 8: Create Snow Effect
	Notes on Approaching This Challenge
	Guide
Challenge 9: Password Easter Egg
	Notes on Approaching This Challenge
	Guide
Challenge 10: Follow Two Objects in View
	Notes on Approaching This Challenge
	Guide
Challenge 11: High / Low Number Game
	Notes on Approaching This Challenge
	Guide
Challenge 12: Calculate the Average Position of Two Clicks
	Notes on Approaching This Challenge
	Guide
Challenge 13: Retrieve Text File from Web and Save Locally
	Notes on Approaching This Challenge
	Guide
Challenge 14: Shuffle Pack of Playing Cards and Deal 5
	Notes on Approaching This Challenge
	Guide
Challenge 15: Reverse Sentence Order
	Notes on Approaching This Challenge
	Guide
Challenge 16: Rotate and Move Object to Mouse Position
	Notes on Approaching This Challenge
	Guide
Challenge 17: Firework Display Using Effects
	Notes on Approaching This Challenge
	Guide
Challenge 18: Random Sentence Generator
	Notes on Approaching This Challenge
	Guide
Challenge 19: Pop-Up RPG Style Text Box
	Notes on Approaching This Challenge
	Guide
Challenge 20: Room Wrapping
	Notes on Approaching This Challenge
	Guide
Challenge 21: Sprite Shadow
	Notes on Approaching This Challenge
	Guide
Challenge 22: Make a Jukebox Player for Four Songs
	Notes on Approaching This Challenge
	Guide
Challenge 23: Scrolling Credits
	Notes on Approaching This Challenge
	Guide
Challenge 24: Random Dice Roller
	Notes on Approaching This Challenge
	Guide
Challenge 25: Substitution Cipher
	Notes on Approaching This Challenge
	Guide
Challenge 26: Save Highscore to INI
	Notes on Approaching This Challenge
	Guide
Challenge 27: Spawn Point
	Notes on Approaching This Challenge
	Guide
Challenge 28: Dictionary Check
	Notes on Approaching This Challenge
	Guide
Challenge 29: Draw Text with Shadow
	Notes on Approaching This Challenge
	Guide
Challenge 30: Classic Brick and Ball Game Remake
	Notes on Approaching This Challenge
	Guide
Challenge 31: Fire Projectile
	Notes on Approaching This Challenge
	Guide
Challenge 32: World Clock
	Notes on Approaching This Challenge
	Guide
Challenge 33: Text-Based Quiz
	Notes on Approaching This Challenge
	Guide
Challenge 34: Onscreen Keyboard
	Notes on Approaching This Challenge
	Guide
Challenge 35: Create a Drivable Tank That Leaves Tyre Tracks
	Notes on Approaching This Challenge
	Guide
Challenge 36: Parallax Background
	Notes on Approaching This Challenge
	Guide
Challenge 37: Click the Ghost
	Notes on Approaching This Challenge
	Guide
Challenge 38: Particle Fire Effect
	Notes on Approaching This Challenge
	Guide
Challenge 39: Bubble Sort
	Notes on Approaching This Challenge
	Guide
Challenge 40: Unlockable Levels Select Screen
	Notes on Approaching This Challenge
	Guide
Challenge 41: Moon Lander AI
	Notes on Approaching This Challenge
	Guide
Challenge 42: Dodge the Barrels
	Notes on Approaching This Challenge
	Guide
Challenge 43: Convert Celsius to Fahrenheit
	Notes on Approaching This Challenge
	Guide
Challenge 44: Dart Board Game
	Notes on Approaching This Challenge
	Guide
Challenge 45: Calculate BMI
	Notes on Approaching This Challenge
	Guide
Challenge 46: Colour Picker
	Notes on Approaching This Challenge
	Guide
Challenge 47: 10 Green Bottles
	Notes on Approaching This Challenge
	Guide
Challenge 48: English to Morse Code
	Notes on Approaching This Challenge
	Guide
Challenge 49: Blitz Game Remake
	Notes on Approaching This Challenge
	Guide
Challenge 50: Mini Golf Game Remake
	Notes on Approaching This Challenge
	Guide
Challenge 51: Rock, Paper, Scissors Game Remake
	Notes on Approaching This Challenge
	Guide
Challenge 52: Health Based on Distance
	Notes on Approaching This Challenge
	Guide
Challenge 53: Tank Trax Game Remake
	Notes on Approaching This Challenge
	Guide
Challenge 54: Two Separate Views
	Notes on Approaching This Challenge
	Guide
Challenge 55: Word Typing Game
	Notes on Approaching This Challenge
	Guide
Challenge 56: Destructible Terrain
	Notes on Approaching This Challenge
	Guide
Challenge 57: Duck Hunt Game Remake
	Notes on Approaching This Challenge
	Guide
Challenge 58: Keep Player in View
	Notes on Approaching This Challenge
	Guide
Challenge 59: Fizz Buzz
	Notes on Approaching This Challenge
	Guide
Challenge 60: Calculate Numbers
	Notes on Approaching This Challenge
	Guide
Challenge 61: Particle Trail Effect
	Notes on Approaching This Challenge
	Guide
Challenge 62: Draw a Rectangle and Calculate Area and Perimeter
	Notes on Approaching This Challenge
	Guide
Challenge 63: Tower Defense Game
	Notes on Approaching This Challenge
	Guide
Challenge 64: Drop the Coin AKA Plinko (Arcade Style)
	Notes on Approaching This Challenge
	Guide
Challenge 65: Calculate the Nth Result of Fibonacci Sequence
	Notes on Approaching This Challenge
	Guide
Challenge 66: Distance from Object to Mouse
	Notes on Approaching This Challenge
	Guide
Challenge
67: Convert Decimal to Binary, Oct, Hex, and Roman
	Notes on Approaching This Challenge
	Guide
Challenge 68: Text in X Box
	Notes on Approaching This Challenge
	Guide
Challenge 69: Frogger Game Remake
	Notes on Approaching This Challenge
	Guide
Challenge 70: Take a Screenshot
	Notes on Approaching This Challenge
	Guide
Challenge 71: Slowly Change Direction
	Notes on Approaching This Challenge
	Guide
Challenge 72: Pong Style Game Remake
	Notes on Approaching This Challenge
	Guide
Challenge 73: Shooting Gallery
	Notes on Approaching This Challenge
	Guide
Challenge 74: How Many of Each Letter
	Notes on Approaching This Challenge
	Guide
Challenge 75: Torpedo Game Remake
	Notes on Approaching This Challenge
	Guide
Challenge 76: One Hundred Random Numbers
	Notes on Approaching This Challenge
	Guide
Challenge 77: Coin Flip
	Notes on Approaching This Challenge
	Guide
Challenge 78: Predict the Path of an Object
	Notes on Approaching This Challenge
	Guide
Challenge 79: Dynamic Button
	Notes on Approaching This Challenge
	Guide
Challenge 80: Sokoban Game Remake
	Notes on Approaching This Challenge
	Guide
Challenge 81: Top Down Football
	Notes on Approaching This Challenge
	Guide
Challenge 82: Top Down Racing
	Notes on Approaching This Challenge
	Guide
Challenge 83: Convert Numbers (in Digits) to Words
	Notes on Approaching This Challenge
	Guide
Challenge 84: Zelda Style Views
	Notes on Approaching This Challenge
	Guide
Challenge 85: Convert Text File to eBook
	Notes on Approaching This Challenge
	Guide
Challenge 86: Planets Database (INI)
	Notes on Approaching This Challenge
	Guide
Challenge 87: How Much Flour
	Notes on Approaching This Challenge
	Guide
Challenge 88: Rotating Mini Map
	Notes on Approaching This Challenge
	Guide
Challenge 89: Selectable Troops
	Notes on Approaching This Challenge
	Guide
Challenge 90: Pipes
	Notes on Approaching This Challenge
	Guide
Challenge 91: Arcade Style Horse Race Game
	Notes on Approaching This Challenge
	Guide
Challenge 92: Road Builder
	Notes on Approaching This Challenge
	Guide
Challenge 93: Chess Board Representation
	Notes on Approaching This Challenge
	Guide
Challenge 94: 1945 Game Remake
	Notes on Approaching This Challenge
	Guide
Challenge 95: Create a Virtual ATM (Bank Teller)
	Notes on Approaching This Challenge
	Guide
Challenge 96: Moon Lander Game Remake
	Notes on Approaching This Challenge
	Guide
Challenge 97: Pixelate an Image
	Notes on Approaching This Challenge
	Guide
Challenge 98: Miner
	Notes on Approaching This Challenge
	Guide
Challenge 99: Follow Player (Ghost)
	Notes on Approaching This Challenge
	Guide
Challenge 100: Multiplication Table
	Notes on Approaching This Challenge
	Guide
Appendix
A: Points Chart
Index
                        
Document Text Contents
Page 1

GameMaker: Studio
100 Programming Challenges


Ben Tyers

Page 2

GameMaker: Studio
100 Programming

Challenges

Ben Tyers

Page 116

Challenge 46 ■ Colour PiCker

92

Guide
You can get the colour at the mouse’s position:

my_colour=draw_getpixel(mouse_x,mouse_y);

You can then use this colour to draw something, such as a rectangle or a circle:

draw_set_colour(my_colour);
draw_circle(x,y,40,false);

Page 117

93© Ben Tyers 2017
B. Tyers, GameMaker: Studio 100 Programming Challenges, DOI 10.1007/978-1-4842-2644-5_47

CHALLENGE 47

10 Green Bottles

Challenge Outline
To display lyrics to the song, “10 Green Bottles.” Use loops
and variables to display the lyrics. This can be combined
with challenge 19.

Level 3

Beginner 1 Hour

Medium 30 Minutes

Advanced 20 Minutes

Additional Challenge
Sync this to a music track.

Points
In Time 30

Additional 20

Notes on Approaching This Challenge
You’ll need some kind of loop to count down from 10 to 1. You’ll need to combine numbers and strings (by
changing integers to strings). The repeated part of the song can be stored in strings. You can display each
line using alarms and drawing, or create a message system (challenge 19) to buffer the lines.

Page 232

209© Ben Tyers 2017
B. Tyers, GameMaker: Studio 100 Programming Challenges, DOI 10.1007/978-1-4842-2644-5

��������� A
AI system, 81–82
Arcade style horse race game, 183–184
ATM, virtual, 191–192
Audio volume change, distance, 9–10
Average position, two clicks, 23–24

��������� B
Ball game, 59–60
Blitz game, 97–98
BMI calculator, 89–90
Bubble sort, 77–78
Button, dynamic, 159–160

��������� C
Calculate numbers, 119–120
Celsius to fahrenheit conversion, 85–86
Chess board representation, 187–188
Cipher, substitution, 49–50
Classic brick, 59–60
Coin flip, 155–156
Colour picker, 91–92
Credits, 45–46

��������� D
Dart board game, 87–88
Decimal, conversion, 135–136
Destructible terrain, 111–112
Dice roller, random, 47–48
Dictionary check, 55–56
2-Dimensional array, 1
Direction, change, 143–144
Distance, object to mouse, 133–134
Dodge barrels, 83–84
Draggable and moveable object, 3–4
Draw text with shadow, 57–58
Duck hunt game, 113–114
Dynamic button, 159–160

��������� E
eBook, text file to, 171–172
English to morse code, 95–96

��������� F
Fibonacci sequence, Nth result, 131–132
File retrieval, 26
Fire projectile, 61–62
Firework display, 33–34
Fizz buzz, 117–118
Flour, 175–176
Football, top down, 163–164
Frogger game, 139–140

��������� G
Gallery, shooting, 147–148
1945 game, 189–190
Ghost, click, 73–74
Ghost follow, 199–200
10 green bottles, 93–94

��������� H
Health based on distance, 103–104
High/low number game, 21–22
Horse race game, 183–184

��������� I
Image, pixelate, 195–196
INI file, 51–52, 173–174

��������� J, K
Jukebox player, 43–44

��������� L
Letters, count, 149–150

Index

Page 233

■ INDEX

210

��������� M
Map, rotating mini, 177–178
Maths bar graph, 1–2
Miner, 197–198
Mini golf game, 99–100
Moon lander, 81–82, 193–194
Mouse

object to, 133–134
positions, 31–32

Multiplication table, 201–202

��������� N
Numbers to words, 167–168
Numerical inputs, 1

��������� O
Object

to mouse, 133–134
move position, 11–12
path of, 157–158
in view, 19–20

One hundred random numbers, 153–154
Onscreen keyboard, 67–68

��������� P, Q
Parallax background, 71–72
Particle fire effect, 75–76
Particle trail effect, 121–122
Password easter egg, 17–18
Pipes, 181–182
Pixelate an image, 195–196
Planets database (INI), 173–174
Player in view, 115–116
Playing cards shuffle, 27–28
Plinko (arcade style) game, 129–130
Pong style game, 145–146
Pop-Up RPG style text box, 37–38

��������� R
Racing, top down, 165–166
Random sentence generator, 35–36
Rectangle, area and perimeter, 123–124
Retrieve text file, web and save locally, 25–26
Reverse sentence order, 29–30
Road builder, 185–186
Rock, paper, scissors game, 101–102
Room fade in and out transition, 5–6
Room wrapping, 39–40

��������� S
Screen shake, 13–14
Screenshot, 141–142
Scrolling credits, 45–46
Shooting gallery, 147–148
Snow effect, creation, 15–16
Sokoban game, 161–162
Spawn points, 53–54
Sprite shadow, 41–42

��������� T
Tank

drivable, 69–70
trax game, 105–106

Text-based quiz, 65–66
Text file to eBook, 171–172
Text in X Box, 137–138
Tire tracks, 69–70
Top down

football, 163–164
racing, 165–166

Torpedo game, 151–152
Tower defense game, 125–127
Troops, selectable, 179–180
Two separate views, 107–108
Typewriter text effect, 7–8

��������� U
Unlockable levels select screen, 79–80

��������� V
Virtual ATM (bank teller), 191–192

��������� W
Words, numbers to, 167–168
Word typing game, 109–110
World clock, 63–64

��������� X, Y
X Box, text in, 137–138

��������� Z
Zelda style views, 169–170

Similer Documents