]> git.lizzy.rs Git - nothing.git/blob - README.md
META -> ALT
[nothing.git] / README.md
1 [![Tsoding](https://img.shields.io/badge/twitch.tv-tsoding-purple?logo=twitch&style=for-the-badge)](https://www.twitch.tv/tsoding)
2 [![Build Status](https://travis-ci.org/tsoding/nothing.svg?branch=master)](https://travis-ci.org/tsoding/nothing)
3 [![Build Status](https://ci.appveyor.com/api/projects/status/gxfgojq4ko98e0g0/branch/master?svg=true)](https://ci.appveyor.com/project/rexim/nothing/branch/master)
4 [![Build Status](https://github.com/tsoding/nothing/workflows/CI/badge.svg)](https://github.com/tsoding/nothing/actions)
5
6 # Nothing
7
8 ![](https://i.imgur.com/7mECYKU.gif)
9 ![](https://i.imgur.com/ABcJqB5.gif)
10
11 ## Dependencies
12
13 - [gcc] or [clang] or [MSVC 2015+][visual-studio]
14 - [cmake]
15 - [libsdl2-dev]
16
17 ### Ubuntu
18
19 ```console
20 $ sudo apt-get install gcc cmake libsdl2-dev
21 ```
22
23 ### MacOS
24
25 ```console
26 $ brew install gcc cmake sdl2
27 ```
28
29 ### NixOS
30
31 For [NixOS] we have a development environment defined in [default.nix]
32 with all of the required dependencies. You can enter the environment
33 with `nix-shell` command:
34
35 ```console
36 $ nix-shell
37 ```
38
39 ### Arch Linux
40
41 ```console
42 $ sudo pacman -S gcc cmake sdl2
43 ```
44
45 ### Windows
46
47 #### Visual Studio
48
49 - [Visual Studio 2015+](https://visualstudio.microsoft.com/)
50 - [SDL2 VC Development Libraries](https://www.libsdl.org/release/SDL2-devel-2.0.9-VC.zip)
51
52 #### MinGW
53 - [mingw-w64](https://mingw-w64.org)
54 - [SDL2 MinGW Development Libraries](https://www.libsdl.org/release/SDL2-devel-2.0.10-mingw.tar.gz)
55
56 ## Quick Start
57
58 ### Linux
59
60 #### CMake
61
62 ```console
63 $ mkdir build
64 $ cd build/
65 $ cmake ..
66 $ make
67 $ ./nothing
68 ```
69
70 #### SCU
71
72 ```console
73 $ ./build-posix.sh
74 $ ./nothing
75 ```
76
77 ### Windows
78
79 #### Visual Studio
80
81 - Enter the Visual Studio Command Line Development Environment https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line
82   - Basically just find `vcvarsall.bat` and run `vcvarsall.bat x64` inside of cmd
83 - Download [SDL2 VC Development Libraries](https://www.libsdl.org/release/SDL2-devel-2.0.9-VC.zip) and copy it to `path\to\nothing`
84
85 ```console
86 > cd path\to\nothing
87 > 7z x SDL2-devel-2.0.9-VC.zip
88 > move SDL2-2.0.9 SDL2
89 > mkdir build
90 > cd build
91 > cmake ..
92 > cmake --build .
93 > .\nothing
94 ```
95
96 #### MinGW (with MSYS)
97
98 ```console
99 $ cd path/to/nothing
100 $ wget https://www.libsdl.org/release/SDL2-devel-2.0.10-mingw.tar.gz
101 $ tar xzf SDL2-devel-2.0.10-mingw.tar.gz
102 $ mv SDL2-2.0.10 SDL2
103 $ rm SDL2-devel-2.0.10-mingw.tar.gz
104 $ mkdir build && cd build
105 $ cmake .. -G "MSYS Makefiles"
106 $ cmake --build .
107 $ ./nothing
108 ```
109
110 #### MinGW (without MSYS)
111 - Download [SDL2 MinGW Development Libraries](https://www.libsdl.org/release/SDL2-devel-2.0.10-mingw.tar.gz) and copy it to `path\to\nothing`
112
113 ```console
114 > cd path\to\nothing
115 > 7z x SDL2-devel-2.0.10-mingw.tar.gz -so | 7z x -si -ttar
116 > move SDL2-2.0.10 SDL2
117 > del SDL2-devel-2.0.10-mingw.tar.gz
118 > mkdir build
119 > cd build
120 > cmake .. -G "MinGW Makefiles"
121 > cmake --build .
122 > .\nothing
123 ```
124
125 ## Controls
126
127 ### Game
128
129 #### Keyboard
130
131 | Key       | Action                                                      |
132 |---------- |-------------------------------------------------------------|
133 | `d`       | Move to the right                                           |
134 | `a`       | Move to the left                                            |
135 | `w/SPACE` | Jump                                                        |
136 | `c`       | Open debug console                                          |
137 | `r`       | Reload the current level including the Player's position    |
138 | `q`       | Reload the current level preserving the Player's position   |
139 | `p`       | Toggle game pause                                           |
140 | `l`       | Toggle transparency on objects. Useful for debugging levels |
141 | `TAB`     | Switch to Level Editor                                      |
142 | `CTRL+q`  | Quit the game                                               |
143
144 #### Gamepad
145
146 | Button       | Action                 |
147 |--------------|------------------------|
148 | `Left Stick` | Movement of the Player |
149 | `1`          | Jump                   |
150
151 ### ConsolĂ©
152
153 | Key       | Action                   |
154 |-----------|--------------------------|
155 | `ESC`     | Exit console             |
156 | `Enter`   | Evaluate the expression  |
157 | `Up/Down` | Traverse console history |
158 | `CTRL+L`  | Clear                    |
159 | `CTRL+W`  | Cut                      |
160 | `ALT+W`  | Copy                     |
161 | `CTRL+Y`  | Paste                    |
162
163 ### Level Editor
164
165 To access the Level Editor open a level and press `TAB`.
166
167 | Key             | Action                                     |
168 |-----------------|--------------------------------------------|
169 | `s`             | Save level                                 |
170 | `Mouse Wheel`   | Zoom and pan                               |
171 | `CTRL+z`        | Undo                                       |
172 | `q`             | Toggle snapping mode                       |
173 | `SHIFT+Up/Down` | Change overlaping order of selected object |
174 | `CTRL+c/v`      | Copy/paste selected object                 |
175 | `F2`            | Rename selected object                     |
176 | `DELETE`        | Delete selected object                     |
177
178 ## Support
179
180 You can support my work via
181
182 - Twitch channel: https://www.twitch.tv/subs/tsoding
183 - Patreon: https://www.patreon.com/tsoding
184
185 [visual-studio]: https://www.visualstudio.com/
186 [svg2rects.py]: ./devtools/svg2rects.py
187 [./levels/]: ./levels/
188 [./levels/Makefile]: ./levels/Makefile
189 [gcc]: https://gcc.gnu.org/
190 [clang]: https://clang.llvm.org/
191 [cmake]: https://cmake.org/
192 [libsdl2-dev]: https://www.libsdl.org/
193 [NixOS]: https://nixos.org/
194 [default.nix]: ./default.nix
195 [inotify-tools]: https://github.com/rvoicilas/inotify-tools