From da78a9e329e272dedb2400b79a3bdeebff387d47 Mon Sep 17 00:00:00 2001 From: Peter Bengtsson Date: Tue, 8 Dec 2020 14:42:17 -0500 Subject: initial commit --- .../tutorials/2d_breakout_game_phaser/index.html | 53 ++++++++++++++++++++++ files/kab/games/tutorials/index.html | 27 +++++++++++ 2 files changed, 80 insertions(+) create mode 100644 files/kab/games/tutorials/2d_breakout_game_phaser/index.html create mode 100644 files/kab/games/tutorials/index.html (limited to 'files/kab/games/tutorials') diff --git a/files/kab/games/tutorials/2d_breakout_game_phaser/index.html b/files/kab/games/tutorials/2d_breakout_game_phaser/index.html new file mode 100644 index 0000000000..30314e4c91 --- /dev/null +++ b/files/kab/games/tutorials/2d_breakout_game_phaser/index.html @@ -0,0 +1,53 @@ +--- +title: 2D Breakout urar iseqdacen Phaser +slug: Games/Tutorials/2D_breakout_game_Phaser +translation_of: Games/Tutorials/2D_breakout_game_Phaser +--- +
{{GamesSidebar}}
{{IncludeSubnav("/en-US/docs/Games")}}
+ +

{{Next("Games/Workflows/2D_Breakout_game_Phaser/Initialize_the_framework")}}

+ +

Deg almeẓdan agi ciṭ ciṭ ad nesnulfu urar umafus MDN afrari yettwarun s JavaScript,s useqdec n  framework Phaser.

+ +

Every step has editable, live samples available to play with so you can see what the intermediate stages should look like. You will learn the basics of using the Phaser framework to implement fundamental game mechanics like rendering and moving images, collision detection, control machanisms, framework-specific helper functions, animations and tweens, and winning and losing states.

+ +

To get the most out of this series of articles you should already have basic to intermediate JavaScript knowledge. After working through this tutorial you should be able to build your own simple Web games with Phaser.

+ +

Gameplay screen from the game MDN Breakout created with Phaser where you can use your paddle to bounce the ball and destroy the brick field, with keeping the points and lives.

+ +

Abruy n tamsirt

+ +

Meṛṛa timsirin-ed yal alqem n urar MDN Breakout i nesallay akken- ttunamalen deg Github

+ +
    +
  1. Initialize the framework
  2. +
  3. Scaling
  4. +
  5. Load the assets and print them on screen
  6. +
  7. Move the ball
  8. +
  9. Physics
  10. +
  11. Bounce off the walls
  12. +
  13. Player paddle and controls
  14. +
  15. Game over
  16. +
  17. Build the brick field
  18. +
  19. Collision detection
  20. +
  21. The score
  22. +
  23. Win the game
  24. +
  25. Extra lives
  26. +
  27. Animations and tweens
  28. +
  29. Buttons
  30. +
  31. Randomizing gameplay
  32. +
+ +

As a note on learning paths — starting with pure JavaScript is the best way to get a solid knowledge of web game development. If you are not already familiar with pure JavaScript game development, we'd suggest that you first work through this series' counterpart, 2D breakout game using pure JavaScript.

+ +

After that, you can pick any framework you like and use it for your projects; we've chosen Phaser as it is a good solid framework, with a good support and community available, and a good set of plugins. Frameworks speed up development time and help take care of the boring parts, allowing you to concentrate on the fun stuff. However, frameworks are not always perfect, so if something unexpected happens or you want to write some functionality that the framework doesn't provide, you'll need some pure JavaScript knowledge.

+ +
+

Note: This series of articles can be used as material for hands-on game development workshops. You can also make use of the Gamedev Phaser Content Kit based on this tutorial if you want to give a talk about game development with Phaser.

+
+ +

Next steps

+ +

Ok, let's get started! Head to the first part of the series — Initialize the framework.

+ +

{{Next("Games/Workflows/2D_Breakout_game_Phaser/Initialize_the_framework")}}

diff --git a/files/kab/games/tutorials/index.html b/files/kab/games/tutorials/index.html new file mode 100644 index 0000000000..90d1cb0790 --- /dev/null +++ b/files/kab/games/tutorials/index.html @@ -0,0 +1,27 @@ +--- +title: Tutorials +slug: Games/Tutorials +tags: + - Canvas + - Games + - JavaScript + - NeedsTranslation + - TopicStub + - Web + - Workflows +translation_of: Games/Tutorials +--- +
{{GamesSidebar}}
{{IncludeSubnav("/en-US/docs/Games")}}
+ +

This page contains multiple tutorial series that highlight different workflows for effectively creating different types of web games.

+ +
+
2D breakout game using pure JavaScript
+
In this step-by-step tutorial you'll implement a simple breakout clone using pure JavaScript. Along the way you will learn the basics of using the {{htmlelement("canvas")}} element to implement fundamental game mechanics like rendering and moving images, collision detection, control machanisms, and winning and losing states.
+
2D breakout game using Phaser
+
In this step-by-step tutorial you'll implement the same breakout clone as the previous tutorial series, except that this time you'll do it using thePhaser HTML5 game framework. This idea here is to teach some of the fundamentals (and advantages) of working with frameworks, along with fundamental game mechanics.
+
2D maze game with device orientation
+
This tutorial shows how to create a 2D maze game using HTML5, incorporating fundamentals such as collision detection and sprite placement on a {{htmlelement("canvas")}}. This is a mobile game that uses the Device Orientation and Vibration APIs to enhance the gameplay and is built using the Phaser framework.
+
2D platform game with Phaser
+
This tutorial series shows how to create a simple platform game using Phaser, covering fundamentals such as sprites, collisions, physics, collectables, and more.
+
-- cgit v1.2.3-54-g00ecf