MakeCode Microbit 遊戲設計:「接雞蛋」(Microbit Game: Egg Catching)
若您覺得文章寫得不錯,請點選文章上的廣告,來支持小編,謝謝。 If you like this post, please click the ads on the blog or buy me a coffee . Thank you very much. 小編曾做過 Scratch 遊戲:接雞蛋 ,而且最近剛好看到Youtube 上的影片: Micro:bit 創意遊戲:「接水果 」 。於是來教大家自己用Microbit來做一個玩玩吧。The blog post: Scratch 遊戲:接雞蛋 created a egg-catching game. And there is a video on youtube: Micro:bit 創意遊戲:「接水果 」 . So, this post will create a Microbit game: Egg Catching. 首先來分析影片中遊戲的功能有哪些: Game design: 角色「player」(就是玩家你囉),位在最下方的紅點。Player will be at (x, y) = (2, 4) when the game is started. 角色「egg」(從天而降的雞蛋),位於上方不停落下的紅點。Egg will be at (x, y) = (pick random 0 to 4, 0) when the game is started. A按鈕將「player」角色往左移動一格。When the A button is pressed, player moves to the left. B按鈕將「player」角色往右移動一格。When the B button is pressed, player moves to the right. 「player」角色接到「egg」角色時,會有動畫與音效,並得一分。When the player catches the egg, score 1 and perform some animation and play a melody. 雞蛋落到地面三次時,遊戲結束,並顯示Game Over,以及總得分。When the egg fall to the ground three times, the ga...