{"id":1063468,"student_id":2589,"content":"import game\nimport random\n\n\nground = game.create_sprite('ground.png')\ndino = game.create_sprite('dino_0.png', 'dino_1.png')\nb1 = game.create_sprite('0.png', '1.png', '2.png', '3.png', '4.png')\nb2 = game.create_sprite('0.png', '1.png', '2.png', '3.png', '4.png')\nb3 = game.create_sprite('0.png', '1.png', '2.png', '3.png', '4.png')\nboard = game.create_sprite('board.png')\nhint = game.create_sprite(\"hint.png\")\n\ngame.create_sound('bgm.mp3', True)\n\ndino.y = 600\nb1.y = 600\nb2.y = 600\nb3.y = 600\n\ndino.x = 300\nb1.x = 2000\nb2.x = 2500\nb3.x = 3000\n\nvelocity_y = 0\nvelocity_x = 10\nscore = 0\n\n\ndef loop():\n global velocity_x, velocity_y, score\n\n if hint.hidden:\n ground.x -= velocity_x\n b1.x -= velocity_x * 1.3\n b2.x -= velocity_x * 1.3\n b3.x -= velocity_x * 1.3\n\n if ground.x \u003c= -1200:\n ground.x += 3000\n\n if b1.x \u003c -100:\n b1.x += b3.x + random.randrange(400, 1000) * velocity_x / 10\n b1.costume_id = random.randrange(5)\n\n if b2.x \u003c -100:\n b2.x += b1.x + random.randrange(400, 1000) * velocity_x / 10\n b2.costume_id = random.randrange(5)\n\n if b3.x \u003c -100:\n b3.x += b2.x + random.randrange(400, 1000) * velocity_x / 10\n b3.costume_id = random.randrange(5)\n\n dino.y += velocity_y\n velocity_y += 2\n \n if game.key.space and dino.y \u003e= 600:\n velocity_y = -30\n game.create_sound('jump.ogg')\n\n if dino.y \u003e 600:\n dino.y = 600\n\n if (dino.touched(b1) or dino.touched(b2) or dino.touched(b3)):\n hint.hidden = False\n\n if hint.hidden:\n score += 1 / 6\n dino.costume_id = int(score) % 2\n\n game.draw_text(int(score), 10, 10, 'black', 60)\n\n if score % 300 \u003c 150:\n game.set_backdrop('sky_light.png')\n \n else:\n game.set_backdrop('sky_dark.png')\n\n velocity_x = 10 + score / 100\n\n if game.key.enter and hint.hidden == False:\n hint.hidden = True\n b1.x = 2000\n b2.x = 2500\n b3.x = 3000\n score = 0\n\n\ngame.forever(loop)\n","created_at":"2025-07-18T13:37:50.363+08:00","updated_at":"2025-07-18T13:39:28.005+08:00","name":"Dino Dash","language":"python","screenshot":{"url":null},"parent_id":1063463,"plugin":"","description":null,"note":null,"status":"public","like_student_ids":[],"is_featured":false,"views":48,"hashid":"vngsvgz6p","is_content_changed":false,"review_status":"unsubmitted","submitted_at":null,"reviewed_at":null,"advise":null,"is_deleted":false}
[{"id":39740018,"file_name":"3.png","project_id":1063468,"asset_id":264886,"created_at":"2025-07-18T13:37:50.369+08:00","updated_at":"2025-07-18T13:37:50.369+08:00"},{"id":39740019,"file_name":"4.png","project_id":1063468,"asset_id":264887,"created_at":"2025-07-18T13:37:50.370+08:00","updated_at":"2025-07-18T13:37:50.370+08:00"},{"id":39740020,"file_name":"board.png","project_id":1063468,"asset_id":264890,"created_at":"2025-07-18T13:37:50.372+08:00","updated_at":"2025-07-18T13:37:50.372+08:00"},{"id":39740021,"file_name":"dino_0.png","project_id":1063468,"asset_id":264891,"created_at":"2025-07-18T13:37:50.373+08:00","updated_at":"2025-07-18T13:37:50.373+08:00"},{"id":39740022,"file_name":"dino_1.png","project_id":1063468,"asset_id":264892,"created_at":"2025-07-18T13:37:50.374+08:00","updated_at":"2025-07-18T13:37:50.374+08:00"},{"id":39740023,"file_name":"bgm.mp3","project_id":1063468,"asset_id":202056,"created_at":"2025-07-18T13:37:50.375+08:00","updated_at":"2025-07-18T13:37:50.375+08:00"},{"id":39740024,"file_name":"milestone.mp3","project_id":1063468,"asset_id":202055,"created_at":"2025-07-18T13:37:50.376+08:00","updated_at":"2025-07-18T13:37:50.376+08:00"},{"id":39740025,"file_name":"ground.png","project_id":1063468,"asset_id":264582,"created_at":"2025-07-18T13:37:50.377+08:00","updated_at":"2025-07-18T13:37:50.377+08:00"},{"id":39740026,"file_name":"hint.png","project_id":1063468,"asset_id":832436,"created_at":"2025-07-18T13:37:50.378+08:00","updated_at":"2025-07-18T13:37:50.378+08:00"},{"id":39740027,"file_name":"0.png","project_id":1063468,"asset_id":264883,"created_at":"2025-07-18T13:37:50.379+08:00","updated_at":"2025-07-18T13:37:50.379+08:00"},{"id":39740028,"file_name":"2.png","project_id":1063468,"asset_id":264885,"created_at":"2025-07-18T13:37:50.380+08:00","updated_at":"2025-07-18T13:37:50.380+08:00"},{"id":39740029,"file_name":"bg.png","project_id":1063468,"asset_id":265661,"created_at":"2025-07-18T13:37:50.381+08:00","updated_at":"2025-07-18T13:37:50.381+08:00"},{"id":39740030,"file_name":"sky_light.png","project_id":1063468,"asset_id":265661,"created_at":"2025-07-18T13:37:50.382+08:00","updated_at":"2025-07-18T13:37:50.382+08:00"},{"id":39740031,"file_name":"sky_dark.png","project_id":1063468,"asset_id":264888,"created_at":"2025-07-18T13:37:50.383+08:00","updated_at":"2025-07-18T13:37:50.383+08:00"},{"id":39740032,"file_name":"jump.ogg","project_id":1063468,"asset_id":172839,"created_at":"2025-07-18T13:37:50.384+08:00","updated_at":"2025-07-18T13:37:50.384+08:00"},{"id":39740033,"file_name":"1.png","project_id":1063468,"asset_id":832434,"created_at":"2025-07-18T13:37:50.385+08:00","updated_at":"2025-07-18T13:37:50.385+08:00"}]
橘蘋學習平台
我的作品
檢視專案頁
匯出
複製
匯入
刪除
截圖
繁中
简中
English
日本語
用手機掃描下方 QRCode 進行安裝
或您也可以
下載 APK
到這台電腦