Showing a Gmae I Made,code`s
by Student Rover Challenge Korea in Craft > Digital Graphics
60 Views, 2 Favorites, 0 Comments
Showing a Gmae I Made,code`s
hi im choi hoyeon i made animations and games this is a game you control a delivery drone to deliver drinks
you can play on entry
Supplies
1 Arduino Uno https://robotscience.kr/goods/viewno=16705&gad_source=1&gclid=CjwKCAjwgpCzBhBhEiwAOSQWQSIDv3J_J1_MIojPZJYKNaAkwnqA1dI3rin75A7sez6g3U4__5q_BoCRY0QAvD_BwE
5 jumper cables
https://www.coupang.com/vp/products/204741680?itemId=602249249&vendorItemId=4578044326&src=1042503&spec=10304984&addtag=400&ctag=204741680&lptag=10304984I602249249V4578044326&itime=20240609141109&pageType=PRODUCT&pageValue=204741680&wPcid=17179098691900504209322&wRef=&wTime=20240609141109&redirect=landing&gclid=CjwKCAjwgpCzBhBhEiwAOSQWQX9DEoiNpdc3rIU4YPPyVpqYDeMBuL9Q0paTkS3Pn28CU7ScbFR_BxoCGj0QAvD_BwE&mcid=0d988f53d47240b592b9f41e43b8b180&campaignid=20594956462&adgroupid=&network=&isAddedCart=
1 joystick module
https://www.temu.com/ul/kuiper/un9.html?subj=coupon-un&_bg_fs=1&_p_jump_id=895&_x_vst_scene=adg&goods_id=601099535334469&sku_id=17592295943205&adg_ctx=a-d30fbf7d~c-6beaee57~f-158fe53f&_x_ads_sub_channel=shopping&_p_rfs=1&_x_ns_prz_type=-1&_x_ns_sku_id=17592295943205&mrk_rec=1&_x_ads_channel=google&_x_gmc_account=5072611099&_x_login_type=Google&_x_ads_account=9704659649&_x_ads_set=20491163883&_x_ads_id=155658177569&_x_ads_creative_id=671443087422&_x_ns_source=g&_x_ns_gclid=CjwKCAjwgpCzBhBhEiwAOSQWQc4Pf2bnnf3nrYPc1NqieyeSyFYBwRTBOiGvhXs6YqV_VlO0CBM1jxoChxAQAvD_BwE&_x_ns_placement=&_x_ns_match_type=&_x_ns_ad_position=&_x_ns_product_id=17592295943205&_x_ns_target=&_x_ns_devicemodel=&_x_ns_wbraid=Cj8KCQjwgpCzBhCIARIuAOU3VdEuIAHjAYKkc3RX8DmAgOOQITe-7SKiGZ36CoqLcGs6-o5bZnnr11-U3hoCWDM&_x_ns_gbraid=0AAAAAo4mICGqd-sFyyOApv-l5xxliA0GA&_x_ns_targetid=pla-1889479349923&gad_source=1&gclid=CjwKCAjwgpCzBhBhEiwAOSQWQc4Pf2bnnf3nrYPc1NqieyeSyFYBwRTBOiGvhXs6YqV_VlO0CBM1jxoChxAQAvD_BwE
Makeing the Background
I made the background and divide it in to 6 parts the part`s are the floor,the space,cloud`s,a Aurora and the sun.
the reson i made the background in to 6 part is because the speed of the the floor,cloud`s,the Aurora and the sun is different
the sun`s code
import Entry
import Arduino
각도 = 0
체력 = 20
모SHIP = 0
기록 = 0
def when_start_scene():
while True:
Entry.add_x(10)
the
import Entry
import Arduino
the Aurora`s code
각도 = 0
체력 = 20
모SHIP = 0
기록 = 0
def when_start_scene():
while True:
Entry.make_clone_of("self")
Entry.wait_for_sec(random.randint(6, 7))
def when_make_clone():
while not Entry.is_touched("edge_left"):
Entry.move_to_direction(-0.3)
for i in range(1800):
Entry.move_to_direction(-0.3)
Entry.remove_this_clone()
cloud1`s code
import Entry
import Arduino
각도 = 0
체력 = 20
모SHIP = 0
기록 = 0
def when_start_scene():
while True:
Entry.make_clone_of("self")
Entry.wait_for_sec(random.randint(8, 9))
def when_start():
Entry.start_scene("게임")
def when_make_clone():
while not Entry.is_touched("edge_left"):
Entry.move_to_direction(-1)
for i in range(465):
Entry.move_to_direction(-1)
Entry.remove_this_clone()
cloud2`s code
import Entry
import Arduino
각도 = 0
체력 = 20
모SHIP = 0
기록 = 0
def when_make_clone():
while not Entry.is_touched("edge_left"):
Entry.move_to_direction(-0.5)
for i in range(921):
Entry.move_to_direction(-0.5)
Entry.remove_this_clone()
def when_start_scene():
while True:
Entry.make_clone_of("self")
Entry.wait_for_sec(random.randint(11, 13))
the floor`s code
import Entry
import Arduino
각도 = 0
체력 = 20
모SHIP = 0
기록 = 0
def when_start_scene():
while True:
Entry.change_shape_to("next")
Entry.wait_for_sec(0.01)
Makeing the Delivery Drone,Enemies,Healing Item,the Drink
The player is a Delivery Drone he can shoot the drink`s but when it shoot`s he lose some HP
The enemies robots is obstacle`s for the Drone have to doge or shoot the robots
The healing item`s are fruit basket`s it heal`s 1 health
the Delivery Drone`s code
import Entry
import Arduino
각도 = 0
체력 = 20
모SHIP = 0
기록 = 0
def when_start_scene():
while True:
if (Arduino.sensor_value("A1") < 10):
Entry.add_y(6)
if (Arduino.sensor_value("A1") > 1000):
Entry.add_y(-6)
if ((Arduino.sensor_value("A1") < 10) and Entry.is_touched("edge_up")):
Entry.add_y(-6)
if ((Arduino.sensor_value("A1") > 1000) and Entry.is_touched("edge_down")):
Entry.add_y(6)
def when_start_scene():
while True:
if Entry.is_touched("새 오브젝트3"):
체력 += -1
Entry.play_sound("만화 같은 충돌1") <ㅡ(a sound)
Entry.set_effect("transparency", 50)
Entry.wait_for_sec(0.125)
Entry.clear_effect()
Entry.set_effect("transparency", 50)
Entry.hide()
Entry.wait_for_sec(0.125)
Entry.set_effect("color", 15)
Entry.show()
Entry.wait_for_sec(0.125)
Entry.hide()
Entry.wait_for_sec(0.125)
Entry.show()
Entry.wait_for_sec(0.125)
Entry.hide()력
Entry.wait_for_sec(0.125)
Entry.show()
Entry.clear_effect()
Entry.set_effect("transparency", 0)
def when_start_scene():
while True:
Entry.change_shape_to("next")
Entry.wait_for_sec(0.01)
def when_start_scene():
while True:
if (0.01 > 체력):
Entry.start_scene("오버")
if (20 < 체력):
체력 = 20
def when_start_scene():
while True:
if (Arduino.sensor_value("A3") > 1000):
Entry.send_signal("d")
the Enemie`s code
import Entry
import Arduino
각도 = 0
체력 = 20
모SHIP = 0
기록 = 0
3
def when_start_scene():
while True:
Entry.make_clone_of("self")
Entry.wait_for_sec(random.randint(0.6, 0.7))
def when_make_clone():
Entry.set_size(random.randint(60, 65.7))
Entry.add_y(random.randint(100, -100))
while True:
Entry.add_x(random.randint(-4, -6))
def when_make_clone():
while True:
if Entry.is_touched("새 오브젝트2"):
체력 += 0.01
Entry.change_shape("새그림1")
Entry.add_rotation(315)
Entry.move_to_direction(10)
Entry.wait_for_sec(0.01)
Entry.add_rotation(15)
Entry.move_to_direction(10)
Entry.wait_for_sec(0.01)
while not Entry.is_touched("edge_right"):
Entry.add_rotation(1)
Entry.move_to_direction(10)
Entry.change_shape("새그림")
Entry.set_rotation(0)
the healing item`s code
import Entry
import Arduino
각도 = 0
체력 = 20
모SHIP = 0
기록 = 0
def when_start_scene():
while True:
Entry.wait_for_sec(random.randint(4.9, 5))
Entry.make_clone_of("self")
def when_make_clone():
Entry.set_x(284.4)
Entry.wait_for_sec(random.randint(2.5, 3))
Entry.show()
Entry.set_size(76.4)
Entry.add_y(random.randint(100, -100))
while not Entry.is_touched("edge_left"):
Entry.move_to_direction(-8)
Entry.wait_for_sec(0.01)
for i in range(6):
Entry.move_to_direction(-8)
Entry.wait_for_sec(0.01)
Entry.remove_this_clone()
def when_make_clone():
while True:
if Entry.is_touched("새 오브젝트1"):
체력 += 1
Entry.play_sound("강아지1")
Entry.remove_this_clone()
def when_start_scene():
while True:
Entry.wait_for_sec(1)
기록 += 1
the drink`s code
import Entry
import Arduino
각도 = 0
체력 = 20
모SHIP = 0
기록 = 0
def when_start_scene():
Entry.hide()
while True:
Entry.move_to("새 오브젝트1")
def when_get_signal("d"):
체력 += -0.01
Entry.make_clone_of("self")
def when_make_clone():
Entry.show()
while not Entry.is_touched("edge_right"):
Entry.move_to_direction(10)
for i in range(10):
Entry.move_to_direction(10)
Entry.remove_this_clone()
Makeing the Helth and a Distance Check System
the helth`s code
import Entry
import Arduino
각도 = 0
체력 = 20
모SHIP = 0
기록 = 0
def when_start_scene():
while True:
if Entry.is_touched("새 오브젝트1"):
Entry.set_effect("transparency", 50)
else:
Entry.set_effect("transparency", 0)
def when_start_scene():
while True:
if (체력 == 20):
Entry.change_shape("풀피")
if ((체력 < 20) and (체력 >= 19)):
Entry.change_shape("1")
if ((체력 < 19) and (체력 >= 18)):
Entry.change_shape("2")
if ((체력 < 18) and (체력 >= 17)):
Entry.change_shape("3")
if ((체력 < 17) and (체력 >= 16)):
Entry.change_shape("4")
if ((체력 < 16) and (체력 >= 15)):
Entry.change_shape("5")
if ((체력 < 15) and (체력 >= 14)):
Entry.change_shape("6")
if ((체력 < 14) and (체력 >= 13)):
Entry.change_shape("7")
if ((체력 < 13) and (체력 >= 12)):
Entry.change_shape("8")
if ((체력 < 12) and (체력 >= 11)):
Entry.change_shape("9")
if ((체력 < 11) and (체력 >= 10)):
Entry.change_shape("10")
if ((체력 < 10) and (체력 >= 9)):
Entry.change_shape("11")
if ((체력 < 9) and (체력 >= 8)):
Entry.change_shape("12")
if ((체력 < 8) and (체력 >= 7)):
Entry.change_shape("13")
if ((체력 < 7) and (체력 >= 6)):
Entry.change_shape("14")
if ((체력 < 6) and (체력 >= 5)):
Entry.change_shape("15")
if ((체력 < 5) and (체력 >= 4)):
Entry.change_shape("16")
if ((체력 < 4) and (체력 >= 3)):
Entry.change_shape("17")
if ((체력 < 3) and (체력 >= 2)):
Entry.change_shape("18")
if ((체력 < 2) and (체력 >= 1)):
Entry.change_shape("19")
the Distance Check System`s code
1
import Entry
import Arduino
각도 = 0
체력 = 20
모SHIP = 0
기록 = 0
def when_start_scene():
while True:
if Entry.is_touched("새 오브젝트1"):
Entry.set_effect("transparency", 50)
else:
Entry.set_effect("transparency", 0)
2
import Entry
import Arduino
각도 = 0
체력 = 20
모SHIP = 0
기록 = 0
def when_start_scene():
Entry.set_xy_for_sec(140, -106, 100)
Entry.start_scene("엔딩")
Makeing the Game Over Sceen
the reson i`m makeing this is becuse you nead to know how far you got
the score`s code
import Entry
import Arduino
각도 = 0
체력 = 20
모SHIP = 0
기록 = 0
def when_start_scene():
while True:
Entry.write_text(("도착까지의 거리" + (100 - 기록)))
Makeing the Ending,final Score
the ending is the drone finding the people and the showing the final score
if you have 1~5helth F
if you have 6~10helth D
if you have 11~15helth C
if you have 16,17helth B
if you have 18,19helth A
if you have full helth S
the ending code is
1
import Entry
import Arduino
각도 = 0
체력 = 20
모SHIP = 0
기록 = 0
def when_start_scene():
for i in range(57):
Entry.change_shape("새그림")
Entry.wait_for_sec(0.01)
Entry.change_shape("새그림1")
Entry.wait_for_sec(0.01)
def when_start():
Entry.start_scene("엔딩")
def when_start_scene():
Entry.set_x(-500)
Entry.set_xy_for_sec(0, 0, 2)
Entry.wait_for_sec(0.01)
Entry.move_to_direction(5)
Entry.wait_for_sec(0.02)
Entry.move_to_direction(2.5)
Entry.wait_for_sec(0.02)
Entry.move_to_direction(0.25)
Entry.wait_for_sec(1.1)
while True:
Entry.change_shape("새그림2")
Entry.wait_for_sec(0.01)
Entry.change_shape("새 그림")
Entry.wait_for_sec(0.01)
2
import Entry
import Arduino
각도 = 0
체력 = 20
모SHIP = 0
기록 = 0
def when_start_scene():
Entry.hide()
Entry.wait_for_sec(3.15)
Entry.show()
Entry.wait_for_sec(1)
Entry.start_scene_of("next")
3
import Entry
import Arduino
각도 = 0
체력 = 20
모SHIP = 0
기록 = 0
def when_start_scene():
Entry.change_shape("도로")
Entry.wait_for_sec(3.15)
Entry.change_shape("도로1")
the score code is
import Entry
import Arduino
각도 = 0
체력 = 20
모SHIP = 0
기록 = 0
def when_get_signal("ㅋ"):
Entry.show()
def when_start_scene():
Entry.hide()
while True:
if (체력 <= 5):
Entry.change_shape("f")
if ((체력 > 5) and (체력 <= 10)):
Entry.change_shape("d")
if ((체력 > 10) and (체력 <= 15)):
Entry.change_shape("c")
if ((체력 > 15) and (체력 <= 17)):
Entry.change_shape("b")
if ((체력 > 17) and (체력 <= 19)):
Entry.change_shape("a")
if (체력 == 20):
Entry.change_shape("s")