18 March 2015
Game Development Series Highlights – Adding a Player, Touch Input, and Camera Movement
Recently on Corona Geek, we continued working on our endless runner game as part of an ongoing game development series. So far we’ve defined the elements of the game, identified the required assets, and discussed the organization of our project.
In Hangout 132 we added code to create the player object, handle touch inputs, and control camera movement. By the end of the Hangout we had a player object we could move around with a single touch input and camera movement to keep our player centered in the middle of the screen.
Download the code and follow along.
Be sure to check out the summary of Hangout 131 were we started writing code to create walls that spawn at 45 degree angles.
Also, we have split the Hangout into clips to make things easier to follow. Watch the entire Hangout, or just the pieces that interest you.
Game Development Snippets
Here are the Hangout snippets. Download links for all samples and code snippets can found in the show notes for each of the Hangouts. Enjoy!
Part 1 – Wall Segments
Ed Maurina shows how to add random length wall segments to our endless runner hallway.
Part 2 – Detecting Collisions
Ed shows how to detect collisions between the player and walls.
Part 3 – Adding Touch Inputs
Ed shows how to add touch input to control player movement.
Part 4 – Adding Touch Inputs Continued
Ed continues the touch input conversation.
Part 5 – Adding Camera Movement
Ed shows how to add camera movement that follows the player object.
Also, here are the previous Hangouts in the series:
- Hangout 129 – Game Planning
- Hangout 130 – Project Organization
- Hangout 131 – Coding Walls
- Hangout 132 – Coding Touch Input
Thank you for watching, listening, and following Corona Geek:
No Comments