Skip to content

Commit 636b1af

Browse files
author
Diego F. Goberna
committed
Spanish translation of the tutorials
1 parent 1975969 commit 636b1af

44 files changed

Lines changed: 1536 additions & 0 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ Phaser OSX.sublime-workspace
77
Phaser.sublime-project
88
Phaser.sublime-workspace
99
*.suo
10+
*.sublime-project
11+
*.sublime-workspace
1012

1113
# Vendors
1214
node_modules/
249 KB
Binary file not shown.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>hello phaser!</title>
6+
<script src="phaser.min.js"></script>
7+
</head>
8+
<body>
9+
10+
<script type="text/javascript">
11+
12+
window.onload = function() {
13+
14+
var game = new Phaser.Game(800, 600, Phaser.AUTO, '', { preload: preload, create: create });
15+
16+
function preload () {
17+
18+
game.load.image('logo', 'phaser.png');
19+
20+
}
21+
22+
function create () {
23+
24+
var logo = game.add.sprite(game.world.centerX, game.world.centerY, 'logo');
25+
logo.anchor.setTo(0.5, 0.5);
26+
27+
}
28+
29+
};
30+
31+
</script>
32+
33+
</body>
34+
</html>

tutorials/Spanish/01 Comenzando/hellophaser/phaser.min.js

Lines changed: 12 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
176 KB
Loading
113 KB
Loading
66.9 KB
Loading
115 KB
Loading
97.6 KB
Loading
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
<!doctype html>
2+
<html>
3+
<head>
4+
<meta charset="UTF-8" />
5+
<title>Phaser Tutorial 01 - Getting Started</title>
6+
<script src="build/phaser.js" type="text/javascript"></script>
7+
<style>
8+
body {
9+
font-family: Arial;
10+
font-size: 14px;
11+
}
12+
</style>
13+
</head>
14+
<body>
15+
16+
<h1>Getting started with Phaser</h1>
17+
18+
<ul>
19+
<li><a href="index.html">Part 1: Introduction</a></li>
20+
<li><a href="part2.html">Part 2: Installing a web server</a></li>
21+
<li><a href="part3.html">Part 3: Run in the Cloud</a></li>
22+
<li><a href="part4.html">Part 4: Choosing an Editor</a></li>
23+
<li><a href="part5.html">Part 5: Downloading Phaser</a></li>
24+
<li><a href="part6.html">Part 6: Hello World!</a></li>
25+
<li><a href="part7.html">Part 7: The Phaser Examples</a></li>
26+
<li><a href="part8.html">Part 8: Next Steps</a></li>
27+
</ul>
28+
29+
<h2>Part 1 - Introduction</h2>
30+
31+
<p>In this tutorial we're going to cover setting-up a development enviornment with which you can build your Phaser games. This will include running a local web server, picking an IDE, getting the latest version of Phaser and checking it all works together properly.</p>
32+
33+
<p><strong>"Why do I need a local web server? Can't I just drag the html files onto my browser?"</strong></p>
34+
35+
<p>Not these days, no. I appreciate that it's a bit confusing, even contradictory at times, but it all boils down to browser security. If you're making a static html web page, perhaps with a few images in it, then you can happily drag this file into your browser and see the end results. You can also "Save As" entire web pages locally and re-open them, with all the contents mostly intact. If both of these things work why can't you drag an HTML5 game into a browser and run it?</p>
36+
37+
<p>It's to do with the protocol used to access the files. When you request anything over the web you're using http, and the server level security is enough to ensure you can only access files you're meant to. But when you drag a file in it's loaded via the local file system (technically file://) and that is massively restricted, for obvious reasons. Under file:// there's no concept of domains, no server level security, just a raw file system. Ask yourself this: do you really want JavaScript to have the ability to load files from your local file system? Your immediate answer should of course be "not in a million years!". If JavaScript had free reign while operating under file:// there would be nothing stopping it loading pretty much <em>any</em> file it fancied and sending it off who knows where.</p>
38+
39+
<p>Because this is so dangerous browsers lock themselves down tighter than Alcatraz when running under file://. Every single page becomes treated as a unique local domain. That is why "Save Web page" works, to a degree. It opens under the same cross-site restrictions as if they were on a live server. There's a detailed post about it on the Chromium blog: http://blog.chromium.org/2008/12/security-in-depth-local-web-pages.html.</p>
40+
41+
<p>Your game is going to need to load in resources. Images, audio files, JSON data, maybe other JavaScript files. In order to do this it needs to run unhindered by the browser security shackles. It needs http:// access to the game files. And for that we need a web server.</p>
42+
43+
<p><a href="part2.html">Part 2: Installing a web server</a></p>
44+
45+
</body>
46+
</html>

0 commit comments

Comments
 (0)