فهرست منبع

Merge pull request #432 from aaronfranke/readme

Add README files to many demos
Aaron Franke 5 سال پیش
والد
کامیت
9553549a61
100فایلهای تغییر یافته به همراه533 افزوده شده و 36 حذف شده
  1. 19 0
      2d/dodge_the_creeps/README.md
  2. 30 0
      2d/finite_state_machine/README.md
  3. 1 1
      2d/finite_state_machine/project.godot
  4. 0 0
      2d/finite_state_machine/screenshots/.gdignore
  5. BIN
      2d/finite_state_machine/screenshots/fsm-attack.png
  6. 13 0
      2d/gd_paint/README.md
  7. 0 0
      2d/gd_paint/screenshots/.gdignore
  8. BIN
      2d/gd_paint/screenshots/gdpaint.png
  9. 16 0
      2d/hdr/README.md
  10. 0 0
      2d/hdr/screenshots/.gdignore
  11. BIN
      2d/hdr/screenshots/left.png
  12. BIN
      2d/hdr/screenshots/right.png
  13. 11 0
      2d/hexagonal_map/README.md
  14. 0 0
      2d/hexagonal_map/screenshots/.gdignore
  15. BIN
      2d/hexagonal_map/screenshots/hex.png
  16. 24 0
      2d/isometric/README.md
  17. 0 0
      2d/isometric/screenshots/.gdignore
  18. BIN
      2d/isometric/screenshots/isometric.png
  19. 14 0
      2d/kinematic_character/README.md
  20. 0 0
      2d/kinematic_character/screenshots/.gdignore
  21. BIN
      2d/kinematic_character/screenshots/kinematic.png
  22. 11 0
      2d/light2d_as_mask/README.md
  23. 1 1
      2d/light2d_as_mask/project.godot
  24. 0 0
      2d/light2d_as_mask/screenshots/.gdignore
  25. BIN
      2d/light2d_as_mask/screenshots/mask.png
  26. 13 0
      2d/lights_and_shadows/README.md
  27. 1 1
      2d/lights_and_shadows/project.godot
  28. 0 0
      2d/lights_and_shadows/screenshots/.gdignore
  29. BIN
      2d/lights_and_shadows/screenshots/lights.png
  30. 15 0
      2d/navigation/README.md
  31. 1 1
      2d/navigation/project.godot
  32. 0 0
      2d/navigation/screenshots/.gdignore
  33. BIN
      2d/navigation/screenshots/navigation.png
  34. 12 0
      2d/navigation_astar/README.md
  35. 1 1
      2d/navigation_astar/project.godot
  36. 0 0
      2d/navigation_astar/screenshots/.gdignore
  37. BIN
      2d/navigation_astar/screenshots/nav_astar.png
  38. 18 0
      2d/particles/README.md
  39. 1 1
      2d/particles/project.godot
  40. 0 0
      2d/particles/screenshots/.gdignore
  41. BIN
      2d/particles/screenshots/particles.png
  42. 28 0
      2d/physics_platformer/README.md
  43. 0 0
      2d/physics_platformer/screenshots/.gdignore
  44. BIN
      2d/physics_platformer/screenshots/beginning.png
  45. BIN
      2d/physics_platformer/screenshots/seesaw-riding.png
  46. 6 1
      2d/platformer/README.md
  47. 24 0
      2d/pong/README.md
  48. 0 0
      2d/pong/screenshots/.gdignore
  49. BIN
      2d/pong/screenshots/pong.png
  50. 1 1
      2d/pong/scripts/ceiling_floor.gd
  51. 15 0
      2d/role_playing_game/README.md
  52. 0 0
      2d/role_playing_game/screenshots/.gdignore
  53. BIN
      2d/role_playing_game/screenshots/battle.png
  54. BIN
      2d/role_playing_game/screenshots/object.png
  55. 14 0
      2d/screen_space_shaders/README.md
  56. 1 1
      2d/screen_space_shaders/project.godot
  57. 0 0
      2d/screen_space_shaders/screenshots/.gdignore
  58. BIN
      2d/screen_space_shaders/screenshots/old_film.png
  59. BIN
      2d/screen_space_shaders/screenshots/whirl.png
  60. 13 0
      2d/sdf_font/README.md
  61. BIN
      2d/sdf_font/icon.png
  62. 0 0
      2d/sdf_font/screenshots/.gdignore
  63. BIN
      2d/sdf_font/screenshots/sdf.png
  64. 12 0
      2d/sprite_shaders/README.md
  65. 0 0
      2d/sprite_shaders/screenshots/.gdignore
  66. BIN
      2d/sprite_shaders/screenshots/sprite.png
  67. 22 0
      3d/ik/README.md
  68. 1 1
      3d/ik/project.godot
  69. 0 0
      3d/ik/screenshots/.gdignore
  70. BIN
      3d/ik/screenshots/cube.png
  71. BIN
      3d/ik/screenshots/fps_gun.png
  72. 21 0
      3d/kinematic_character/README.md
  73. 0 0
      3d/kinematic_character/screenshots/.gdignore
  74. BIN
      3d/kinematic_character/screenshots/editor.png
  75. BIN
      3d/kinematic_character/screenshots/ingame.png
  76. 17 0
      3d/material_testers/README.md
  77. 1 2
      3d/material_testers/project.godot
  78. 0 0
      3d/material_testers/screenshots/.gdignore
  79. BIN
      3d/material_testers/screenshots/mirror.png
  80. BIN
      3d/material_testers/screenshots/stones.png
  81. 14 0
      3d/navmesh/README.md
  82. 1 1
      3d/navmesh/project.godot
  83. 0 0
      3d/navmesh/screenshots/.gdignore
  84. BIN
      3d/navmesh/screenshots/nav.png
  85. 16 0
      3d/platformer/README.md
  86. 0 0
      3d/platformer/screenshots/.gdignore
  87. BIN
      3d/platformer/screenshots/face.png
  88. BIN
      3d/platformer/screenshots/shoot.png
  89. 27 0
      3d/truck_town/README.md
  90. 0 0
      3d/truck_town/screenshots/.gdignore
  91. BIN
      3d/truck_town/screenshots/tow.png
  92. 18 0
      audio/bpm_sync/README.md
  93. 10 8
      audio/bpm_sync/bpm_sync.gd
  94. BIN
      audio/bpm_sync/icon.png
  95. 34 0
      audio/bpm_sync/icon.png.import
  96. 1 0
      audio/bpm_sync/project.godot
  97. 0 0
      audio/bpm_sync/screenshots/.gdignore
  98. BIN
      audio/bpm_sync/screenshots/bpm.png
  99. 16 15
      audio/device_changer/Changer.gd
  100. 18 0
      audio/device_changer/README.md

+ 19 - 0
2d/dodge_the_creeps/README.md

@@ -0,0 +1,19 @@
+# Dodge the Creeps
+
+This is a simple game where your character must move
+and avoid the enemies for as long as possible.
+
+This is a finished version of the game featured in the
+["Your first game"](https://docs.godotengine.org/en/latest/getting_started/step_by_step/your_first_game.html)
+tutorial in the documentation. For more details,
+consider following the tutorial in the documentation.
+
+Language: GDScript
+
+Renderer: GLES 3 (particles are not available in GLES 2)
+
+Note: There is a C# version available [here](https://github.com/godotengine/godot-demo-projects/tree/master/mono/dodge_the_creeps).
+
+## Screenshots
+
+![GIF from the documentation](https://docs.godotengine.org/en/latest/_images/dodge_preview.gif)

+ 30 - 0
2d/finite_state_machine/README.md

@@ -0,0 +1,30 @@
+# Hierarchical Finite State Machine
+
+This example shows how to apply the State machine programming
+pattern in GDscript, including Hierarchical States, and a
+pushdown automaton.
+
+Language: GDScript
+
+Renderer: GLES 2
+
+## Why use a state machine
+
+States are common in games. You can use the pattern to:
+
+1. Separate each behavior and transitions between behaviors,
+   thus make scripts shorter and easier to manage.
+
+2. Respect the Single Responsibility Principle.
+   Each State object represents one action.
+
+3. Improve your code's structure. Look at the scene tree and
+   FileSystem tab: without looking at the code, you'll know
+   what the Player can or cannot do.
+
+You can read more about States in the excellent
+[Game Programming Patterns ebook](https://gameprogrammingpatterns.com/state.html).
+
+## Screenshots
+
+![Screenshot](screenshots/fsm-attack.png)

+ 1 - 1
2d/finite_state_machine/project.godot

@@ -15,7 +15,7 @@ _global_script_class_icons={
 
 [application]
 
-config/name="Hierarchical Finite State Machine example"
+config/name="Hierarchical Finite State Machine"
 run/main_scene="res://Demo.tscn"
 config/icon="res://icon.png"
 

+ 0 - 0
2d/finite_state_machine/screenshots/.gdignore


BIN
2d/finite_state_machine/screenshots/fsm-attack.png


+ 13 - 0
2d/gd_paint/README.md

@@ -0,0 +1,13 @@
+# GD Paint
+
+GD Paint is a simple image editor made using Godot and GDScript.
+It supports different types of "brushes": a basic pen/pencil
+and eraser, as well as a rectangle and a circle brush.
+
+Language: GDScript
+
+Renderer: GLES 2
+
+## Screenshots
+
+![Screenshot](screenshots/gdpaint.png)

+ 0 - 0
2d/gd_paint/screenshots/.gdignore


BIN
2d/gd_paint/screenshots/gdpaint.png


+ 16 - 0
2d/hdr/README.md

@@ -0,0 +1,16 @@
+# HDR for 2D
+
+Simple demo how to use High Dynamic Range (HDR) in a 2D game,
+via the WorldEnvironment node.
+
+Just slide the cave image left and right to observe the HDR effect at work.
+
+Language: GDScript
+
+Renderer: GLES 3 (HDR is not available in GLES 2)
+
+## Screenshots
+
+![Screenshot](screenshots/left.png)
+
+![Screenshot](screenshots/right.png)

+ 0 - 0
2d/hdr/screenshots/.gdignore


BIN
2d/hdr/screenshots/left.png


BIN
2d/hdr/screenshots/right.png


+ 11 - 0
2d/hexagonal_map/README.md

@@ -0,0 +1,11 @@
+# Hexagonal Game
+
+Very simple demo showing a hexagonal TileMap and TileSet.
+
+Language: GDScript
+
+Renderer: GLES 2
+
+## Screenshots
+
+![Screenshot](screenshots/hex.png)

+ 0 - 0
2d/hexagonal_map/screenshots/.gdignore


BIN
2d/hexagonal_map/screenshots/hex.png


+ 24 - 0
2d/isometric/README.md

@@ -0,0 +1,24 @@
+# Isometric Game
+
+This demo shows a traditional isometric view with depth sorting.
+
+A character can move around the level and will also slide around objects,
+as well as be occluded when standing in front or behind them. 
+
+Language: GDScript
+
+Renderer: GLES 2
+
+## How does it work?
+
+The level uses a [`TileMap`](https://docs.godotengine.org/en/latest/classes/class_tilemap.html#class-tilemap)
+in which the tiles have different vertical offsets.
+The walls, doors, and pillars each have
+[`StaticBody2D`](https://docs.godotengine.org/en/latest/classes/class_staticbody2d.html)
+and [`CollisionPolygon2D`](https://docs.godotengine.org/en/latest/classes/class_collisionpolygon2d.html)
+at their base. The player also has a collider at its base,
+which makes the player collide with the level.
+
+## Screenshots
+
+![Screenshot](screenshots/isometric.png)

+ 0 - 0
2d/isometric/screenshots/.gdignore


BIN
2d/isometric/screenshots/isometric.png


+ 14 - 0
2d/kinematic_character/README.md

@@ -0,0 +1,14 @@
+# Kinematic Character
+
+Example of how to make a kinematic character controller in 2D using
+[`KinematicBody2D`](https://docs.godotengine.org/en/latest/classes/class_kinematicbody2d.html).
+The character moves around, is affected by moving platforms,
+can jump through one-way collision platforms, etc. 
+
+Language: GDScript
+
+Renderer: GLES 2
+
+## Screenshots
+
+![Screenshot](screenshots/kinematic.png)

+ 0 - 0
2d/kinematic_character/screenshots/.gdignore


BIN
2d/kinematic_character/screenshots/kinematic.png


+ 11 - 0
2d/light2d_as_mask/README.md

@@ -0,0 +1,11 @@
+# 2D Lights as Mask
+
+Example of how to use 2D lights to mask objects on screen.
+
+Language: GDScript
+
+Renderer: GLES 2
+
+## Screenshots
+
+![Screenshot](screenshots/mask.png)

+ 1 - 1
2d/light2d_as_mask/project.godot

@@ -15,7 +15,7 @@ _global_script_class_icons={
 
 [application]
 
-config/name="Using Lights as Mask"
+config/name="2D Lights as Mask"
 run/main_scene="res://lightmask.tscn"
 config/icon="res://icon.png"
 

+ 0 - 0
2d/light2d_as_mask/screenshots/.gdignore


BIN
2d/light2d_as_mask/screenshots/mask.png


+ 13 - 0
2d/lights_and_shadows/README.md

@@ -0,0 +1,13 @@
+# 2D Lights and Shadows
+
+Simple demo of 2D lights and shadows, using
+[`Light2D`](https://docs.godotengine.org/en/latest/classes/class_light2d.html)
+and [`LightOccluder2D`](https://docs.godotengine.org/en/latest/classes/class_lightoccluder2d.html).
+
+Language: GDScript
+
+Renderer: GLES 2
+
+## Screenshots
+
+![Screenshot](screenshots/lights.png)

+ 1 - 1
2d/lights_and_shadows/project.godot

@@ -15,7 +15,7 @@ _global_script_class_icons={
 
 [application]
 
-config/name="2D Lighting"
+config/name="2D Lights and Shadows"
 run/main_scene="res://light_shadows.tscn"
 config/icon="res://icon.png"
 

+ 0 - 0
2d/lights_and_shadows/screenshots/.gdignore


BIN
2d/lights_and_shadows/screenshots/lights.png


+ 15 - 0
2d/navigation/README.md

@@ -0,0 +1,15 @@
+# Navigation Polygon 2D
+
+Example of using 2D navigation using a
+[`NavigationPolygon`](https://docs.godotengine.org/en/latest/classes/class_navigationpolygon.html)
+in a [`NavigationPolygonInstance`](https://docs.godotengine.org/en/latest/classes/class_navigationpolygoninstance.html) node.
+It uses the 2D navigation API to request a path between two points,
+and then traverses the resulting path. 
+
+Language: GDScript
+
+Renderer: GLES 2
+
+## Screenshots
+
+![Screenshot](screenshots/navigation.png)

+ 1 - 1
2d/navigation/project.godot

@@ -15,7 +15,7 @@ _global_script_class_icons={
 
 [application]
 
-config/name="Navigation Polygon (2D)"
+config/name="Navigation Polygon 2D"
 run/main_scene="res://level.tscn"
 config/icon="res://icon.png"
 

+ 0 - 0
2d/navigation/screenshots/.gdignore


BIN
2d/navigation/screenshots/navigation.png


+ 12 - 0
2d/navigation_astar/README.md

@@ -0,0 +1,12 @@
+# Grid-based Navigation with Astar
+
+This is an example of using AStar for navigation in 2D,
+complete with Steering Behaviors in order to smooth the movement out.
+
+Language: GDScript
+
+Renderer: GLES 2
+
+## Screenshots
+
+![Screenshot](screenshots/nav_astar.png)

+ 1 - 1
2d/navigation_astar/project.godot

@@ -15,7 +15,7 @@ _global_script_class_icons={
 
 [application]
 
-config/name="Grid-based pathfinding with Astar"
+config/name="Grid-based Pathfinding with Astar"
 run/main_scene="res://Game.tscn"
 config/icon="res://icon.png"
 

+ 0 - 0
2d/navigation_astar/screenshots/.gdignore


BIN
2d/navigation_astar/screenshots/nav_astar.png


+ 18 - 0
2d/particles/README.md

@@ -0,0 +1,18 @@
+# 2D Particles
+
+This demo showcases how 2D particle systems work in Godot.
+
+Language: GDScript
+
+Renderer: GLES 3 (particles are not available in GLES 2)
+
+## How does it work?
+
+It uses [`Particles2D`](https://docs.godotengine.org/en/latest/classes/class_particles2d.html) nodes
+with [`ParticlesMaterial`](https://docs.godotengine.org/en/latest/classes/class_particlesmaterial.html)
+materials. Note that `ParticlesMaterial` is agnostic between 2D and 3D,
+so when used in 2D, the "Disable Z" flag should be enabled.
+
+## Screenshots
+
+![Screenshot of particles](screenshots/particles.png)

+ 1 - 1
2d/particles/project.godot

@@ -15,7 +15,7 @@ _global_script_class_icons={
 
 [application]
 
-config/name="Particle Systems"
+config/name="2D Particles"
 run/main_scene="res://particles.tscn"
 config/icon="res://icon.png"
 

+ 0 - 0
2d/particles/screenshots/.gdignore


BIN
2d/particles/screenshots/particles.png


+ 28 - 0
2d/physics_platformer/README.md

@@ -0,0 +1,28 @@
+# Physics Platformer
+
+This demo uses [`RigidBody2D`](https://docs.godotengine.org/en/latest/classes/class_rigidbody2d.html)
+for the player and enemies.
+These character controllers are more powerful than
+[`KinematicBody2D`](https://docs.godotengine.org/en/latest/classes/class_kinematicbody2d.html),
+but can be more difficult to handle, as they require
+manual modification of the RigidBody velocity. 
+
+Language: GDScript
+
+Renderer: GLES 3 (particles are not available in GLES 2)
+
+## How does it work?
+
+The player and enemies use dynamic character
+controllers for movement, made with
+[`RigidBody2D`](https://docs.godotengine.org/en/latest/classes/class_rigidbody2d.html),
+which means that they can perfectly interact with physics
+(there is a see-saw, and you can even ride enemies).
+Because of this, all movement must be done in sync with
+the physics engine, inside of `_integrate_forces()`.
+
+## Screenshots
+
+![Screenshot of the beginning](screenshots/beginning.png)
+
+![Screenshot of the seesaw and the player riding an enemy](screenshots/seesaw-riding.png)

+ 0 - 0
2d/physics_platformer/screenshots/.gdignore


BIN
2d/physics_platformer/screenshots/beginning.png


BIN
2d/physics_platformer/screenshots/seesaw-riding.png


+ 6 - 1
2d/platformer/README.md

@@ -8,9 +8,13 @@ You will find most of the demo’s content in the `Level.tscn` scene. You can op
 
 We invite you to open the demo's GDScript files in the editor as they contain a lot of comments that explain how each class works.
 
+Language: GDScript
+
+Renderer: GLES 3 (particles are not available in GLES 2)
+
 ## Features
 
-- Side-scrolling player controller.
+- Side-scrolling player controller using [`KinematicBody2D`](https://docs.godotengine.org/en/latest/classes/class_kinematicbody2d.html).
     - Can walk on and snap to slopes.
     - Can shoot, including while jumping.
 - Enemies that crawl on the floor and change direction when they encounter an obstacle.
@@ -26,4 +30,5 @@ We invite you to open the demo's GDScript files in the editor as they contain a
 ## Screenshots
 
 ![Player shooting in the direction of an enemy](screenshots/shoot.png)
+
 ![The entire level layout viewed in the editor](screenshots/layout.png)

+ 24 - 0
2d/pong/README.md

@@ -0,0 +1,24 @@
+# Pong with GDScript
+
+A simple Pong game. This demo shows best practices
+for game development in Godot, including
+[signals](https://docs.godotengine.org/en/latest/getting_started/step_by_step/signals.html).
+
+Language: GDScript
+
+Renderer: GLES 2
+
+Note: There is a C# version available [here](https://github.com/godotengine/godot-demo-projects/tree/master/mono/pong).
+
+Note: There is a VisualScript version available [here](https://github.com/godotengine/godot-demo-projects/tree/master/visual_script/pong).
+
+## How does it work?
+
+The walls, paddle, and ball are all
+[`Area2D`](https://docs.godotengine.org/en/latest/classes/class_area2d.html)
+nodes. When the ball touches the walls or the paddles,
+they emit signals and modify the ball.
+
+## Screenshots
+
+![Screenshot](screenshots/pong.png)

+ 0 - 0
2d/pong/screenshots/.gdignore


BIN
2d/pong/screenshots/pong.png


+ 1 - 1
2d/pong/scripts/ceiling_floor.gd

@@ -2,6 +2,6 @@ extends Area2D
 
 export var _bounce_direction = 1
 
-func _on_area_entered( area ):
+func _on_area_entered(area):
 	if area.name == "Ball":
 		area.direction = (area.direction + Vector2(0, _bounce_direction)).normalized()

+ 15 - 0
2d/role_playing_game/README.md

@@ -0,0 +1,15 @@
+# Role Playing Game
+
+This shows a method of creating grid-based movement with Godot
+and GDScript. It also includes a simple JRPG-style dialogue and
+battle system on top of it.
+
+Language: GDScript
+
+Renderer: GLES 2
+
+## Screenshots
+
+![Screenshot](screenshots/object.png)
+
+![Screenshot](screenshots/battle.png)

+ 0 - 0
2d/role_playing_game/screenshots/.gdignore


BIN
2d/role_playing_game/screenshots/battle.png


BIN
2d/role_playing_game/screenshots/object.png


+ 14 - 0
2d/screen_space_shaders/README.md

@@ -0,0 +1,14 @@
+# Screen Space Shaders
+
+Several examples of full screen 2D shader processing.
+Many common full-res effects are implemented here for reference.
+
+Language: [GDSL](https://docs.godotengine.org/en/latest/tutorials/shading/shading_reference/shading_language.html) and GDScript
+
+Renderer: GLES 2
+
+## Screenshots
+
+![Screenshot](screenshots/whirl.png)
+
+![Screenshot](screenshots/old_film.png)

+ 1 - 1
2d/screen_space_shaders/project.godot

@@ -15,7 +15,7 @@ _global_script_class_icons={
 
 [application]
 
-config/name="Screen-Space Shaders"
+config/name="Screen Space Shaders"
 run/main_scene="res://screen_shaders.tscn"
 config/icon="res://icon.png"
 

+ 0 - 0
2d/screen_space_shaders/screenshots/.gdignore


BIN
2d/screen_space_shaders/screenshots/old_film.png


BIN
2d/screen_space_shaders/screenshots/whirl.png


+ 13 - 0
2d/sdf_font/README.md

@@ -0,0 +1,13 @@
+# SDF Font
+
+This is a demo of Signed Distance Field fonts in Godot.
+The technique used allows the text to remain clear
+under arbitrary zooms and rotations.
+
+Language: GDScript
+
+Renderer: GLES 3 (this effect is not available in GLES 2)
+
+## Screenshots
+
+![Screenshot](screenshots/sdf.png)

BIN
2d/sdf_font/icon.png


+ 0 - 0
2d/sdf_font/screenshots/.gdignore


BIN
2d/sdf_font/screenshots/sdf.png


+ 12 - 0
2d/sprite_shaders/README.md

@@ -0,0 +1,12 @@
+# Sprite Shaders
+
+This is a sample consisting of different shaders applied to some sprites.
+Effects include outlines, blurs, distorts, shadows, glows, and more.
+
+Language: [GDSL](https://docs.godotengine.org/en/latest/tutorials/shading/shading_reference/shading_language.html)
+
+Renderer: GLES 2
+
+## Screenshots
+
+![Screenshot](screenshots/sprite.png)

+ 0 - 0
2d/sprite_shaders/screenshots/.gdignore


BIN
2d/sprite_shaders/screenshots/sprite.png


+ 22 - 0
3d/ik/README.md

@@ -0,0 +1,22 @@
+# 3D Inverse Kinematics
+
+This is an example of different Inverse Kinematic algorithms
+implemented in Godot. It contains four scenes, showing
+different ways they can be used.
+
+Language: GDScript
+
+Renderer: GLES 3
+
+## How does it work?
+
+This demo shows how to implement IK using two different methods. One uses the
+[`SkeletonIK`](https://docs.godotengine.org/en/latest/classes/class_skeletonik.html)
+node which is built into Godot. The other method is using a script
+called FABRIK (inside of the SADE plugin) for inverse kinematics.
+
+## Screenshots
+
+![Screenshot](screenshots/cube.png)
+
+![Screenshot](screenshots/fps_gun.png)

+ 1 - 1
3d/ik/project.godot

@@ -15,7 +15,7 @@ _global_script_class_icons={
 
 [application]
 
-config/name="3D IK"
+config/name="3D Inverse Kinematics"
 run/main_scene="res://look_at_ik.tscn"
 config/icon="res://icon.png"
 

+ 0 - 0
3d/ik/screenshots/.gdignore


BIN
3d/ik/screenshots/cube.png


BIN
3d/ik/screenshots/fps_gun.png


+ 21 - 0
3d/kinematic_character/README.md

@@ -0,0 +1,21 @@
+# 3D Kinematic Character
+
+Kinematic character demo for 3D using a cube for the character.
+This is similar to the 2D platformer demo.
+
+Language: GDScript
+
+Renderer: GLES 3
+
+## How does it work?
+
+This demo uses a [`KinematicBody`](https://docs.godotengine.org/en/latest/classes/class_kinematicbody.html)
+for the player, and [`StaticBody`](https://docs.godotengine.org/en/latest/classes/class_staticbody.html)
+for the level. Each has colliders, the player moves itself via
+`move_and_slide()` in `_physics_process()`, and collides with the level.
+
+## Screenshots
+
+![Screenshot](screenshots/ingame.png)
+
+![Screenshot](screenshots/editor.png)

+ 0 - 0
3d/kinematic_character/screenshots/.gdignore


BIN
3d/kinematic_character/screenshots/editor.png


BIN
3d/kinematic_character/screenshots/ingame.png


+ 17 - 0
3d/material_testers/README.md

@@ -0,0 +1,17 @@
+# Material Testers
+
+This demo includes many sphere-like objects with complex materials,
+for the purpose of showcasing Godot's rendering capabilities.
+
+This demo was featured at the beginning of the
+[Godot 3.0 trailer](https://www.youtube.com/watch?v=XptlVErsL-o).
+
+Language: GDScript
+
+Renderer: GLES 3
+
+## Screenshots
+
+![Screenshot](screenshots/stones.png)
+
+![Screenshot](screenshots/mirror.png)

+ 1 - 2
3d/material_testers/project.godot

@@ -15,7 +15,7 @@ _global_script_class_icons={
 
 [application]
 
-config/name="Material Tester"
+config/name="Material Testers"
 run/main_scene="res://material_tester.tscn"
 config/icon="res://icon.png"
 
@@ -36,4 +36,3 @@ multithread/thread_rid_pool_prealloc=60
 
 vram_compression/import_etc2=false
 quality/filters/msaa=2
-environment/default_environment="res://default_env.tres"

+ 0 - 0
3d/material_testers/screenshots/.gdignore


BIN
3d/material_testers/screenshots/mirror.png


BIN
3d/material_testers/screenshots/stones.png


+ 14 - 0
3d/navmesh/README.md

@@ -0,0 +1,14 @@
+# 3D Navigation Mesh
+
+Navigation mesh demo for 3D scenes, with a character
+able to pathfind around a complex 3D environment.
+The navigation path is drawn using a line.
+Code is provided for polyline following in 3D.
+
+Language: GDScript
+
+Renderer: GLES 3
+
+## Screenshots
+
+![Screenshot](screenshots/nav.png)

+ 1 - 1
3d/navmesh/project.godot

@@ -15,7 +15,7 @@ _global_script_class_icons={
 
 [application]
 
-config/name="Navmesh Demo"
+config/name="3D Navigation Mesh"
 run/main_scene="res://navmesh.tscn"
 config/icon="res://icon.png"
 

+ 0 - 0
3d/navmesh/screenshots/.gdignore


BIN
3d/navmesh/screenshots/nav.png


+ 16 - 0
3d/platformer/README.md

@@ -0,0 +1,16 @@
+# 3D Platformer
+
+3D Platformer demo using a
+[`KinematicBody`](https://docs.godotengine.org/en/latest/classes/class_kinematicbody.html).
+It uses similar code to the 2D platformer, but implemented in 3D.
+It also features audio reverberation (it sounds echo-y).
+
+Language: GDScript
+
+Renderer: GLES 3
+
+## Screenshots
+
+![Screenshot](screenshots/face.png)
+
+![Screenshot](screenshots/shoot.png)

+ 0 - 0
3d/platformer/screenshots/.gdignore


BIN
3d/platformer/screenshots/face.png


BIN
3d/platformer/screenshots/shoot.png


+ 27 - 0
3d/truck_town/README.md

@@ -0,0 +1,27 @@
+# Truck Town
+
+This is a demo implementing different types of trucks of
+varying complexity using vehicle physics.
+
+Do not be surprised if everything is bouncy and glitchy,
+Godot's physics system is not polished and will likely be
+reworked in the future.
+
+Language: GDScript
+
+Renderer: GLES 2
+
+## How does it work?
+
+The base vehicle uses a
+[`VehicleBody`](https://docs.godotengine.org/en/latest/classes/class_vehiclebody.html)
+node. The trailer truck is tied together using a
+[`ConeJointTwist`](https://docs.godotengine.org/en/latest/classes/class_conetwistjoint.html)
+node, and the tow truck is tried together using a chain made of
+[`RigidBody`](https://docs.godotengine.org/en/latest/classes/class_rigidbody.html)
+nodes which are pinned together using
+[`PinJoint`](https://docs.godotengine.org/en/latest/classes/class_pinjoint.html) nodes.
+
+## Screenshots
+
+![Screenshot](screenshots/tow.png)

+ 0 - 0
3d/truck_town/screenshots/.gdignore


BIN
3d/truck_town/screenshots/tow.png


+ 18 - 0
audio/bpm_sync/README.md

@@ -0,0 +1,18 @@
+# Audio BPM Sync
+
+A demo of how to sync the audio playback with the time for a consistent BPM.
+
+Language: GDScript
+
+Renderer: GLES 2
+
+## How does it work?
+
+For the sound clock, it uses methods in
+[`AudioServer`](https://docs.godotengine.org/en/latest/classes/class_audioserver.html)
+to sync the audio playback.
+For the system clock, it uses `OS.get_ticks_usec()`.
+
+## Screenshots
+
+![Screenshot](screenshots/bpm.png)

+ 10 - 8
audio/bpm_sync/bpm_sync.gd

@@ -7,10 +7,12 @@ var playing = false
 const COMPENSATE_FRAMES = 2
 const COMPENSATE_HZ = 60.0
 
-const SYNC_SOURCE_SYSTEM_CLOCK = 0
-const SYNC_SOURCE_SOUND_CLOCK = 1
+enum SyncSource {
+	SYSTEM_CLOCK,
+	SOUND_CLOCK,
+}
 
-var sync_source = SYNC_SOURCE_SYSTEM_CLOCK
+var sync_source = SyncSource.SYSTEM_CLOCK
 
 # Used by system clock.
 var time_begin
@@ -25,16 +27,16 @@ func strsec(secs):
 
 
 func _process(_delta):
-	if (!playing or !$Player.playing):
+	if !playing or !$Player.playing:
 		return
 	
 	var time = 0.0
-	if (sync_source == SYNC_SOURCE_SYSTEM_CLOCK): 
+	if sync_source == SyncSource.SYSTEM_CLOCK: 
 		# Obtain from ticks.
 		time = (OS.get_ticks_usec() - time_begin) / 1000000.0
 		# Compensate.
 		time -= time_delay
-	elif (sync_source == SYNC_SOURCE_SOUND_CLOCK):
+	elif sync_source == SyncSource.SOUND_CLOCK:
 		time = $Player.get_playback_position() + AudioServer.get_time_since_last_mix() - AudioServer.get_output_latency() + (1 / COMPENSATE_HZ) * COMPENSATE_FRAMES
 	
 	var beat = int(time * BPM / 60.0)
@@ -44,7 +46,7 @@ func _process(_delta):
 
 
 func _on_PlaySystem_pressed():
-	sync_source = SYNC_SOURCE_SYSTEM_CLOCK
+	sync_source = SyncSource.SYSTEM_CLOCK
 	time_begin = OS.get_ticks_usec()
 	time_delay = AudioServer.get_time_to_next_mix() + AudioServer.get_output_latency()
 	playing = true
@@ -52,6 +54,6 @@ func _on_PlaySystem_pressed():
 
 
 func _on_PlaySound_pressed():
-	sync_source = SYNC_SOURCE_SOUND_CLOCK
+	sync_source = SyncSource.SOUND_CLOCK
 	playing = true
 	$Player.play()

BIN
audio/bpm_sync/icon.png


+ 34 - 0
audio/bpm_sync/icon.png.import

@@ -0,0 +1,34 @@
+[remap]
+
+importer="texture"
+type="StreamTexture"
+path="res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex"
+metadata={
+"vram_texture": false
+}
+
+[deps]
+
+source_file="res://icon.png"
+dest_files=[ "res://.import/icon.png-487276ed1e3a0c39cad0279d744ee560.stex" ]
+
+[params]
+
+compress/mode=0
+compress/lossy_quality=0.7
+compress/hdr_mode=0
+compress/bptc_ldr=0
+compress/normal_map=0
+flags/repeat=0
+flags/filter=true
+flags/mipmaps=false
+flags/anisotropic=false
+flags/srgb=2
+process/fix_alpha_border=true
+process/premult_alpha=false
+process/HDR_as_SRGB=false
+process/invert_color=false
+stream=false
+size_limit=0
+detect_3d=true
+svg/scale=1.0

+ 1 - 0
audio/bpm_sync/project.godot

@@ -17,6 +17,7 @@ _global_script_class_icons={
 
 config/name="BPM Sync Demo"
 run/main_scene="res://bpm_sync.tscn"
+config/icon="res://icon.png"
 
 [rendering]
 

+ 0 - 0
audio/bpm_sync/screenshots/.gdignore


BIN
audio/bpm_sync/screenshots/bpm.png


+ 16 - 15
audio/device_changer/Changer.gd

@@ -1,36 +1,37 @@
 extends Control
 
-onready var itemList = get_node("ItemList")
+onready var item_list = get_node("ItemList")
 
 
 func _ready():
 	for item in AudioServer.get_device_list():
-		itemList.add_item(item)
+		item_list.add_item(item)
 	
 	var device = AudioServer.get_device()
-	for i in range(itemList.get_item_count()):
-		if device == itemList.get_item_text(i):
-			itemList.select(i)
+	for i in range(item_list.get_item_count()):
+		if device == item_list.get_item_text(i):
+			item_list.select(i)
 			break
 
 
 func _process(_delta):
-	var speakerMode = "Stereo"
+	var speaker_mode_text = "Stereo"
+	var speaker_mode = AudioServer.get_speaker_mode()
 	
-	if AudioServer.get_speaker_mode() == AudioServer.SPEAKER_SURROUND_31:
-		speakerMode = "Surround 3.1"
-	elif AudioServer.get_speaker_mode() == AudioServer.SPEAKER_SURROUND_51:
-		speakerMode = "Surround 5.1"
-	elif AudioServer.get_speaker_mode() == AudioServer.SPEAKER_SURROUND_71:
-		speakerMode = "Surround 7.1"
+	if speaker_mode == AudioServer.SPEAKER_SURROUND_31:
+		speaker_mode_text = "Surround 3.1"
+	elif speaker_mode == AudioServer.SPEAKER_SURROUND_51:
+		speaker_mode_text = "Surround 5.1"
+	elif speaker_mode == AudioServer.SPEAKER_SURROUND_71:
+		speaker_mode_text = "Surround 7.1"
 	
 	$DeviceInfo.text = "Current Device: " + AudioServer.get_device() + "\n"
-	$DeviceInfo.text += "Speaker Mode: " + speakerMode
+	$DeviceInfo.text += "Speaker Mode: " + speaker_mode_text
 
 
 func _on_Button_button_down():
-	for item in itemList.get_selected_items():
-		var device = itemList.get_item_text(item)
+	for item in item_list.get_selected_items():
+		var device = item_list.get_item_text(item)
 		AudioServer.set_device(device)
 
 

+ 18 - 0
audio/device_changer/README.md

@@ -0,0 +1,18 @@
+# Audio Device Changer
+
+This is a demo showing how the audio output device can be changed from Godot.
+
+Language: GDScript
+
+Renderer: GLES 2
+
+## How does it work?
+
+It uses the `set_device()` method in
+[`AudioServer`](https://docs.godotengine.org/en/latest/classes/class_audioserver.html)
+to change the audio device.
+The list of devices is populated using `get_device_list()`.
+
+## Screenshots
+
+![Screenshot](screenshots/device_changer.png)

برخی فایل ها در این مقایسه diff نمایش داده نمی شوند زیرا تعداد فایل ها بسیار زیاد است