Skip to content

Commit 3584cd6

Browse files
author
Arcadio Garcia Salvadores
committed
First post, authors, tags
1 parent fd7d347 commit 3584cd6

20 files changed

+289
-91
lines changed

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
# ClockworkBlog
2-
The official blog for the CLockwork Platform
2+
The official blog for the Clockwork Platform

_config.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ description: > # this means to ignore newlines until "baseurl:"
1212
The official blog for the Clockwork game development platform.
1313
Learn how to make awesome modular multiplatform games using JavaScript.
1414
baseurl: "" # the subpath of your site, e.g. /blog
15-
url: "http://clockwork.js.org/" # the base hostname & protocol for your site
15+
url: "https://clockworkdev.github.io/ClockworkBlog" # the base hostname & protocol for your site
1616
twitter_username: clockworkjs
1717
github_username: ClockworkDev
1818

_data/authors.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
arcadio:
2+
name: Arcadio Garcia
3+
pic: https://avatars0.githubusercontent.com/u/9416356?v=3&s=460
4+
twitter: arcadio_g_s
5+
silvia:
6+
name: Silvia Barbero
7+
pic: https://avatars0.githubusercontent.com/u/9416356?v=3&s=460
8+
twitter: SilviShinyStar

_includes/header.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,8 @@
1919
</a>
2020

2121
<div class="trigger">
22-
{% for my_page in site.pages %} {% if my_page.title %}
23-
<a class="page-link" href="{{ my_page.url | prepend: site.baseurl }}">{{ my_page.title }}</a> {% endif %} {% endfor
22+
{% for my_page in site.pages %} {% if my_page.title %} {% if my_page.showHeader %}
23+
<a class="page-link" href="{{ my_page.url | prepend: site.baseurl }}">{{ my_page.title }}</a> {% endif %} {% endif %} {% endfor
2424
%}
2525
<a class="page-link" href="http://clockwork.js.org/">Clockwork</a>
2626
</div>

_layouts/post.html

+13-2
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,26 @@
11
---
22
layout: default
33
---
4+
{% assign author = site.data.authors[page.author] %}
45
<article class="post" itemscope itemtype="http://schema.org/BlogPosting">
56

67
<header class="post-header">
78
<h1 class="post-title" itemprop="name headline">{{ page.title }}</h1>
8-
<p class="post-meta"><time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %} • <span itemprop="author" itemscope itemtype="http://schema.org/Person"><span itemprop="name">{{ page.author }}</span></span>{% endif %}</p>
9+
<p class="post-meta">
10+
<time datetime="{{ page.date | date_to_xmlschema }}" itemprop="datePublished">{{ page.date | date: "%b %-d, %Y" }}</time>{% if page.author %}
11+
<span itemprop="author" itemscope itemtype="http://schema.org/Person"><img src="{{ author.pic }}" style="height:40px;border-radius:20px;margin-left:30px;"/> <a href="{{ site.baseurl }}/authors#{{ author.name }}"><span itemprop="name">{{ author.name }}</span></a> (<a href="http://twitter.com/{{ author.twitter }}">@{{ author.twitter }}</a>)</span>{%
12+
endif %}</p>
913
</header>
1014

1115
<div class="post-content" itemprop="articleBody">
1216
{{ content }}
1317
</div>
1418

15-
</article>
19+
<div class="categories">
20+
Tags:
21+
{% for category in page.categories %}
22+
<a href="{{ site.baseurl }}/tags#{{ category }}"> {{ category }} </a>
23+
{% endfor %}
24+
</div>
25+
26+
</article>

_posts/2017-06-08-welcome-to-jekyll.markdown

-25
This file was deleted.

_posts/2017-6-10-shootemup1.1.md

+54
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
---
2+
layout: post
3+
title: "Shoot 'em up tutorial: 1 - Getting started"
4+
date: 2017-6-10 18:45:11 +0200
5+
author: arcadio
6+
categories: tutorial shootemup
7+
heropic: /pictures/shootemup0.png
8+
---
9+
10+
It is time to get our hands dirty and develop our first Clockwork game! Don’t worry if you have no previous experience with JavaScript and/or game development, this tutorial will guide you through every step.
11+
12+
We are going to develop the “ShootEmUp” game you can find in the Clockwork demos, if you get lost remember that you can find the full source code of the game at [the git repo containing the demos](https://github.com/ClockworkDev/ClockworkDemos/tree/master/ShootEmUp) and more information at [the online documentation ](http://clockwork.js.org/documentation.html).
13+
14+
First of all, you will need to get the Clockwork Runtime and tools, [here you can find instructions for doing so](http://clockwork.js.org/getstarted.html).
15+
16+
Once you are ready open Visual Studio Code and go to `File > Open folder` and select an empty folder, where you will store your project. Then, press F1 to open the VS Code command window and execute `Create Clockwork Project` (start writing the command and it will autosuggest it). It will prompt you for a project name (be creative!) and create a starter project.
17+
18+
You can now try to deploy your project to the Clockwork Runtime (press F1 > `Deploy Clockwork Project`), and if you have everything set up correctly you should see how the Clockwork Runtime launches and the game is installed (If you run this sample game, a cute dog will greet you!). If something fails, this means you might have missed some installation step, so please go back and check everything.
19+
20+
Now, it is time to get rid of the unnecessary assets that came with the starter project. Feel free to delete `dog.png` and edit some files.
21+
22+
![Deleting a file in VS Code]({{ site.baseurl }}/pictures/shootemup1.png)
23+
24+
In levels.xml, delete this line:
25+
26+
{% highlight xml %}
27+
<object name="JakeTheDog" type="talkingDog" x="200" y="200" ></object>
28+
{% endhighlight %}
29+
30+
In spritesheets.xml, delete the dog spritesheet so you are left with this:
31+
32+
{% highlight xml %}
33+
<?xml version="1.0" encoding="utf-8"?>
34+
<spritesheets>
35+
</spritesheets>
36+
{% endhighlight %}
37+
38+
39+
In components.js, delete the dog component so you are left with this:
40+
{% highlight js %}
41+
CLOCKWORKRT.components.register([
42+
]);
43+
{% endhighlight %}
44+
45+
46+
Next, we will download the game assets. Open the folder with the file explorer and replace tileIcon.png with [the image found here](https://raw.githubusercontent.com/ClockworkDev/ClockworkDemos/master/ShootEmUp/gameFiles/tileIcon.png) and copy [the image found here](https://raw.githubusercontent.com/ClockworkDev/ClockworkDemos/master/ShootEmUp/gameFiles/images/spaceships.png) inside the `images` folder, with the name `spaceships.png`. Feel free to modify this pictures with your favorite image editor to give your game a unique feel!
47+
48+
Now, go to `manifest.json` and make some changes:
49+
50+
- Change the background color to `#000` (black)
51+
- Set both the engine fps (frames per second) and the animation frames per second to `30`. This will instruct the engine to execute your game logic and redraw the game 30 times each second.
52+
53+
54+
We are now ready to start working in our game, keep reading [part 2 of this tutorial]({{ site.baseurl }}{% post_url 2017-6-10-shootemup2 %}) to learn how to implement the player's ship!

_posts/2017-6-10-shootemup2.md

+9
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
---
2+
layout: post
3+
title: "Shoot 'em up tutorial: 2 - The player's ship"
4+
date: 2017-6-10 18:46:11 +0200
5+
author: arcadio
6+
categories: tutorial shootemup
7+
heropic: /pictures/shootemup0.png
8+
---
9+

_sass/_base.scss

+17
Original file line numberDiff line numberDiff line change
@@ -204,3 +204,20 @@ pre {
204204
}
205205
}
206206
}
207+
208+
209+
210+
.postLink{
211+
display:block;
212+
border: 1px black solid;
213+
}
214+
215+
.postLink img{
216+
width:200px;
217+
}
218+
219+
.postLink .details{
220+
vertical-align: middle;
221+
display:inline-block;
222+
margin-left:20px;
223+
}

authors.html

+36
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
---
2+
layout: page
3+
title: Authors
4+
permalink: /authors/
5+
---
6+
7+
{% for author in site.data.authors %}
8+
9+
<a href="http://twitter.com/{{ author[1]["twitter"] }}">
10+
<h3 id="{{ author[1]["name"] }}">Posts by <img src="{{ author[1]["pic"] }}" style="height:60px;border-radius:30px;"/> <b>{{ author[1]["name"] }}</b></h3>
11+
</a>
12+
13+
{% assign posts = site.posts | where: "author", author[0] %}
14+
<ul class="post-list">
15+
{% for post in posts %}
16+
<li>
17+
<div class="postLink">
18+
<img src="{{ site.baseurl }}{{ post.heropic }}" />
19+
<div class="details">
20+
<h2>
21+
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
22+
</h2>
23+
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
24+
<div>
25+
Tags:
26+
{% for category in post.categories %}
27+
<a href="{{ site.baseurl }}/tags#{{ category }}"> {{ category }} </a>
28+
{% endfor %}
29+
</div>
30+
</div>
31+
</div>
32+
</li>
33+
{% endfor %}
34+
</ul>
35+
36+
{% endfor %}

index.html

+19-9
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,26 @@ <h1 class="page-heading">Posts</h1>
88

99
<ul class="post-list">
1010
{% for post in site.posts %}
11-
<li>
12-
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
13-
14-
<h2>
15-
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
16-
</h2>
17-
</li>
11+
<li>
12+
<div class="postLink">
13+
<img src="{{ site.baseurl }}{{ post.heropic }}" />
14+
<div class="details">
15+
<h2>
16+
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
17+
</h2>
18+
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
19+
<div>
20+
Tags:
21+
{% for category in post.categories %}
22+
<a href="{{ site.baseurl }}/tags#{{ category }}"> {{ category }} </a>
23+
{% endfor %}
24+
</div>
25+
</div>
26+
</div>
27+
</li>
1828
{% endfor %}
1929
</ul>
2030

21-
<p class="rss-subscribe">subscribe <a href="{{ "/feed.xml" | prepend: site.baseurl }}">via RSS</a></p>
31+
<p class="rss-subscribe">subscribe <a href="{{ " /feed.xml " | prepend: site.baseurl }}">via RSS</a></p>
2232

23-
</div>
33+
</div>

news.html

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
layout: page
3+
title: News
4+
permalink: /news/
5+
showHeader: true
6+
---
7+
8+
The latest news related to the Clockwork platform:
9+
10+
<ul class="post-list">
11+
{% for post in site.posts %}
12+
{% if post.categories contains "news" %}
13+
<li>
14+
<div class="postLink">
15+
<img src="{{ site.baseurl }}{{ post.heropic }}" />
16+
<div class="details">
17+
<h2>
18+
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
19+
</h2>
20+
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
21+
<div>
22+
Tags:
23+
{% for category in post.categories %}
24+
<a href="{{ site.baseurl }}/tags#{{ category }}"> {{ category }} </a>
25+
{% endfor %}
26+
</div>
27+
</div>
28+
</div>
29+
</li>
30+
{% endif %}
31+
{% endfor %}
32+
</ul>

news.md

-17
This file was deleted.

packages.html

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
layout: page
3+
title: Packages
4+
permalink: /packages/
5+
showHeader: true
6+
---
7+
8+
These posts will teach you how to use some of the most popular Clockwork packages:
9+
10+
<ul class="post-list">
11+
{% for post in site.posts %}
12+
{% if post.categories contains "packages" %}
13+
<li>
14+
<div class="postLink">
15+
<img src="{{ site.baseurl }}{{ post.heropic }}" />
16+
<div class="details">
17+
<h2>
18+
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
19+
</h2>
20+
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
21+
<div>
22+
Tags:
23+
{% for category in post.categories %}
24+
<a href="{{ site.baseurl }}/tags#{{ category }}"> {{ category }} </a>
25+
{% endfor %}
26+
</div>
27+
</div>
28+
</div>
29+
</li>
30+
{% endif %}
31+
{% endfor %}
32+
</ul>

packages.md

-17
This file was deleted.

pictures/shootemup0.png

76.8 KB
Loading

pictures/shootemup1.png

83.1 KB
Loading

tags.html

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
layout: page
3+
title: Tags
4+
permalink: /tags/
5+
---
6+
{% for category in site.categories %}
7+
<h3 id="{{ category | first }}">Posts tagged <b>{{ category | first }}</b></h3>
8+
<ul class="post-list">
9+
{% for posts in category %}
10+
{% for post in posts %}
11+
{% if post.title %}
12+
<li>
13+
<div class="postLink">
14+
<img src="{{ site.baseurl }}{{ post.heropic }}" />
15+
<div class="details">
16+
<h2>
17+
<a class="post-link" href="{{ post.url | prepend: site.baseurl }}">{{ post.title }}</a>
18+
</h2>
19+
<span class="post-meta">{{ post.date | date: "%b %-d, %Y" }}</span>
20+
<div>
21+
Tags:
22+
{% for category in post.categories %}
23+
<a href="{{ site.baseurl }}/tags#{{ category }}"> {{ category }} </a>
24+
{% endfor %}
25+
</div>
26+
</div>
27+
</div>
28+
</li>
29+
{% endif %}
30+
{% endfor %}
31+
{% endfor %}
32+
</ul>
33+
{% endfor %}

0 commit comments

Comments
 (0)