]> git.lizzy.rs Git - nothing.git/blob - README.md
Update Quick Start instructions
[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 $ ./nothing
65 ```
66
67 ### Windows
68
69 #### Visual Studio
70
71 - Enter the Visual Studio Command Line Development Environment https://docs.microsoft.com/en-us/cpp/build/building-on-the-command-line
72   - Basically just find `vcvarsall.bat` and run `vcvarsall.bat x64` inside of cmd
73 - Download [SDL2 VC Development Libraries](https://www.libsdl.org/release/SDL2-devel-2.0.9-VC.zip) and copy it to `path\to\nothing`
74
75 ```console
76 > cd path\to\nothing
77 > 7z x SDL2-devel-2.0.9-VC.zip
78 > move SDL2-2.0.9 SDL2
79 > mkdir build
80 > cd build
81 > cmake ..
82 > cmake --build .
83 > .\nothing
84 ```
85
86 #### MinGW (with MSYS)
87
88 ```console
89 $ cd path/to/nothing
90 $ wget https://www.libsdl.org/release/SDL2-devel-2.0.10-mingw.tar.gz
91 $ tar xzf SDL2-devel-2.0.10-mingw.tar.gz
92 $ mv SDL2-2.0.10 SDL2
93 $ rm SDL2-devel-2.0.10-mingw.tar.gz
94 $ mkdir build && cd build
95 $ cmake .. -G "MSYS Makefiles"
96 $ cmake --build .
97 $ ./nothing
98 ```
99
100 #### MinGW (without MSYS)
101 - 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`
102
103 ```console
104 > cd path\to\nothing
105 > 7z x SDL2-devel-2.0.10-mingw.tar.gz -so | 7z x -si -ttar
106 > move SDL2-2.0.10 SDL2
107 > del SDL2-devel-2.0.10-mingw.tar.gz
108 > mkdir build
109 > cd build
110 > cmake .. -G "MinGW Makefiles"
111 > cmake --build .
112 > .\nothing
113 ```
114
115 ## Controls
116
117 ### Game
118
119 #### Keyboard
120
121 | Key      | Action                                                      |
122 |----------|-------------------------------------------------------------|
123 | `d`      | Move to the right                                           |
124 | `a`      | Move to the left                                            |
125 | `SPACE`  | Jump                                                        |
126 | `c`      | Open debug console                                          |
127 | `r`      | Reload the current level including the Player's position    |
128 | `q`      | Reload the current level preserving the Player's position   |
129 | `p`      | Toggle game pause                                           |
130 | `l`      | Toggle transparency on objects. Useful for debugging levels |
131 | `TAB`    | Switch to Level Editor                                      |
132 | `CTRL+q` | Quit the game                                               |
133
134 #### Gamepad
135
136 | Button       | Action                 |
137 |--------------|------------------------|
138 | `Left Stick` | Movement of the Player |
139 | `1`          | Jump                   |
140
141 ### ConsolĂ©
142
143 | Key       | Action                   |
144 |-----------|--------------------------|
145 | `ESC`     | Exit console             |
146 | `Enter`   | Evaluate the expression  |
147 | `Up/Down` | Traverse console history |
148
149 <!-- TODO(#914): Level Editor is not documented -->
150
151 ### Level Editor
152
153 To access the Level Editor open a level and press `TAB`.
154
155 | Key  | Action                 |
156 |------|------------------------|
157 | `F2` | Rename selected object |
158
159 ## Support
160
161 You can support my work via
162
163 - Twitch channel: https://www.twitch.tv/subs/tsoding
164 - Patreon: https://www.patreon.com/tsoding
165
166 [visual-studio]: https://www.visualstudio.com/
167 [svg2rects.py]: ./devtools/svg2rects.py
168 [./levels/]: ./levels/
169 [./levels/Makefile]: ./levels/Makefile
170 [gcc]: https://gcc.gnu.org/
171 [clang]: https://clang.llvm.org/
172 [cmake]: https://cmake.org/
173 [libsdl2-dev]: https://www.libsdl.org/
174 [NixOS]: https://nixos.org/
175 [default.nix]: ./default.nix
176 [inotify-tools]: https://github.com/rvoicilas/inotify-tools