Hrishi stood proudly and began, “Hi, my name is Hrishi, and today I’m presenting my Pac-Man project. I’m 9 years old, and I like sports and the color blue.”
He explained the game’s premise: “We made our own Pac-Man using MakeCode blocks. Pac-Man moves around the screen trying to catch a ghost, just like the real game.”
He shared his screen to reveal the code, walking through the logic. “At the start, it counts down from three, then shows ‘Start.’ Pac-Man and the ghost sprites are created randomly on the grid.”
Hrishi pointed out the clever feature: “The ghost runs away when Pac-Man gets too close, making it fun and challenging.” He explained how the accelerometer controls Pac-Man’s movement, changing the sprite’s X and Y position based on the device’s tilt.
During the demo, Hrishi moved the micro:bit slowly, trying to catch the ghost. “Sometimes, the movement is a bit slow, but it works,” he admitted. With a few tweaks to the pause timing, the game sped up and became more fluid.
When Pac-Man catches the ghost, a happy face appears, a celebratory tune plays, and the score increases by one. The screen clears and displays the current score, then resets the positions to start again.
The teacher applauded Hrishi’s creativity and perseverance. “You created a fun, interactive game that shows great understanding of block coding and sprite dynamics. You worked through the hiccups well, and that’s what matters most.”
Hrishi beamed as the class cheered, proud of his playful Pac-Man chase brought to life through coding and a little persistence.