The solution I found came from DK Publishing, who kindly provided me an advanced look at a new workbook they have prepared that uses the free Scratch 2.0 programming environment created by MIT. I’ve been looking for something to recommend to parents as a simple way to gauge the interest of a child in programming without being overly complicated or lengthy. That said, in order to even consider the request, I’ve been examining various apps and books to see just how I might go about introducing programming concepts to a younger audience. I’ve also had a few requests from parents of younger children for a similar type of camp, but it won’t be happening in 2016. Bryson Payne, who also came and gave a short talk on programming to both groups.įor Summer 2016, I’ll once again be offering the camp to the same age group, but I’m also pondering an ‘Intermediate Game Programming’ camp for those students who took last year’s camp. ![]() The kids got hands-on with a number of game development platforms as well as an introduction to Python and a signed copy of Teach Your Kids to Code ( review here) to take home from the author, Dr. The camp was for kids entering 3rd through 7th grade - this was sort of a shot-in-the-dark decision based on my oldest son (age 8 and entering 3rd in Fall 2015) and what I’d seen him capable of with certain programming tools and apps. ![]() We can duplicate more of these items and place them in other locations on our screen.I taught a week-long camp last summer titled ‘Beginning Game Programming” - I had a morning session (8am-12pm) and an afternoon session (1pm-5pm), and each class had 16 kids anxious to learn some new skills and, of course, play some games. Food Pelletsįinally, we can add food pellets to the game and have them hide when they are touched by Pacman. We follow the same pattern as moving up and down. Moving the Ghost left to right has us changing the X position. You will be able to duplicate the ghosts later to make your game harder. Only add one of these to each type of ghost, so pick a ghost that moves up and one that moves down. After each touch we add a little bit of movement in the opposite direction, this prevents the ghost getting stuck on the maze wall. Moving the Y position up and down depending on if the ghost hits a maze colour. Our ghosts should move around the screen, we are going to make them move in two different directions: Up/Down (not the normal 240 and -240) Ghost Movement This code checks to see if Pacman has gone past the boundary of our backdrop, which is located at 165, and -165. Let’s add some code to always check where Pacman is. If we move to the edge of the screen, we expect Pacman to cross over to the other side of the screen. We can add a small delay so that it looks like Pacman is eating at a normal rate. If either the left / right or up / down are pressed we can switch to the next costume in the Pacman sprite. One of the cool things that Pacman does as he moves, is he opens and closes his mouth, we can use another green flag hat block and check for the arrow key presses. Does Pacman move around the Maze? Does he stop at the maze walls? Moving Animation Repeat this for the up / down & right keys. The next item to check is if the player has pressed an arrow key: We want to always be checking to see if the player has pressed an arrow key, if we always want to be doing something, then we should consider using a forever block. Let’s start by moving Pacman around the maze. ![]() You might notice that the Pacman has a little black dot in front of him, we are going to use that dot to detect if a maze part is in front of us. We also have a few sprites that we can use to develop our game: We already have a nice backdrop with a Pacman style maze: We must also make sure that we avoid the ghosts! The goal of the game is to move the yellow Pacman around the screen and eat all of the food pellets. ![]() If you have never seen Pacman before, well you’re in for a real treat. Today we are going to build a Pacman game.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |