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 - [Visual Studio 2015+](https://visualstudio.microsoft.com/)
47 - [SDL2 VC Development Libraries](https://www.libsdl.org/release/SDL2-devel-2.0.9-VC.zip)
58 $ ./nothing ../levels/
64 - Enter the Visual Studio Command Line Development Environment https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line
65 - Basically just find `vcvarsall.bat` and run `vcvarsall.bat x64` inside of cmd
66 - Download [SDL2 VC Development Libraries](https://www.libsdl.org/release/SDL2-devel-2.0.9-VC.zip) and copy it to `path\to\nothing`
70 > 7z x SDL2-devel-2.0.9-VC.zip
71 > move SDL2-2.0.9 SDL2
85 |---------|-------------------------------------------------------------|
86 | `d` | Move to the right |
87 | `a` | Move to the left |
89 | `c` | Open debug console |
90 | `r` | Reload the current level including the Player's position |
91 | `q` | Reload the current level preserving the Player's position |
92 | `p` | Toggle game pause |
93 | `l` | Toggle transparency on objects. Useful for debugging levels |
98 |--------------|------------------------|
99 | `Left Stick` | Movement of the Player |
105 |-----------|--------------------------|
106 | `ESC` | Exit console |
107 | `Enter` | Evaluate the expression |
108 | `Up/Down` | Traverse console history |
112 Generally creating a level looks like:
115 SVG File -> Custom Level File -> Game
118 To convert SVG to the level file and run svg2level program:
121 $ ./build/svg2level compile <svg-file> <level-file>
124 All of the levels reside in the [./levels/] folder. Use
125 [./levels/Makefile] to automatically rebuild all levels:
128 $ cd levels/ # you must be inside of the `levels/` folder
132 ### Level Editing Workflow
134 1. `$ inkscape ./levels/level.svg &`
135 2. `$ ./build/nothing ./levels/level.txt &`
138 5. Edit Level in Inkscape and Save
139 6. Switch to the Game and reload level by pressing Q
142 ### Objects Reference
146 | Regex of id | Description |
147 |--------------|-------------------------------------------------------------------------------------------------------------------|
148 | `player` | Defines the **position** of the Player. **Size is ignored**. |
149 | `rect.*` | Defines the **size** and **position** of an impenetrable platform block |
150 | `box.*` | Defines the **size** and **position** of a rigid box that obeys the physics of the game |
151 | `region(.*)` | Defines the **size** and **position** of a region that hides the Goals. `\1` defines the id of the Goal to hide. |
152 | `goal(.*)` | Defines the **position** of the goal. **Size is ignored**. `\1` defines the id of the region that hides the goal. |
153 | `lava.*` | Defines the **position** and **size** of a lava block. |
154 | `background` | Defines the **color** of the background. **Position and size are ignored**. |
155 | `backrect.*` | Defines the **size** and **position** of a solid block in the background. |
159 | Regex of id | Description |
160 |-------------|----------------------------------------------------------------------------|
161 | `label.*` | Defines **position** and **text** of a in-game label. **Size is ignored**. |
165 You can support my work via
167 - Twitch channel: https://www.twitch.tv/subs/tsoding
168 - Patreon: https://www.patreon.com/tsoding
170 [visual-studio]: https://www.visualstudio.com/
171 [svg2rects.py]: ./devtools/svg2rects.py
172 [./levels/]: ./levels/
173 [./levels/Makefile]: ./levels/Makefile
174 [gcc]: https://gcc.gnu.org/
175 [cmake]: https://cmake.org/
176 [libsdl2-dev]: https://www.libsdl.org/
177 [NixOS]: https://nixos.org/
178 [default.nix]: ./default.nix
179 [inotify-tools]: https://github.com/rvoicilas/inotify-tools