pyscratch-pysc 1.0.3__tar.gz → 2.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (246) hide show
  1. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/PKG-INFO +8 -3
  2. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/1-create-sprites/main.py +10 -0
  3. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/1-create-sprites/player.py +5 -0
  4. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/1-create-sprites-task/enemy.py +4 -0
  5. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/1-create-sprites-task/main.py +11 -0
  6. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/1-create-sprites-task/player.py +5 -0
  7. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/2-basic-events/enemy.py +4 -0
  8. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/2-basic-events/main.py +11 -0
  9. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/2-basic-events/player.py +31 -0
  10. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/2-basic-events-task1/enemy.py +4 -0
  11. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/2-basic-events-task1/main.py +11 -0
  12. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/2-basic-events-task1/player.py +23 -0
  13. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/2-basic-events-task2/enemy.py +14 -0
  14. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/2-basic-events-task2/main.py +11 -0
  15. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/2-basic-events-task2/player.py +23 -0
  16. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/3-loops-conditions/enemy.py +14 -0
  17. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/3-loops-conditions/main.py +11 -0
  18. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/3-loops-conditions/player.py +23 -0
  19. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/3-loops-conditions-task1/enemy.py +14 -0
  20. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/3-loops-conditions-task1/main.py +11 -0
  21. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/3-loops-conditions-task1/player.py +34 -0
  22. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/3-loops-conditions-task2/enemy.py +23 -0
  23. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/3-loops-conditions-task2/main.py +11 -0
  24. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/3-loops-conditions-task2/player.py +41 -0
  25. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/4-variables/enemy.py +23 -0
  26. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/4-variables/main.py +11 -0
  27. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/4-variables/player.py +59 -0
  28. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/5-sprite-object/enemy.py +19 -0
  29. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/5-sprite-object/main.py +11 -0
  30. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/5-sprite-object/player.py +20 -0
  31. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/5-sprite-object-task1/enemy.py +19 -0
  32. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/5-sprite-object-task1/main.py +11 -0
  33. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/5-sprite-object-task1/player.py +38 -0
  34. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/5-sprite-object-task2/enemy.py +20 -0
  35. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/5-sprite-object-task2/main.py +11 -0
  36. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/5-sprite-object-task2/player.py +58 -0
  37. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/6-referencing-sprites/enemy.py +32 -0
  38. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/6-referencing-sprites/main.py +11 -0
  39. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/6-referencing-sprites/player.py +59 -0
  40. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/6-referencing-sprites-task/enemy.py +37 -0
  41. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/6-referencing-sprites-task/main.py +11 -0
  42. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/6-referencing-sprites-task/player.py +60 -0
  43. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/7-parameterised-events/enemy.py +37 -0
  44. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/7-parameterised-events/main.py +11 -0
  45. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/7-parameterised-events/player.py +83 -0
  46. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/7-parameterised-events-msg/enemy.py +37 -0
  47. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/7-parameterised-events-msg/main.py +11 -0
  48. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/7-parameterised-events-msg/player.py +86 -0
  49. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/7-parameterised-events-task/enemy.py +35 -0
  50. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/7-parameterised-events-task/main.py +11 -0
  51. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/7-parameterised-events-task/player.py +86 -0
  52. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/8-backdrop-music/enemy.py +35 -0
  53. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/8-backdrop-music/main.py +11 -0
  54. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/8-backdrop-music/player.py +86 -0
  55. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/9-polish/enemy.py +39 -0
  56. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/9-polish/enemy_red.py +40 -0
  57. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/9-polish/main.py +12 -0
  58. pyscratch_pysc-2.0.0/assets/startup-assets/tutorial-steps/9-polish/player.py +119 -0
  59. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/1-create-sprites/main.py +10 -0
  60. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/1-create-sprites/player.py +5 -0
  61. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/1-create-sprites-task/enemy.py +4 -0
  62. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/1-create-sprites-task/main.py +11 -0
  63. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/1-create-sprites-task/player.py +5 -0
  64. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/2-basic-events/enemy.py +4 -0
  65. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/2-basic-events/main.py +11 -0
  66. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/2-basic-events/player.py +31 -0
  67. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/2-basic-events-task1/enemy.py +4 -0
  68. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/2-basic-events-task1/main.py +11 -0
  69. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/2-basic-events-task1/player.py +23 -0
  70. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/2-basic-events-task2/enemy.py +14 -0
  71. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/2-basic-events-task2/main.py +11 -0
  72. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/2-basic-events-task2/player.py +23 -0
  73. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/3-loops-conditions/enemy.py +14 -0
  74. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/3-loops-conditions/main.py +11 -0
  75. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/3-loops-conditions/player.py +23 -0
  76. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/3-loops-conditions-task1/enemy.py +14 -0
  77. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/3-loops-conditions-task1/main.py +11 -0
  78. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/3-loops-conditions-task1/player.py +34 -0
  79. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/3-loops-conditions-task2/enemy.py +23 -0
  80. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/3-loops-conditions-task2/main.py +11 -0
  81. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/3-loops-conditions-task2/player.py +41 -0
  82. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/4-variables/enemy.py +23 -0
  83. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/4-variables/main.py +11 -0
  84. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/4-variables/player.py +59 -0
  85. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/5-sprite-object/enemy.py +19 -0
  86. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/5-sprite-object/main.py +11 -0
  87. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/5-sprite-object/player.py +20 -0
  88. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/5-sprite-object-task1/enemy.py +19 -0
  89. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/5-sprite-object-task1/main.py +11 -0
  90. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/5-sprite-object-task1/player.py +38 -0
  91. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/5-sprite-object-task2/enemy.py +20 -0
  92. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/5-sprite-object-task2/main.py +11 -0
  93. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/5-sprite-object-task2/player.py +58 -0
  94. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/6-referencing-sprites/enemy.py +32 -0
  95. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/6-referencing-sprites/main.py +11 -0
  96. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/6-referencing-sprites/player.py +59 -0
  97. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/6-referencing-sprites-task/enemy.py +37 -0
  98. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/6-referencing-sprites-task/main.py +11 -0
  99. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/6-referencing-sprites-task/player.py +60 -0
  100. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/7-parameterised-events/enemy.py +37 -0
  101. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/7-parameterised-events/main.py +11 -0
  102. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/7-parameterised-events/player.py +83 -0
  103. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/7-parameterised-events-msg/enemy.py +37 -0
  104. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/7-parameterised-events-msg/main.py +11 -0
  105. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/7-parameterised-events-msg/player.py +86 -0
  106. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/7-parameterised-events-task/enemy.py +35 -0
  107. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/7-parameterised-events-task/main.py +11 -0
  108. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/7-parameterised-events-task/player.py +86 -0
  109. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/8-backdrop-music/enemy.py +35 -0
  110. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/8-backdrop-music/main.py +11 -0
  111. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/8-backdrop-music/player.py +86 -0
  112. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/9-polish/enemy.py +39 -0
  113. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/9-polish/enemy_red.py +40 -0
  114. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/9-polish/main.py +12 -0
  115. pyscratch_pysc-2.0.0/examples/fish/assets/startup-assets/tutorial-steps/9-polish/player.py +119 -0
  116. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 7 - Referencing other sprites/enemy.py +1 -6
  117. pyscratch_pysc-2.0.0/examples/tutorial-day1/chest.py +21 -0
  118. pyscratch_pysc-2.0.0/examples/tutorial-day1/enemy.py +106 -0
  119. pyscratch_pysc-2.0.0/examples/tutorial-day1/friend.py +51 -0
  120. pyscratch_pysc-2.0.0/examples/tutorial-day1/in-steps/1-create-sprites/chest.py +5 -0
  121. pyscratch_pysc-2.0.0/examples/tutorial-day1/in-steps/1-create-sprites/enemy.py +5 -0
  122. pyscratch_pysc-2.0.0/examples/tutorial-day1/in-steps/1-create-sprites/main.py +9 -0
  123. pyscratch_pysc-2.0.0/examples/tutorial-day1/in-steps/2-basic-events/chest.py +24 -0
  124. pyscratch_pysc-2.0.0/examples/tutorial-day1/in-steps/2-basic-events/enemy.py +18 -0
  125. pyscratch_pysc-2.0.0/examples/tutorial-day1/in-steps/2-basic-events/main.py +9 -0
  126. pyscratch_pysc-2.0.0/examples/tutorial-day1/in-steps/3-flow/chest.py +25 -0
  127. pyscratch_pysc-2.0.0/examples/tutorial-day1/in-steps/3-flow/enemy.py +56 -0
  128. pyscratch_pysc-2.0.0/examples/tutorial-day1/in-steps/3-flow/friend.py +47 -0
  129. pyscratch_pysc-2.0.0/examples/tutorial-day1/in-steps/3-flow/main.py +9 -0
  130. pyscratch_pysc-2.0.0/examples/tutorial-day1/in-steps/4-variables/chest.py +37 -0
  131. pyscratch_pysc-2.0.0/examples/tutorial-day1/in-steps/4-variables/enemy.py +76 -0
  132. pyscratch_pysc-2.0.0/examples/tutorial-day1/in-steps/4-variables/friend.py +49 -0
  133. pyscratch_pysc-2.0.0/examples/tutorial-day1/in-steps/4-variables/main.py +9 -0
  134. pyscratch_pysc-2.0.0/examples/tutorial-day1/in-steps/5-backdrops/chest.py +37 -0
  135. pyscratch_pysc-2.0.0/examples/tutorial-day1/in-steps/5-backdrops/enemy.py +76 -0
  136. pyscratch_pysc-2.0.0/examples/tutorial-day1/in-steps/5-backdrops/friend.py +49 -0
  137. pyscratch_pysc-2.0.0/examples/tutorial-day1/in-steps/5-backdrops/main.py +26 -0
  138. pyscratch_pysc-2.0.0/examples/tutorial-day1/main.py +48 -0
  139. pyscratch_pysc-2.0.0/examples/tutorial-day1/target.py +14 -0
  140. pyscratch_pysc-2.0.0/examples/tutorial-day1/text.py +23 -0
  141. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyproject.toml +1 -1
  142. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/game_module.py +73 -32
  143. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/sprite.py +42 -10
  144. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch_pysc.egg-info/PKG-INFO +8 -3
  145. pyscratch_pysc-2.0.0/pyscratch_pysc.egg-info/SOURCES.txt +242 -0
  146. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/readme.md +7 -2
  147. pyscratch_pysc-1.0.3/pyscratch_pysc.egg-info/SOURCES.txt +0 -105
  148. pyscratch_pysc-1.0.3/setup.py +0 -13
  149. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/assets/bullet_hell/enemy.py +0 -0
  150. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/assets/bullet_hell/enemy_bullets.py +0 -0
  151. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/assets/bullet_hell/main.py +0 -0
  152. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/assets/bullet_hell/old_verisons/bullet_hell.py +0 -0
  153. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/assets/bullet_hell/old_verisons/enemy.py +0 -0
  154. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/assets/bullet_hell/old_verisons/game_start.py +0 -0
  155. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/assets/bullet_hell/old_verisons/main.py +0 -0
  156. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/assets/bullet_hell/old_verisons/player.py +0 -0
  157. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/assets/bullet_hell/player.py +0 -0
  158. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/assets/bullet_hell/player_bullets.py +0 -0
  159. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/assets/bullet_hell/setting.py +0 -0
  160. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/animated_sprite/main.py +0 -0
  161. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/animated_sprite/my_sprite.py +0 -0
  162. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/bullet_hell/enemy.py +0 -0
  163. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/bullet_hell/enemy_bullet.py +0 -0
  164. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/bullet_hell/main.py +0 -0
  165. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/bullet_hell/player.py +0 -0
  166. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/bullet_hell/player_bullet.py +0 -0
  167. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/doodle_jump/main.py +0 -0
  168. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/doodle_jump/platforms.py +0 -0
  169. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/doodle_jump/player.py +0 -0
  170. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/fish/assets/bullet_hell/enemy.py +0 -0
  171. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/fish/assets/bullet_hell/enemy_bullets.py +0 -0
  172. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/fish/assets/bullet_hell/main.py +0 -0
  173. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/fish/assets/bullet_hell/old_verisons/bullet_hell.py +0 -0
  174. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/fish/assets/bullet_hell/old_verisons/enemy.py +0 -0
  175. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/fish/assets/bullet_hell/old_verisons/game_start.py +0 -0
  176. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/fish/assets/bullet_hell/old_verisons/main.py +0 -0
  177. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/fish/assets/bullet_hell/old_verisons/player.py +0 -0
  178. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/fish/assets/bullet_hell/player.py +0 -0
  179. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/fish/assets/bullet_hell/player_bullets.py +0 -0
  180. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/fish/assets/bullet_hell/setting.py +0 -0
  181. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/fish/fish.py +0 -0
  182. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/fish/main.py +0 -0
  183. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 1 - create a sprite/main.py +0 -0
  184. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 1 - create a sprite/player.py +0 -0
  185. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 2 - control a sprite/main.py +0 -0
  186. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 2 - control a sprite/player.py +0 -0
  187. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 3 - backdrops/main.py +0 -0
  188. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 3 - backdrops/player.py +0 -0
  189. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 4 - clone a sprite/enemy.py +0 -0
  190. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 4 - clone a sprite/main.py +0 -0
  191. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 4 - clone a sprite/player.py +0 -0
  192. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 4 - clone a sprite (simple)/enemy.py +0 -0
  193. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 4 - clone a sprite (simple)/main.py +0 -0
  194. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 4 - clone a sprite (simple)/player.py +0 -0
  195. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 5 - local variables/enemy.py +0 -0
  196. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 5 - local variables/main.py +0 -0
  197. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 5 - local variables/player.py +0 -0
  198. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 6 - shared variables/enemy.py +0 -0
  199. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 6 - shared variables/main.py +0 -0
  200. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 6 - shared variables/player.py +0 -0
  201. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 7 - Referencing other sprites/hearts.py +0 -0
  202. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 7 - Referencing other sprites/main.py +0 -0
  203. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 7 - Referencing other sprites/player.py +0 -0
  204. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 8 - sprite variables/enemy.py +0 -0
  205. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 8 - sprite variables/hearts.py +0 -0
  206. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 8 - sprite variables/main.py +0 -0
  207. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 8 - sprite variables/player.py +0 -0
  208. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 9 - messages/enemy.py +0 -0
  209. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 9 - messages/hearts.py +0 -0
  210. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 9 - messages/main.py +0 -0
  211. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/getting-started/step 9 - messages/player.py +0 -0
  212. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/perspective_background/main.py +0 -0
  213. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/perspective_background/player.py +0 -0
  214. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/perspective_background/trees.py +0 -0
  215. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/simple_pong/ball.py +0 -0
  216. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/simple_pong/left_paddle.py +0 -0
  217. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/simple_pong/main.py +0 -0
  218. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/simple_pong/right_paddle.py +0 -0
  219. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/examples/simple_pong/score_display.py +0 -0
  220. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/__init__.py +0 -0
  221. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/event.py +0 -0
  222. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/helper.py +0 -0
  223. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/tools/sprite_preview/left_panel/frame_preview_card.py +0 -0
  224. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/tools/sprite_preview/left_panel/frame_preview_panel.py +0 -0
  225. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/tools/sprite_preview/main.py +0 -0
  226. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/tools/sprite_preview/main_panel/animation_display.py +0 -0
  227. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/tools/sprite_preview/main_panel/frame_bin.py +0 -0
  228. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/tools/sprite_preview/main_panel/play_edit_ui.py +0 -0
  229. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/tools/sprite_preview/main_panel/set_as_sprite_folder.py +0 -0
  230. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/tools/sprite_preview/main_panel/sprite_edit_ui.py +0 -0
  231. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/tools/sprite_preview/main_panel/warning_message.py +0 -0
  232. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/tools/sprite_preview/right_panel/back_button.py +0 -0
  233. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/tools/sprite_preview/right_panel/cut_button.py +0 -0
  234. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/tools/sprite_preview/right_panel/cut_parameter_fitting.py +0 -0
  235. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/tools/sprite_preview/right_panel/cut_parameters.py +0 -0
  236. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/tools/sprite_preview/right_panel/file_display.py +0 -0
  237. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/tools/sprite_preview/right_panel/file_display_area.py +0 -0
  238. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/tools/sprite_preview/right_panel/spritesheet_view.py +0 -0
  239. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/tools/sprite_preview/right_panel/ss_select_corner.py +0 -0
  240. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/tools/sprite_preview/settings.py +0 -0
  241. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/tools/sprite_preview/utils/input_box.py +0 -0
  242. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch/tools/sprite_preview/utils/render_wrapped_file_name.py +0 -0
  243. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch_pysc.egg-info/dependency_links.txt +0 -0
  244. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch_pysc.egg-info/requires.txt +0 -0
  245. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/pyscratch_pysc.egg-info/top_level.txt +0 -0
  246. {pyscratch_pysc-1.0.3 → pyscratch_pysc-2.0.0}/setup.cfg +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pyscratch-pysc
3
- Version: 1.0.3
3
+ Version: 2.0.0
4
4
  Summary: A Python game development framework designed to provide an easy transitioning from Scratch to Python
5
5
  Author-email: Daniel Ka-Wa Chan <kwdaniel525@protonmail.com>
6
6
  License: MIT
@@ -22,10 +22,15 @@ For more information, see: https://kwdchan.github.io/pyscratch/
22
22
 
23
23
 
24
24
 
25
+ ## Change History
26
+ ### 12 Oct 2025
27
+ **v2.0.0**
28
+ The backdrops are now indexed by keys instead of integers
25
29
 
26
30
 
27
-
28
- ## Change History
31
+ ### 12 Sep 2025
32
+ **v1.0.4**
33
+ Fixed the show/hide collision related problem due to the deferral of movement to the frame update.
29
34
 
30
35
  ### 07 Sep 2025
31
36
  **v1.0.3**
@@ -0,0 +1,10 @@
1
+ import pyscratch as pysc
2
+ import player # Very important!
3
+
4
+ # start the game
5
+ WIN_WIDTH = 500 # change me
6
+ WIN_HEIGHT = 500 # change me
7
+ framerate = 60
8
+
9
+ pysc.game.update_screen_mode((WIN_WIDTH, WIN_HEIGHT))
10
+ pysc.game.start(framerate)
@@ -0,0 +1,5 @@
1
+ import pyscratch as pysc
2
+
3
+ # This is the line that create the sprite. Note that you need to match the image file name!
4
+ player = pysc.create_single_costume_sprite("assets/fish_brown_outline.png")
5
+ player.set_draggable(True) # optional: make the sprite draggable
@@ -0,0 +1,4 @@
1
+ import pyscratch as pysc
2
+
3
+ enemy = pysc.create_single_costume_sprite("assets/fish_red_outline.png")
4
+ enemy.set_draggable(True) # optional: make the sprite draggable
@@ -0,0 +1,11 @@
1
+ import pyscratch as pysc
2
+ import player # Very important!
3
+ import enemy # Very important!
4
+
5
+ # start the game
6
+ WIN_WIDTH = 500 # change me
7
+ WIN_HEIGHT = 500 # change me
8
+ framerate = 60
9
+
10
+ pysc.game.update_screen_mode((WIN_WIDTH, WIN_HEIGHT))
11
+ pysc.game.start(framerate)
@@ -0,0 +1,5 @@
1
+ import pyscratch as pysc
2
+
3
+ # This is the line that create the sprite. Note that you need to match the image file name!
4
+ player = pysc.create_single_costume_sprite("assets/fish_brown_outline.png")
5
+ player.set_draggable(True) # optional: make the sprite draggable
@@ -0,0 +1,4 @@
1
+ import pyscratch as pysc
2
+
3
+ enemy = pysc.create_single_costume_sprite("assets/fish_red_outline.png")
4
+ enemy.set_draggable(True) # optional: make the sprite draggable
@@ -0,0 +1,11 @@
1
+ import pyscratch as pysc
2
+ import player # Very important!
3
+ import enemy # Very important!
4
+
5
+ # start the game
6
+ WIN_WIDTH = 500 # change me
7
+ WIN_HEIGHT = 500 # change me
8
+ framerate = 60
9
+
10
+ pysc.game.update_screen_mode((WIN_WIDTH, WIN_HEIGHT))
11
+ pysc.game.start(framerate)
@@ -0,0 +1,31 @@
1
+ import pyscratch as pysc
2
+
3
+ player = pysc.create_single_costume_sprite("assets/fish_brown_outline.png")
4
+ player.set_draggable(True)
5
+
6
+ # 1. Create a function that does the thing (any function name is fine)
7
+ def rotate_move():
8
+
9
+ player.direction += 45
10
+ player.move_indir(20)
11
+ yield 0.2
12
+
13
+ player.direction += 45
14
+ player.move_indir(20)
15
+ yield 0.2
16
+
17
+ player.direction += 45
18
+ player.move_indir(20)
19
+ yield 0.2
20
+
21
+ player.direction += 45
22
+ player.move_indir(20)
23
+
24
+ # 2. Create an event object (any event name is fine)
25
+ click_event = player.when_this_sprite_clicked()
26
+
27
+ # 3. Attach the function to the event block
28
+ click_event.add_handler(rotate_move)
29
+
30
+ # Or step 2 and 3 together in one line
31
+ #player.when_this_sprite_clicked().add_handler(rotate_move)
@@ -0,0 +1,4 @@
1
+ import pyscratch as pysc
2
+
3
+ enemy = pysc.create_single_costume_sprite("assets/fish_red_outline.png")
4
+ enemy.set_draggable(True) # optional: make the sprite draggable
@@ -0,0 +1,11 @@
1
+ import pyscratch as pysc
2
+ import player # Very important!
3
+ import enemy # Very important!
4
+
5
+ # start the game
6
+ WIN_WIDTH = 500 # change me
7
+ WIN_HEIGHT = 500 # change me
8
+ framerate = 60
9
+
10
+ pysc.game.update_screen_mode((WIN_WIDTH, WIN_HEIGHT))
11
+ pysc.game.start(framerate)
@@ -0,0 +1,23 @@
1
+ import pyscratch as pysc
2
+
3
+ player = pysc.create_single_costume_sprite("assets/fish_brown_outline.png")
4
+ player.set_draggable(True)
5
+
6
+ def scale_move():
7
+
8
+ player.scale_by(1.05)
9
+ player.move_indir(20)
10
+ yield 0.2
11
+
12
+ player.scale_by(1.05)
13
+ player.move_indir(20)
14
+ yield 0.2
15
+
16
+ player.scale_by(1.05)
17
+ player.move_indir(20)
18
+ yield 0.2
19
+
20
+ player.scale_by(1.05)
21
+ player.move_indir(20)
22
+
23
+ player.when_this_sprite_clicked().add_handler(scale_move)
@@ -0,0 +1,14 @@
1
+ import pyscratch as pysc
2
+ game = pysc.game
3
+
4
+ enemy = pysc.create_single_costume_sprite("assets/fish_red_outline.png")
5
+ enemy.set_draggable(True) # optional: make the sprite draggable
6
+
7
+ def appear():
8
+ enemy.x = game.screen_width/2
9
+ enemy.y = game.screen_height/2
10
+ enemy.hide()
11
+ yield 3
12
+ enemy.show()
13
+
14
+ enemy.when_game_start().add_handler(appear)
@@ -0,0 +1,11 @@
1
+ import pyscratch as pysc
2
+ import player # Very important!
3
+ import enemy # Very important!
4
+
5
+ # start the game
6
+ WIN_WIDTH = 500 # change me
7
+ WIN_HEIGHT = 500 # change me
8
+ framerate = 60
9
+
10
+ pysc.game.update_screen_mode((WIN_WIDTH, WIN_HEIGHT))
11
+ pysc.game.start(framerate)
@@ -0,0 +1,23 @@
1
+ import pyscratch as pysc
2
+
3
+ player = pysc.create_single_costume_sprite("assets/fish_brown_outline.png")
4
+ player.set_draggable(True)
5
+
6
+ def scale_move():
7
+
8
+ player.scale_by(1.05)
9
+ player.move_indir(20)
10
+ yield 0.2
11
+
12
+ player.scale_by(1.05)
13
+ player.move_indir(20)
14
+ yield 0.2
15
+
16
+ player.scale_by(1.05)
17
+ player.move_indir(20)
18
+ yield 0.2
19
+
20
+ player.scale_by(1.05)
21
+ player.move_indir(20)
22
+
23
+ player.when_this_sprite_clicked().add_handler(scale_move)
@@ -0,0 +1,14 @@
1
+ import pyscratch as pysc
2
+ game = pysc.game
3
+
4
+ enemy = pysc.create_single_costume_sprite("assets/fish_red_outline.png")
5
+ enemy.set_draggable(True) # optional: make the sprite draggable
6
+
7
+ def appear():
8
+ enemy.x = game.screen_width/2
9
+ enemy.y = game.screen_height/2
10
+ enemy.hide()
11
+ yield 3
12
+ enemy.show()
13
+
14
+ enemy.when_game_start().add_handler(appear)
@@ -0,0 +1,11 @@
1
+ import pyscratch as pysc
2
+ import player # Very important!
3
+ import enemy # Very important!
4
+
5
+ # start the game
6
+ WIN_WIDTH = 500 # change me
7
+ WIN_HEIGHT = 500 # change me
8
+ framerate = 60
9
+
10
+ pysc.game.update_screen_mode((WIN_WIDTH, WIN_HEIGHT))
11
+ pysc.game.start(framerate)
@@ -0,0 +1,23 @@
1
+ import pyscratch as pysc
2
+
3
+ player = pysc.create_single_costume_sprite("assets/fish_brown_outline.png")
4
+ player.set_draggable(True)
5
+
6
+ def scale_move():
7
+
8
+ player.scale_by(1.05)
9
+ player.move_indir(20)
10
+ yield 0.2
11
+
12
+ player.scale_by(1.05)
13
+ player.move_indir(20)
14
+ yield 0.2
15
+
16
+ player.scale_by(1.05)
17
+ player.move_indir(20)
18
+ yield 0.2
19
+
20
+ player.scale_by(1.05)
21
+ player.move_indir(20)
22
+
23
+ player.when_this_sprite_clicked().add_handler(scale_move)
@@ -0,0 +1,14 @@
1
+ import pyscratch as pysc
2
+ game = pysc.game
3
+
4
+ enemy = pysc.create_single_costume_sprite("assets/fish_red_outline.png")
5
+ enemy.set_draggable(True) # optional: make the sprite draggable
6
+
7
+ def appear():
8
+ enemy.x = game.screen_width/2
9
+ enemy.y = game.screen_height/2
10
+ enemy.hide()
11
+ yield 3
12
+ enemy.show()
13
+
14
+ enemy.when_game_start().add_handler(appear)
@@ -0,0 +1,11 @@
1
+ import pyscratch as pysc
2
+ import player # Very important!
3
+ import enemy # Very important!
4
+
5
+ # start the game
6
+ WIN_WIDTH = 500 # change me
7
+ WIN_HEIGHT = 500 # change me
8
+ framerate = 60
9
+
10
+ pysc.game.update_screen_mode((WIN_WIDTH, WIN_HEIGHT))
11
+ pysc.game.start(framerate)
@@ -0,0 +1,34 @@
1
+ import pyscratch as pysc
2
+
3
+ player = pysc.create_single_costume_sprite("assets/fish_brown_outline.png")
4
+ player.set_draggable(True)
5
+
6
+ def scale_move():
7
+
8
+ for i in range(20):
9
+ player.scale_by(1.025)
10
+ yield 0.03
11
+
12
+ for i in range(20):
13
+ player.scale_by(0.975)
14
+ yield 0.03
15
+
16
+ player.when_this_sprite_clicked().add_handler(scale_move)
17
+
18
+
19
+ # Remember: The function is the stack of scratch blocks without the event block at the top
20
+ def move():
21
+ while True: # the forever loop
22
+ if pysc.is_key_pressed("d"): # the sensing block: 'key [w] pressed'
23
+ player.x += 4 # the motion block: change y by [-4]
24
+
25
+ # the control block: wait [1/60] seconds
26
+ # because the frame rate is 60, this is basically to wait for one frame
27
+ yield 1/60 # must have an yield in a loop!
28
+
29
+ # Attach the function to the event
30
+ game_start = player.when_game_start()
31
+ game_start.add_handler(move)
32
+
33
+ # Or just in one line
34
+ #player.when_game_start().add_handler(move)
@@ -0,0 +1,23 @@
1
+ import pyscratch as pysc
2
+
3
+ spawn_button = pysc.create_single_costume_sprite("assets/button.png")
4
+
5
+ def spwan_enemy():
6
+ enemy_red = pysc.create_single_costume_sprite("assets/fish_red_outline.png")
7
+ enemy_blue = pysc.create_single_costume_sprite("assets/fish_blue_outline.png")
8
+
9
+ enemy_red.x = 0
10
+ enemy_red.y = pysc.game.screen_height/2
11
+
12
+
13
+ enemy_blue.x = pysc.game.screen_width
14
+ enemy_blue.y = pysc.game.screen_height/2
15
+
16
+ while True:
17
+ enemy_red.x += 4
18
+ enemy_blue.x -= 4
19
+
20
+ yield 1/60 # must have an yield in a loop!
21
+
22
+ spawn_button.when_this_sprite_clicked().add_handler(spwan_enemy)
23
+
@@ -0,0 +1,11 @@
1
+ import pyscratch as pysc
2
+ import player # Very important!
3
+ import enemy # Very important!
4
+
5
+ # start the game
6
+ WIN_WIDTH = 500 # change me
7
+ WIN_HEIGHT = 500 # change me
8
+ framerate = 60
9
+
10
+ pysc.game.update_screen_mode((WIN_WIDTH, WIN_HEIGHT))
11
+ pysc.game.start(framerate)
@@ -0,0 +1,41 @@
1
+ import pyscratch as pysc
2
+
3
+ player = pysc.create_single_costume_sprite("assets/fish_brown_outline.png")
4
+ player.set_draggable(True)
5
+
6
+ def scale():
7
+
8
+ for i in range(20):
9
+ player.scale_by(1.025)
10
+ yield 0.03
11
+
12
+ for i in range(20):
13
+ player.scale_by(0.975)
14
+ yield 0.03
15
+
16
+ player.when_this_sprite_clicked().add_handler(scale)
17
+
18
+
19
+ # Remember: The function is the stack of scratch blocks without the event block at the top
20
+ def move():
21
+ while True: # the forever loop
22
+ if pysc.is_key_pressed("d"):
23
+ player.x += 4
24
+
25
+ if pysc.is_key_pressed("a"):
26
+ player.x -= 4
27
+
28
+ if pysc.is_key_pressed("w"):
29
+ player.y -= 4
30
+
31
+ if pysc.is_key_pressed("s"):
32
+ player.y += 4
33
+
34
+ yield 1/60 # must have an yield in a loop!
35
+
36
+ # Attach the function to the event
37
+ game_start = player.when_game_start()
38
+ game_start.add_handler(move)
39
+
40
+ # Or just in one line
41
+ #player.when_game_start().add_handler(move)
@@ -0,0 +1,23 @@
1
+ import pyscratch as pysc
2
+ game = pysc.game
3
+
4
+ enemy = pysc.create_single_costume_sprite("assets/fish_red_outline.png")
5
+ enemy.set_draggable(True) # optional: make the sprite draggable
6
+
7
+ def appear():
8
+ enemy.x = game.screen_width/2
9
+ enemy.y = game.screen_height/2
10
+ enemy.hide()
11
+ yield 3
12
+ enemy.show()
13
+
14
+ enemy.when_game_start().add_handler(appear)
15
+
16
+
17
+
18
+ def reduce_score():
19
+ game['Score'] -= 1
20
+
21
+ enemy.when_this_sprite_clicked().add_handler(reduce_score)
22
+
23
+
@@ -0,0 +1,11 @@
1
+ import pyscratch as pysc
2
+ import player # Very important!
3
+ import enemy # Very important!
4
+
5
+ # start the game
6
+ WIN_WIDTH = 500 # change me
7
+ WIN_HEIGHT = 500 # change me
8
+ framerate = 60
9
+
10
+ pysc.game.update_screen_mode((WIN_WIDTH, WIN_HEIGHT))
11
+ pysc.game.start(framerate)
@@ -0,0 +1,59 @@
1
+ import pyscratch as pysc
2
+ from pyscratch import game
3
+ import pygame
4
+
5
+
6
+ # create the variable
7
+ game['Score'] = 0
8
+
9
+ # for the display of the variable - v1.0.5, default font
10
+ score_display = pysc.create_shared_data_display_sprite("Score")
11
+ score_display.set_draggable(True) # optional
12
+
13
+
14
+ # the sprite
15
+ player = pysc.create_single_costume_sprite("assets/fish_brown_outline.png")
16
+ player.set_draggable(True)
17
+
18
+
19
+ def add_score():
20
+ game['Score'] += 1
21
+
22
+ player.when_this_sprite_clicked().add_handler(add_score)
23
+
24
+ def scale():
25
+
26
+ for i in range(20):
27
+ player.scale_by(1.025)
28
+ yield 0.03
29
+
30
+ for i in range(20):
31
+ player.scale_by(1/1.025)
32
+ yield 0.03
33
+
34
+ player.when_this_sprite_clicked().add_handler(scale)
35
+
36
+
37
+ # Remember: The function is the stack of scratch blocks without the event block at the top
38
+ def move():
39
+ while True: # the forever loop
40
+ if pysc.is_key_pressed("d"):
41
+ player.x += 4
42
+
43
+ if pysc.is_key_pressed("a"):
44
+ player.x -= 4
45
+
46
+ if pysc.is_key_pressed("w"):
47
+ player.y -= 4
48
+
49
+ if pysc.is_key_pressed("s"):
50
+ player.y += 4
51
+
52
+ yield 1/60 # must have an yield in a loop!
53
+
54
+ # Attach the function to the event
55
+ game_start = player.when_game_start()
56
+ game_start.add_handler(move)
57
+
58
+ # Or just in one line
59
+ #player.when_game_start().add_handler(move)
@@ -0,0 +1,19 @@
1
+ import pyscratch as pysc
2
+ game = pysc.game
3
+
4
+ spawn_button = pysc.create_single_costume_sprite("assets/fish_red_outline.png")
5
+ spawn_button.y = 250
6
+
7
+ def spwan_enemy():
8
+ enemy_blue = pysc.create_single_costume_sprite("assets/fish_blue_outline.png")
9
+
10
+ enemy_blue.y = pysc.random_number(0, game.screen_height)
11
+ enemy_blue.x = 0
12
+
13
+ while True:
14
+ enemy_blue.x += 4
15
+
16
+ yield 1/game.framerate # must have an yield in a loop!
17
+
18
+ spawn_button.when_this_sprite_clicked().add_handler(spwan_enemy)
19
+
@@ -0,0 +1,11 @@
1
+ import pyscratch as pysc
2
+ import player # Very important!
3
+ import enemy # Very important!
4
+ import pygame
5
+ # start the game
6
+ WIN_WIDTH = 500 # change me
7
+ WIN_HEIGHT = 500 # change me
8
+ framerate = 60
9
+
10
+ pysc.game.update_screen_mode((WIN_WIDTH, WIN_HEIGHT))
11
+ pysc.game.start(framerate, use_frame_time=True)
@@ -0,0 +1,20 @@
1
+ import pyscratch as pysc
2
+
3
+ player1 = pysc.create_single_costume_sprite("assets/fish_brown_outline.png")
4
+ player2 = pysc.create_single_costume_sprite("assets/fish_orange_outline.png")
5
+
6
+ def move():
7
+ while True:
8
+ if pysc.is_key_pressed("d"):
9
+ player1.x += 4
10
+
11
+ if pysc.is_key_pressed("right"):
12
+ player2.x += 4
13
+
14
+ yield 1/60 # must have an yield in a loop!
15
+
16
+ # for the purpose of this tutorial,
17
+ # `player1.when_game_start()` and `player2.when_game_start()` are almost the same.
18
+ game_start = player2.when_game_start()
19
+ game_start.add_handler(move)
20
+
@@ -0,0 +1,19 @@
1
+ import pyscratch as pysc
2
+ game = pysc.game
3
+
4
+ spawn_button = pysc.create_single_costume_sprite("assets/fish_red_outline.png")
5
+ spawn_button.y = 250
6
+
7
+ def spwan_enemy():
8
+ enemy_blue = pysc.create_single_costume_sprite("assets/fish_blue_outline.png")
9
+
10
+ enemy_blue.y = pysc.random_number(0, game.screen_height)
11
+ enemy_blue.x = 0
12
+
13
+ while True:
14
+ enemy_blue.x += 4
15
+
16
+ yield 1/game.framerate # must have an yield in a loop!
17
+
18
+ spawn_button.when_this_sprite_clicked().add_handler(spwan_enemy)
19
+
@@ -0,0 +1,11 @@
1
+ import pyscratch as pysc
2
+ import player # Very important!
3
+ import enemy # Very important!
4
+ import pygame
5
+ # start the game
6
+ WIN_WIDTH = 500 # change me
7
+ WIN_HEIGHT = 500 # change me
8
+ framerate = 60
9
+
10
+ pysc.game.update_screen_mode((WIN_WIDTH, WIN_HEIGHT))
11
+ pysc.game.start(framerate, use_frame_time=True)
@@ -0,0 +1,38 @@
1
+ import pyscratch as pysc
2
+
3
+ player1 = pysc.create_single_costume_sprite("assets/fish_brown_outline.png")
4
+ player2 = pysc.create_single_costume_sprite("assets/fish_orange_outline.png")
5
+
6
+ def move():
7
+ while True:
8
+ if pysc.is_key_pressed("d"):
9
+ player1.x += 4
10
+
11
+ if pysc.is_key_pressed("a"):
12
+ player1.x -= 4
13
+
14
+ if pysc.is_key_pressed("w"):
15
+ player1.y -= 4
16
+
17
+ if pysc.is_key_pressed("s"):
18
+ player1.y += 4
19
+
20
+ if pysc.is_key_pressed("right"):
21
+ player2.x += 4
22
+
23
+ if pysc.is_key_pressed("left"):
24
+ player2.x -= 4
25
+
26
+ if pysc.is_key_pressed("up"):
27
+ player2.y -= 4
28
+
29
+ if pysc.is_key_pressed("down"):
30
+ player2.y += 4
31
+
32
+ yield 1/60 # must have an yield in a loop!
33
+
34
+ # for the purpose of this tutorial,
35
+ # `player1.when_game_start()` and `player2.when_game_start()` are almost the same.
36
+ game_start = player2.when_game_start()
37
+ game_start.add_handler(move)
38
+
@@ -0,0 +1,20 @@
1
+ import pyscratch as pysc
2
+ game = pysc.game
3
+
4
+ spawn_button = pysc.create_single_costume_sprite("assets/fish_red_outline.png")
5
+ spawn_button.y = 250
6
+
7
+ def spwan_enemy():
8
+ enemy_blue = pysc.create_single_costume_sprite("assets/fish_blue_outline.png")
9
+
10
+ enemy_blue.y = pysc.random_number(0, game.screen_height)
11
+ enemy_blue.x = 0
12
+
13
+ while True:
14
+ enemy_blue.x += 4
15
+
16
+ yield 1/game.framerate # must have an yield in a loop!
17
+
18
+ spawn_button.when_this_sprite_clicked().add_handler(spwan_enemy)
19
+
20
+
@@ -0,0 +1,11 @@
1
+ import pyscratch as pysc
2
+ import player # Very important!
3
+ import enemy # Very important!
4
+ import pygame
5
+ # start the game
6
+ WIN_WIDTH = 500 # change me
7
+ WIN_HEIGHT = 500 # change me
8
+ framerate = 60
9
+
10
+ pysc.game.update_screen_mode((WIN_WIDTH, WIN_HEIGHT))
11
+ pysc.game.start(framerate, use_frame_time=True)