2
0
Björn Ritzl 5 жил өмнө
parent
commit
88578a3dfe

+ 0 - 30
docs/en/manuals/animation.md

@@ -388,36 +388,6 @@ The following are valid easing values for `gui.animate()`:
 | gui.EASING_INQUINT | gui.EASING_OUTQUINT |
 | gui.EASING_INOUTQUINT | gui.EASING_OUTINQUINT |
 
-<div id="game-container" class="game-container">
-<canvas id="game-canvas" tabindex="1" width="640" height="512"></canvas>
-<script src="//storage.googleapis.com/defold-doc/assets/easier/dmloader.js"></script>
-<script>
-  var extra_params = {
-   archive_location_filter: function( path ) { return ('//storage.googleapis.com/defold-doc/assets/easier/archive' + path + ''); },
-   splash_image: '//storage.googleapis.com/defold-doc/assets/easier/preview.jpg',
-   custom_heap_size: 268435456,
-   disable_context_menu: true,
-   game_start: function() {}
-  };
-  Module['onRuntimeInitialized'] = function() { Module.runApp("game-canvas", extra_params); };
-  Module['locateFile'] = function(path, scriptDirectory) {
-   if (path == "dmengine.wasm" || path == "dmengine_release.wasm" || path == "dmengine_headless.wasm") { path = "easier.wasm"; }
-   return scriptDirectory + path;
-  };
-  function load_engine() {
-   var engineJS = document.createElement('script');
-   engineJS.type = 'text/javascript';
-   if (Module['isWASMSupported']) {
-   engineJS.src = '//storage.googleapis.com/defold-doc/assets/easier/easier_wasm.js';
-   } else {
-   engineJS.src = '//storage.googleapis.com/defold-doc/assets/easier/easier_asmjs.js';
-   }
-   document.head.appendChild(engineJS);
-  }
-  load_engine();
-</script>
-</div>
-
 ![Linear interpolation](images/properties/easing_linear.png){.inline}
 ![In back](images/properties/easing_inback.png){.inline}
 ![Out back](images/properties/easing_outback.png){.inline}

+ 1 - 30
docs/en/tutorials/15-puzzle.md

@@ -9,35 +9,6 @@ This well-known puzzle became popular in America during the 1870s. The goal of t
 
 The most common version of the puzzle shows the numbers 1--15 on the tiles. However, you can make the puzzle a bit more challenging by making the tiles part of an image. Before we begin, try to solve the puzzle. Click on a tile adjacent to the empty square to slide the tile to the empty position.
 
-<div id="game-container" class="game-container">
-  <img id="game-preview" src="//storage.googleapis.com/defold-doc/assets/15-puzzle/preview.jpg"/>
-  <canvas id="game-canvas" tabindex="1" width="512" height="512">
-  </canvas>
-  <button id="game-button">
-    START GAME <span class="icon"></span>
-  </button>
-  <script src="//storage.googleapis.com/defold-doc/assets/dmloader.js"></script>
-  <script src="//storage.googleapis.com/defold-doc/assets/dmengine_1_2_107.js" async></script>
-  <script>
-      /* Load app on click in container. */
-      document.getElementById("game-button").onclick = function (e) {
-          var extra_params = {
-              archive_location_filter: function( path ) {
-                  return ("//storage.googleapis.com/defold-doc/assets/15-puzzle" + path + "");
-              },
-              load_done: function() {},
-              game_start: function() {
-                  var e = document.getElementById("game-preview");
-                  e.parentElement.removeChild(e);
-              }
-          }
-          Module.runApp("game-canvas", extra_params);
-          document.getElementById("game-button").style.display = 'none';
-          document.getElementById("game-button").onclick = null;
-      };
-  </script>
-</div>
-
 ## Creating the project
 
 1. Start Defold.
@@ -71,7 +42,7 @@ Set the tile *Width* and *Height* properties to 128. This will split the 512⨉5
 
 Next, <kbd>Right click</kbd> the *main* folder and select <kbd>New ▸ Tile Map</kbd>. Name the new file "grid.tilemap".
 
-Defold needs you to initialize the grid. To do that, select the "layer1" layer and paint the 4⨉4 grid of tiles just to the top-right of origin. It does not really matter what you set the tiles to. You will write code in a bit that will set the content of these tiles automatically. 
+Defold needs you to initialize the grid. To do that, select the "layer1" layer and paint the 4⨉4 grid of tiles just to the top-right of origin. It does not really matter what you set the tiles to. You will write code in a bit that will set the content of these tiles automatically.
 
 ![Tile map](images/15-puzzle/tilemap.png)
 

+ 0 - 33
docs/en/tutorials/car.md

@@ -219,39 +219,6 @@ Now the car is ready to roll. We have created it inside "car.collection" but it
 
 Now, select <kbd>Project ▸ Build And Launch</kbd> from the main menu and take your new car for a spin!
 
-(You can try it right here in the browser if you want. Use the arrow keys to control the car)
-
-<div id="game-container" class="game-container">
-    <img id="game-preview" src="//storage.googleapis.com/defold-doc/assets/car/preview.jpg"/>
-    <canvas id="game-canvas" tabindex="1" width="1280" height="720">
-    </canvas>
-    <button id="game-button">
-        START GAME <span class="icon"></span>
-    </button>
-    <script src="//storage.googleapis.com/defold-doc/assets/dmloader.js">
-    </script>
-    <script src="//storage.googleapis.com/defold-doc/assets/dmengine_1_2_106.js" async>
-    </script>
-    <script>
-        /* Load app on click in container. */
-        document.getElementById("game-button").onclick = function (e) {
-            var extra_params = {
-                archive_location_filter: function( path ) {
-                    return ("//storage.googleapis.com/defold-doc/assets/car" + path + "");
-                },
-                load_done: function() {},
-                game_start: function() {
-                    var e = document.getElementById("game-preview");
-                    e.parentElement.removeChild(e);
-                }
-            }
-            Module.runApp("game-canvas", extra_params);
-            document.getElementById("game-button").style.display = 'none';
-            document.getElementById("game-button").onclick = null;
-        };
-    </script>
-</div>
-
 If you want you can try to add more instances of *car.collection* to *main.collection*. Each instance is a clone of what's inside *car.collection* with the exact same behavior. Each one listens to input and reacts to the same messages.
 
 That concludes this introductory tutorial. Now go ahead and dive into Defold. We have lots of [manuals and tutorials](/learn) prepared to guide you, and if you get stuck, you are very welcome to the [forum](//forum.defold.com).

+ 0 - 29
docs/en/tutorials/platformer.md

@@ -7,35 +7,6 @@ brief: In this article, you go through the implementation of a basic tile-based
 
 In this article, we go through the implementation of a basic tile-based 2D platformer in Defold. The mechanics we will learn are moving left/right, jumping and falling.
 
-<div id="game-container" class="game-container">
-  <img id="game-preview" src="//storage.googleapis.com/defold-doc/assets/platformer/preview.jpg"/>
-  <canvas id="game-canvas" tabindex="1" width="1024" height="768">
-  </canvas>
-  <button id="game-button">
-    START GAME <span class="icon"></span>
-  </button>
-  <script src="//storage.googleapis.com/defold-doc/assets/dmloader.js"></script>
-  <script src="//storage.googleapis.com/defold-doc/assets/dmengine_1_2_106.js" async></script>
-  <script>
-      /* Load app on click in container. */
-      document.getElementById("game-button").onclick = function (e) {
-          var extra_params = {
-              archive_location_filter: function( path ) {
-                  return ("//storage.googleapis.com/defold-doc/assets/platformer" + path + "");
-              },
-              load_done: function() {},
-              game_start: function() {
-                  var e = document.getElementById("game-preview");
-                  e.parentElement.removeChild(e);
-              }
-          }
-          Module.runApp("game-canvas", extra_params);
-          document.getElementById("game-button").style.display = 'none';
-          document.getElementById("game-button").onclick = null;
-      };
-  </script>
-</div>
-
 There are many different ways to go about creating a platformer. Rodrigo Monteiro has written an exhaustive analysis on the subject and more [here](http://higherorderfun.com/blog/2012/05/20/the-guide-to-implementing-2d-platformers/).
 
 We highly recommend you read it if you are new to making platformers, as it contains plenty of valuable information. We will go into a bit more detail on a few of the methods described and how to implement them in Defold. Everything should however be easy to port to other platforms and languages (we use Lua in Defold).

+ 5 - 38
docs/en/tutorials/runner.md

@@ -5,38 +5,9 @@ brief: In this tutorial you start with an empty project and build a complete run
 
 # Runner tutorial
 
-In this tutorial we start with an empty project and build a complete runner game with an animated character, physics collision, pickups and scoring. Before we begin, take a moment and try the game and get a feel for what we are about to create:
-
-<div id="game-container" class="game-container">
-  <img id="game-preview" src="//storage.googleapis.com/defold-doc/assets/runner/preview.jpg"/>
-  <canvas id="game-canvas" tabindex="1" width="1280" height="720">
-  </canvas>
-  <button id="game-button">
-    START GAME <span class="icon"></span>
-  </button>
-  <script type='text/javascript' src="//storage.googleapis.com/defold-doc/assets/dmloader.js"></script>
-  <script type='text/javascript' src="//storage.googleapis.com/defold-doc/assets/dmengine_1_2_106.js" async></script>
-  <script type='text/javascript'>
-      // Load app on click in container.
-      document.getElementById("game-button").onclick = function (e) {
-          var extra_params = {
-              archive_location_filter: function( path ) {
-                  return ("//storage.googleapis.com/defold-doc/assets/runner" + path + "");
-              },
-              load_done: function() {},
-              game_start: function() {
-                  var e = document.getElementById("game-preview");
-                  e.parentElement.removeChild(e);
-              }
-          }
-          Module.runApp("game-canvas", extra_params);
-          document.getElementById("game-button").style.display = 'none';
-          document.getElementById("game-button").onclick = null;
-      };
-  </script>
-</div>
-
-There is a lot to take in when learning a new game engine, so we have created this tutorial to get you started. It is a fairly complete tutorial that walks through how the engine and the editor works. We assume that you have some famililiarity with programming.
+In this tutorial we start with an empty project and build a complete runner game with an animated character, physics collision, pickups and scoring.
+
+There is a lot to take in when learning a new game engine, so we have created this tutorial to get you started. It is a fairly complete tutorial that walks through how the engine and the editor works. We assume that you have some familiarity with programming.
 
 If you need an introduction to Lua programming, check out our [Lua in Defold manual](/manuals/lua).
 
@@ -59,9 +30,7 @@ So let's begin. We hope you will have a lot of fun going through this tutorial a
 <a name="part-1"></a>
 ## STEP 1 - Installation and setup
 
-The first step is to download the following package. It is a zip package that contains all content that you need to create the tutorial game.
-
-<a class="btn btn-primary btn-xs-block btn-icon" href="//storage.googleapis.com/defold-doc/assets/runner-assets.zip">Download asset package<span aria-hidden="true" class="icon icon-download"></span></a>
+The first step is to [download the following file](https://github.com/defold/defold-examples/releases/download/0.2.0/runner.zip). It is a zip package with the full project and all the assets that you need to create the tutorial game.
 
 Now, if you haven't already downloaded and installed the Defold editor, it's time to do that:
 
@@ -128,9 +97,7 @@ If you run the game again, the application window will be totally black.
 <a name="part-2"></span></a>
 ## STEP 2 - Creating the ground
 
-Let's take the first baby steps and create an arena for our character, or rather a piece of scrolling ground. We do this in a few steps. If you haven't already, download the following zip package containing all the assets you need.
-
-<a class="btn btn-primary btn-xs-block btn-icon" href="//storage.googleapis.com/defold-doc/assets/runner-assets.zip">Download asset package<span aria-hidden="true" class="icon icon-download"></span></a>
+Let's take the first baby steps and create an arena for our character, or rather a piece of scrolling ground. We do this in a few steps.
 
 1. Import the image assets into the project by dragging the files "ground01.png" and "ground02.png" image files (from the sub-folder "level-images" in the asset package) into a suitable location in the project, for instance the folder "images" inside the "main" folder.
 2. Create a new *Atlas* file to hold the ground textures (right-click a suitable folder, for instance the *main* folder, in the *Assets pane* and select <kbd>New ▸ Atlas File</kbd>). Name the atlas file *level.atlas*.

+ 1 - 32
docs/en/tutorials/shadertoy.md

@@ -20,7 +20,7 @@ The Star Nest shader is a pure fragment shader, so we only need something for th
 We start by creating a quadratic plane mesh in Blender (or any other 3D modelling program). For convenience the 4 vertex coordinates are at -1 and 1 on the X-axis and -1 and 1 on the Y axis. Blender has the Z-axis up by default so you need to rotate the mesh 90° around the X-axis. You should also make sure that you generate correct UV-coordinates for the mesh. In Blender, enter *Edit Mode* with the mesh selected, then select <kbd>Mesh ▸ UV unwrap... ▸ Unwrap</kbd>.
 
 
-<a class="btn btn-primary btn-xs-block btn-icon" href="//storage.googleapis.com/defold-doc/assets/quad.dae.zip">Download quad.dae<span aria-hidden="true" class="icon icon-download"></span></a>
+[Download quad.dae](https://github.com/defold/template-basic-3d/blob/master/assets/meshes/quad.dae)
 
 
 ::: sidenote
@@ -253,37 +253,6 @@ end
 
 And that's it! We are done!
 
-You can view the results here:
-
-<div id="game-container" class="game-container">
-  <img id="game-preview" src="//storage.googleapis.com/defold-doc/assets/shadertoy/preview.jpg"/>
-  <canvas id="game-canvas" tabindex="1" width="1280" height="720">
-  </canvas>
-  <button id="game-button">
-    START GAME <span class="icon"></span>
-  </button>
-  <script type='text/javascript' src="//storage.googleapis.com/defold-doc/assets/dmloader.js"></script>
-  <script type='text/javascript' src="//storage.googleapis.com/defold-doc/assets/dmengine_1_2_106.js" async></script>
-  <script type='text/javascript'>
-      /* Load app on click in container. */
-      document.getElementById("game-button").onclick = function (e) {
-          var extra_params = {
-              archive_location_filter: function( path ) {
-                  return ("//storage.googleapis.com/defold-doc/assets/shadertoy" + path + "");
-              },
-              load_done: function() {},
-              game_start: function() {
-                  var e = document.getElementById("game-preview");
-                  e.parentElement.removeChild(e);
-              }
-          }
-          Module.runApp("game-canvas", extra_params);
-          document.getElementById("game-button").style.display = 'none';
-          document.getElementById("game-button").onclick = null;
-      };
-  </script>
-</div>
-
 A fun continuation exercise is to add the original mouse movement input to the shader. It should be fairly straightforward if you grasp how to deal with input.
 
 Happy Defolding!

+ 0 - 31
docs/en/tutorials/snake.md

@@ -7,37 +7,6 @@ brief: If you are new to Defold, this guide will help you to get started with sc
 
 This tutorial walks you through the process of creating one of the most common classic games you can attempt to recreate. There are a lot of variations on this game, this one features a snake that eats "food" and that only grows when it eats. This snake also crawls on a playfield that contains obstacles.
 
-Before beginning, take a minute and try the game:
-
-<div id="game-container" class="game-container">
-  <img id="game-preview" src="//storage.googleapis.com/defold-doc/assets/snake/preview.jpg"/>
-  <canvas id="game-canvas" tabindex="1" width="768" height="768">
-  </canvas>
-  <button id="game-button">
-    START GAME <span class="icon"></span>
-  </button>
-  <script src="//storage.googleapis.com/defold-doc/assets/dmloader.js"></script>
-  <script src="//storage.googleapis.com/defold-doc/assets/dmengine_1_2_119.js" async></script>
-  <script>
-      /* Load app on click in container. */
-      document.getElementById("game-button").onclick = function (e) {
-          var extra_params = {
-              archive_location_filter: function( path ) {
-                  return ("//storage.googleapis.com/defold-doc/assets/snake" + path + "");
-              },
-              load_done: function() {},
-              game_start: function() {
-                  var e = document.getElementById("game-preview");
-                  e.parentElement.removeChild(e);
-              }
-          }
-          Module.runApp("game-canvas", extra_params);
-          document.getElementById("game-button").style.display = 'none';
-          document.getElementById("game-button").onclick = null;
-      };
-  </script>
-</div>
-
 ## Creating the project
 
 1. Start Defold.

+ 0 - 31
docs/en/tutorials/war-battles.md

@@ -23,37 +23,6 @@ The editor automatically opens the "README" file from the project root, containi
 ![icon](images/icon-tutorial.svg){style="display:inline;margin:0 0.5rem 0 0;vertical-align: middle;"}
 [You can also read the full tutorial text on Github](https://github.com/defold/tutorial-war-battles)
 
-To get an idea about what you are about to build, you can try the game here. Move with the <kbd>arrow buttons</kbd> and fire with <kbd>space</kbd>.
-
-<div id="game-container" class="game-container">
-    <img id="game-preview" src="//storage.googleapis.com/defold-doc/assets/war-battles/preview.jpg"/>
-    <canvas id="game-canvas" tabindex="1" width="720" height="720">
-    </canvas>
-    <button id="game-button">
-        START GAME <span class="icon"></span>
-    </button>
-    <script src="//storage.googleapis.com/defold-doc/assets/dmloader.js"></script>
-    <script src="//storage.googleapis.com/defold-doc/assets/dmengine_1_2_106.js" async></script>
-    <script>
-        /* Load app on click in container. */
-        document.getElementById("game-button").onclick = function (e) {
-            var extra_params = {
-                archive_location_filter: function( path ) {
-                    return ("//storage.googleapis.com/defold-doc/assets/war-battles" + path + "");
-                },
-                load_done: function() {},
-                game_start: function() {
-                    var e = document.getElementById("game-preview");
-                    e.parentElement.removeChild(e);
-                }
-            }
-            Module.runApp("game-canvas", extra_params);
-            document.getElementById("game-button").style.display = 'none';
-            document.getElementById("game-button").onclick = null;
-        };
-    </script>
-</div>
-
 If you get stuck, head over to the [Defold Forum](//forum.defold.com) where you will get help from the Defold team and many friendly users.
 
 Happy Defolding!