Compare commits
4 commits
Author | SHA1 | Date | |
---|---|---|---|
![]() |
62880a4a52 | ||
![]() |
87f61a3a1f | ||
![]() |
8eb7c935bd | ||
![]() |
057512ba4d |
2 changed files with 40 additions and 2 deletions
40
README.md
Normal file
40
README.md
Normal file
|
@ -0,0 +1,40 @@
|
||||||
|
# so\_long
|
||||||
|
|
||||||
|
this is a little video-game i had to make for 42 school. it uses the MinilibX library.
|
||||||
|
|
||||||
|
i spend way too much months on it but it's cool i think
|
||||||
|
|
||||||
|
## compile and run
|
||||||
|
|
||||||
|
this project only works on linux (it may work on macOS too but you will need to manually add the MinilibX library for macOS).
|
||||||
|
|
||||||
|
1. in your terminal, run `make -v`.
|
||||||
|
if you have a `command not found` error or equivalent, you will need to install `make`. on ubuntu / debian, run:
|
||||||
|
```sh
|
||||||
|
$ sudo apt install make
|
||||||
|
```
|
||||||
|
|
||||||
|
2. clone the repository and cd inside it:
|
||||||
|
```sh
|
||||||
|
$ git clone https://gitea.zaclys.com/frzysk/42_so_long
|
||||||
|
$ cd 42_so_long
|
||||||
|
```
|
||||||
|
|
||||||
|
3. build the game:
|
||||||
|
```sh
|
||||||
|
$ make
|
||||||
|
```
|
||||||
|
|
||||||
|
4. run the game:
|
||||||
|
```
|
||||||
|
$ ./so_long
|
||||||
|
```
|
||||||
|
|
||||||
|
## play
|
||||||
|
|
||||||
|
- you control snas.
|
||||||
|
- use arrows, W/A/S/D or Z/Q/S/D to move.
|
||||||
|
- get ketchup.
|
||||||
|
- escape firsk.
|
||||||
|
|
||||||
|
there is a counter of your moves. try to finish the game with the less moves possible :)
|
|
@ -53,8 +53,6 @@ int key_press_hook(int keycode)
|
||||||
{
|
{
|
||||||
t_input_hidden *const hidden = get_input_hidden();
|
t_input_hidden *const hidden = get_input_hidden();
|
||||||
|
|
||||||
if (keycode == XK_Escape)
|
|
||||||
success();
|
|
||||||
if (keycode == XK_Return)
|
if (keycode == XK_Return)
|
||||||
hidden->enter = true;
|
hidden->enter = true;
|
||||||
setkey(keycode, true);
|
setkey(keycode, true);
|
||||||
|
|
Loading…
Add table
Reference in a new issue