]> git.lizzy.rs Git - nothing.git/blob - README.md
Update dependencies information
[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
5 # Nothing
6
7 ![](https://i.imgur.com/7mECYKU.gif)
8 ![](https://i.imgur.com/ABcJqB5.gif)
9
10 ## Dependencies
11
12 - [gcc] or [clang] or [MSVC 2015+][visual-studio]
13 - [cmake]
14 - [libsdl2-dev]
15
16 ### Ubuntu
17
18 ```console
19 $ sudo apt-get install gcc cmake libsdl2-dev
20 ```
21
22 ### MacOS
23
24 ```console
25 $ brew install gcc cmake sdl2
26 ```
27
28 ### NixOS
29
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:
33
34 ```console
35 $ nix-shell
36 ```
37
38 ### Arch Linux
39
40 ```console
41 $ sudo pacman -S gcc cmake sdl2
42 ```
43
44 ### Windows
45
46 #### Visual Studio
47
48 - [Visual Studio 2015+](https://visualstudio.microsoft.com/)
49 - [SDL2 VC Development Libraries](https://www.libsdl.org/release/SDL2-devel-2.0.9-VC.zip)
50
51 #### MinGW
52 - [mingw-w64](https://mingw-w64.org)
53 - [SDL2 MinGW Development Libraries](https://www.libsdl.org/release/SDL2-devel-2.0.10-mingw.tar.gz)
54
55 ## Quick Start
56
57 ### Linux
58
59 ```console
60 $ mkdir build
61 $ cd build/
62 $ cmake ..
63 $ make
64 $ cd ../assets/
65 $ ../build/nothing
66 ```
67
68 ### Windows
69
70 #### Visual Studio
71
72 - Enter the Visual Studio Command Line Development Environment https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line
73   - Basically just find `vcvarsall.bat` and run `vcvarsall.bat x64` inside of cmd
74 - Download [SDL2 VC Development Libraries](https://www.libsdl.org/release/SDL2-devel-2.0.9-VC.zip) and copy it to `path\to\nothing`
75
76 ```console
77 > cd path\to\nothing
78 > 7z x SDL2-devel-2.0.9-VC.zip
79 > move SDL2-2.0.9 SDL2
80 > mkdir build
81 > cd build
82 > cmake ..
83 > cmake --build .
84 > cd ../assets/
85 > ..\build\nothing
86 ```
87
88 #### MinGW (with MSYS)
89
90 ```console
91 $ cd path/to/nothing
92 $ wget https://www.libsdl.org/release/SDL2-devel-2.0.10-mingw.tar.gz
93 $ tar xzf SDL2-devel-2.0.10-mingw.tar.gz
94 $ mv SDL2-2.0.10 SDL2
95 $ rm SDL2-devel-2.0.10-mingw.tar.gz
96 $ mkdir build && cd build
97 $ cmake .. -G "MSYS Makefiles"
98 $ cmake --build .
99 $ cd ../assets/
100 $ ../build/nothing
101 ```
102
103 #### MinGW (without MSYS)
104 - 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`
105
106 ```console
107 > cd path\to\nothing
108 > 7z x SDL2-devel-2.0.10-mingw.tar.gz -so | 7z x -si -ttar
109 > move SDL2-2.0.10 SDL2
110 > del SDL2-devel-2.0.10-mingw.tar.gz
111 > mkdir build
112 > cd build
113 > cmake .. -G "MinGW Makefiles"
114 > cmake --build .
115 > cd ../assets/
116 > ..\build\nothing
117 ```
118
119 ## Controls
120
121 ### Game
122
123 #### Keyboard
124
125 | Key      | Action                                                      |
126 |----------|-------------------------------------------------------------|
127 | `d`      | Move to the right                                           |
128 | `a`      | Move to the left                                            |
129 | `SPACE`  | Jump                                                        |
130 | `c`      | Open debug console                                          |
131 | `r`      | Reload the current level including the Player's position    |
132 | `q`      | Reload the current level preserving the Player's position   |
133 | `p`      | Toggle game pause                                           |
134 | `l`      | Toggle transparency on objects. Useful for debugging levels |
135 | `TAB`    | Switch to Level Editor                                      |
136 | `CTRL+q` | Quit the game                                               |
137
138 #### Gamepad
139
140 | Button       | Action                 |
141 |--------------|------------------------|
142 | `Left Stick` | Movement of the Player |
143 | `1`          | Jump                   |
144
145 ### ConsolĂ©
146
147 | Key       | Action                   |
148 |-----------|--------------------------|
149 | `ESC`     | Exit console             |
150 | `Enter`   | Evaluate the expression  |
151 | `Up/Down` | Traverse console history |
152
153 <!-- TODO(#914): Level Editor is not documented -->
154
155 ### Level Editor
156
157 To access the Level Editor open a level and press `TAB`.
158
159 | Key  | Action                 |
160 |------|------------------------|
161 | `F2` | Rename selected object |
162
163 ## Support
164
165 You can support my work via
166
167 - Twitch channel: https://www.twitch.tv/subs/tsoding
168 - Patreon: https://www.patreon.com/tsoding
169
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 [clang]: https://clang.llvm.org/
176 [cmake]: https://cmake.org/
177 [libsdl2-dev]: https://www.libsdl.org/
178 [NixOS]: https://nixos.org/
179 [default.nix]: ./default.nix
180 [inotify-tools]: https://github.com/rvoicilas/inotify-tools