1 [![Build Status](https://travis-ci.org/tsoding/nothing.svg?branch=master)](https://travis-ci.org/tsoding/nothing)
2 [![Build status](https://ci.appveyor.com/api/projects/status/gxfgojq4ko98e0g0/branch/master?svg=true)](https://ci.appveyor.com/project/rexim/nothing/branch/master)
6 ![](https://i.imgur.com/7mECYKU.gif)
7 ![](https://i.imgur.com/ABcJqB5.gif)
19 $ sudo apt-get install gcc cmake libsdl2-dev inotify-tools libxml2-dev
25 $ brew install gcc cmake sdl2
30 For [NixOS] we have a development environment defined in [default.nix]
31 with all of the required dependencies. You can enter the environment
32 with `nix-shell` command:
41 $ sudo pacman -S gcc cmake sdl2 inotify-tools libxml2
46 See [Build on Windows][build-on-windows] section.
55 $ ./nothing ../levels/
66 |---------|-------------------------------------------------------------|
67 | `d` | Move to the right |
68 | `a` | Move to the left |
70 | `c` | Open debug console |
71 | `r` | Reload the current level including the Player's position |
72 | `q` | Reload the current level preserving the Player's position |
73 | `p` | Toggle game pause |
74 | `l` | Toggle transparency on objects. Useful for debugging levels |
79 |--------------|------------------------|
80 | `Left Stick` | Movement of the Player |
86 |-----------|--------------------------|
87 | `ESC` | Exit console |
88 | `Enter` | Evaluate the expression |
89 | `Up/Down` | Traverse console history |
93 Generally creating a level looks like:
96 SVG File -> Custom Level File -> Game
99 To convert SVG to the level file and run svg2level program:
102 $ ./build/svg2level compile <svg-file> <level-file>
105 All of the levels reside in the [./levels/] folder. Use
106 [./levels/Makefile] to automatically rebuild all levels:
109 $ cd levels/ # you must be inside of the `levels/` folder
113 ### Level Editing Workflow
115 1. `$ inkscape ./levels/level.svg &`
116 2. `$ ./build/nothing ./levels/level.txt &`
119 5. Edit Level in Inkscape and Save
120 6. Switch to the Game and reload level by pressing Q
123 ### Objects Reference
127 | Regex of id | Description |
128 |--------------|-------------------------------------------------------------------------------------------------------------------|
129 | `player` | Defines the **position** of the Player. **Size is ignored**. |
130 | `rect.*` | Defines the **size** and **position** of an impenetrable platform block |
131 | `box.*` | Defines the **size** and **position** of a rigid box that obeys the physics of the game |
132 | `region(.*)` | Defines the **size** and **position** of a region that hides the Goals. `\1` defines the id of the Goal to hide. |
133 | `goal(.*)` | Defines the **position** of the goal. **Size is ignored**. `\1` defines the id of the region that hides the goal. |
134 | `lava.*` | Defines the **position** and **size** of a lava block. |
135 | `background` | Defines the **color** of the background. **Position and size are ignored**. |
136 | `backrect.*` | Defines the **size** and **position** of a solid block in the background. |
140 | Regex of id | Description |
141 |-------------|----------------------------------------------------------------------------|
142 | `label.*` | Defines **position** and **text** of a in-game label. **Size is ignored**. |
148 <!-- TODO(#862): Windows build is not documented -->
152 You can support my work via
154 - Twitch channel: https://www.twitch.tv/subs/tsoding
155 - Patreon: https://www.patreon.com/tsoding
157 [visual-studio]: https://www.visualstudio.com/
158 [svg2rects.py]: ./devtools/svg2rects.py
159 [./levels/]: ./levels/
160 [./levels/Makefile]: ./levels/Makefile
161 [gcc]: https://gcc.gnu.org/
162 [cmake]: https://cmake.org/
163 [libsdl2-dev]: https://www.libsdl.org/
164 [NixOS]: https://nixos.org/
165 [default.nix]: ./default.nix
166 [build-on-windows]: #build-on-windows
167 [inotify-tools]: https://github.com/rvoicilas/inotify-tools