You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: analysis.adoc
+35-1Lines changed: 35 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,5 +4,39 @@ v0.1
4
4
:toc:
5
5
:homepage: https://gamedevframework.github.io/
6
6
:stem: latexmath
7
-
:source-highlighter: coderay
7
+
:source-highlighter: rouge
8
8
:xrefstyle: full
9
+
10
+
We analyse Sokoban in an agnostic way, not depending on the underlying technology. This analysis will be the base for the three parts of the tutorial.
11
+
12
+
13
+
== Rules of Sokoban
14
+
15
+
https://en.wikipedia.org/wiki/Sokoban[Sokoban] is a puzzle game. The goal for the player is to push boxes on their places in a room. The player can only push the boxes, and can only push one at a time.
16
+
17
+
18
+
== Entities in Sokoban
19
+
20
+
There are three main entities in Sokoban: the level, the hero and the boxes.
21
+
22
+
=== Level
23
+
24
+
The level is a 2D array representing the room. Each cell in the array can be either a wall, a goal or a (non-goal) floor. The locations of the hero and the boxes are not coded in this entity because it would had some complexities. The level has a single attribute:
25
+
26
+
- `blocks` that is a 2D array of block properties (`Wall`, `Goal` or `Floor`)
27
+
28
+
=== Hero
29
+
30
+
The hero has a single attribute:
31
+
32
+
- `position` that indicates its position in the room.
33
+
34
+
=== Boxes
35
+
36
+
Boxes, like the hero, are represented by their position in the room. Hence the structure for the boxes has a single attribute too:
37
+
38
+
- `positions` that is an array of positions in the room, one for each box.
39
+
40
+
== Graphics for Sokoban
41
+
42
+
The goal of this tutorial is not to teach graphics. So we will use the excellent graphics from https://kenney.nl/[Kenney.nl] and especially the https://kenney.nl/assets/sokoban[assets for sokoban].
Copy file name to clipboardExpand all lines: beginner.adoc
+63-1Lines changed: 63 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,5 +4,67 @@ v0.1
4
4
:toc:
5
5
:homepage: https://gamedevframework.github.io/
6
6
:stem: latexmath
7
-
:source-highlighter: coderay
7
+
:source-highlighter: rouge
8
8
:xrefstyle: full
9
+
10
+
This tutorial is a step-by-step construction of Sokoban with Gamedev Framework. In this beginner tutorial, we will understand the basics of game development and use the minimal features of Gamedev Framework.
11
+
12
+
13
+
== Project Setup
14
+
15
+
.Structure of the project
16
+
* `/`: root directory of the project
17
+
** `/code/`: directory for the source code
18
+
*** `sokoban01.cc`: the single file for this tutorial
Copy file name to clipboardExpand all lines: index.adoc
+3-1Lines changed: 3 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,9 +4,11 @@ v0.1
4
4
:toc:
5
5
:homepage: https://gamedevframework.github.io/
6
6
:stem: latexmath
7
-
:source-highlighter: coderay
7
+
:source-highlighter: rouge
8
8
:xrefstyle: full
9
9
10
+
Welcome in the tutorial for Gamedev Framework. In this tutorial, we are going to learn how to create a game with Gamedev Framework. The game is https://en.wikipedia.org/wiki/Sokoban[Sokoban].
0 commit comments