We tell our ball to bounce whenever it hits another solid object. GameMaker can detect collisions between solid objects with defined collision masks.
- [Instructor] Let's open up our ball object again.…Let's copy the script that we created in the last video.…Click the paddle Collision Event in the Events list…and then click the script in the Actions list.…Right-click and choose Copy.…And now we'll add a new event,…again it will be a Collision event.…This time, we'll make it for our brick object.…And we can right-click in the Actions list…and choose Paste.…We can do it once more, choose Collision,…and this time, choose the endWall.…We'll Paste the script once more.…
Another way we can do this is right-click…one of the existing collision events and choose Duplicate.…And now it asks us what kind of event…we want to change this to.…We'll choose Collision again, but this time,…we'll choose with the sideWall object.…And now we already have our script in the Actions.…We open up that script, maximize this window,…all we see is the move_bounce_solid function called.…With this function, in each of our collision events,…the ball should now bounce off of all objects in our game.…
- Creating a new GameMaker project
- Creating sprites
- Importing existing images
- Adding collisions
- Playing sounds
- Designing game levels
- Creating start and game over screens
- Exporting the game
Skill Level Beginner
iOS Game Development with Swift 3 and SpriteKitwith Todd Perkins2h 52m Intermediate
1. Getting Started
2. The Game Pieces
3. The Gameplay
4. The Game Cycle
5. Finishing a Project
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.Cancel
Take notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.