できるだけ短い時間でゲーム作りに挑戦。1時間以内に作りたかったけど2時間近くかかってしまった… HSP 3.4β2, Win XP で動作確認しています。制限時間10秒、ミスしても終了です。
できるだけ短い時間でゲーム作りに挑戦。1時間以内に作りたかったけど2時間近くかかってしまった… HSP 3.4β2, Win XP で動作確認しています。制限時間10秒、ミスしても終了です。
buffer 1, 800, 200font msgothic, 200, 16mes "←↑→↓"arrow = 1, 2, 4, 8celdiv 1, 200, , 100, 100gselfont "arial", 30, 16scene = 1*mainLoopstick keyif (scene) {if (key & 16) {scene = 0gosub *initGame}} else {if (key & 15) {if (key == arrow(nowNo)) {score++nowNo = rnd(4)arrowAni = 4} else {scene = 2}}}redraw 0color 255, 255, 255boxfif (scene != 1) {pos 320, 240arrowAni -= arrowAni > 0celput 1, nowNo, 0.2 * arrowAni + 1, 0.2 * arrowAni + 1}colorpos 100, 230mes scorepos 480, 230mes strf("%2.2f", double(remain) / 66)if (scene == 1) {pos 230, 80mes "Arrows Attack"}if (scene == 2) {pos 285, 80mes "Miss!"}if (scene == 3) {pos 250, 80mes"Time's up!"}if (scene) {pos 170, 380mes "SPACE key to START"}redrawawait 15if (scene == 0) {remain--if (remain == 0) {scene = 3}}goto *mainLoop*initGamerandomizenowNo = rnd(4)remain = 66 * 10arrowAni = 4dim scorereturn