You need to add support for touch events on mobile devices.
- [Instructor] Hello, and welcome to Video 4.3.…In this video we're gonna talk about mobile support.…While in the previous videos…we've focused more on desktop computers…while we attached keyboard events and mouse events…to the game.…We're gonna take a look at adding touch events to the game,…and changing the stage to fit various devices.…Now CreateJS is pretty self-sufficient…in terms of touch events.…
Once you enable touch events in CreateJS…it automatically converts all the mouse events…to touch events.…So we what we've created in the add mouse support section…will work here once we enable touch events.…How do we enable touch events?…We go to the code,…and after we create the stage itself,…we're gonna call the createjs.Touch.enable…and this receives the parameter the stage itself.…
So now we've enabled touch events in the stage.…So all the logic…of the paddle following the mouse X location…works here with touch events automatically…once we use this command.…If we switch to mobile view…we can see that once I click the screen…
Note: This course was created by Packt Publishing. We are pleased to host this training in our library.
- Playing sounds in various browsers using SoundJS
- Tweening objects using TweenJS
- Creating graphic assets and basic animations
- Game stage creation and object positioning
- Adding the basic game logic
- Add the game physics
- Adding mouse and keyboard controls
- Debugging with breakpoints in Chrome
- Debugging on Android and iOS
- Character movement and input handling
Skill Level Advanced
iOS Game Development with Swift 3 and SpriteKitwith Todd Perkins2h 52m Intermediate
2. Game Outline
3. Game Logic
4. Planning Your Second Game
5. Testing and Debugging the Game
6. Character Movement and Input Handling
- 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.