You have obstacles on the platforms that the player needs to watch out for. Learn how to create another loop to check if the hero hits an obstacle.
- [Instructor] Hi there, welcome back to the next video.…In the last video, we made the hero a movable game object.…In this video, we will apply gravity to this hero.…We create a loop that keeps…applying a +y velocity to the avatar.…We implemented a new method to determine…if the object will hit any platforms.…When the object is near a platform,…we make it slow down and stand on the platform.…Let's get started.…We continue the project in the code editor.…
We should have the project folder opened.…The Chrome Canary Browser is ready also for testing later.…In the movable game object, we had the initial velocity…value to test the movement logic.…We don't need them now, the world will have a +y velocity…applied to these objects.…We don't need movable objects to have…a predefined movement at the moment.…We reset the default velocity to 0.…In the world class, we have created a function:…isObjectOnGround, in the last video.…
Now, we clone the isObjectOnGround to create a new method,…named willObjectOnGround.…It is very similar to the original method,…
Note: This course was created by Packt Publishing. We are pleased to host this training in our library.
- Planning your first game
- Setting up your file structure
- Setting up HTML and JS
- Drawing basic shapes with EaselJS
- Implementing your first game object
- Creating the core game logic
- Adding graphics to your game
- Planning your second game
- Handling obstacle and hero collisions
- Making the hero run and jump
- Adding graphics and animations
- Polishing your final game
Skill Level Beginner
Q: Should the exercise files be run from a server or locally?
A: Please run the exercise files from a server as directed. The files will not work properly if run locally.
iOS Game Development with Swift 3 and SpriteKitwith Todd Perkins2h 52m Intermediate
1. Planning Your First Game
2. Creating the Core Game Logic
3. Adding Graphics to Your Game
4. Planning Your Second Game
Planning the rush game4m 7s
5. Game Objects and Collisions
6. Character Movement and Input Handling
7. Adding Graphics and Animations
8. Polishing Your Final Game
- 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.