https://github.com/akuli/3dthingy
experiment with creating a 3d game-engine-like-thingy
https://github.com/akuli/3dthingy
Last synced: 3 months ago
JSON representation
experiment with creating a 3d game-engine-like-thingy
- Host: GitHub
- URL: https://github.com/akuli/3dthingy
- Owner: Akuli
- License: mit
- Created: 2019-07-12T20:54:15.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2019-10-14T19:00:45.000Z (about 6 years ago)
- Last Synced: 2025-01-31T16:18:17.784Z (12 months ago)
- Language: C
- Size: 122 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 3d Thingy
This is my experiment with creating a 3d game using SDL 2.
I do all the 3d-ness myself, and I use SDL2 only for drawing points on a window.

You can use arrow keys to move around, or fly and land with `w` and `s` keys.
## Compiling
$ sudo apt install git gcc make pkg-config libsdl2-dev
$ git clone https://github.com/Akuli/3dthingy
$ cd 3dthingy
$ make
$ ./3dthingy
I have no idea what you need to do if you don't have apt.
## Running IWYU
**You don't need to do this to run the program.**
This is for developing program.
IWYU checks whether the source code files have the correct includes.
1. Install cmake
$ sudo apt install cmake
2. Add LLVM 8 stuff to your `sources.list` from https://apt.llvm.org and
install the stuff:
$ sudo nano /etc/apt/sources.list
$ sudo apt update
$ sudo apt install llvm-8-dev libclang-8-dev clang-8
Again, I have no idea what you should do if you don't have apt. Sorry.
3. Clone IWYU and compile it
$ git clone https://github.com/include-what-you-use/include-what-you-use ~/iwyu
$ cd ~/iwyu
$ mkdir build
$ cd build
$ cmake ../include-what-you-use -DCMAKE_PREFIX_PATH=/usr/lib/llvm-8
**If you get a CMake error**, look for `llvm-something` in the error
message. If the `something` part is NOT `8`, then the build is using
the wrong LLVM version, and you need to make sure that the `-D` part
of the `cmake` command ends with 8. The same command is in IWYU's
README with 7 instead of 8.
4. Compile the IWYU
$ make -j2
This takes a long time and about a gigabyte of RAM because IWYU is
written in C++. I don't like C++.
5. Run the IWYU
$ cd ~/path/to/3dthingy
$ export IWYU=~/iwyu/build/bin/include-what-you-use
$ make iwyu
If you get an error about IWYU not finding `` or some
other include file, try this instead:
$ export IWYU='~/iwyu/build/bin/include-what-you-use -I/usr/include/clang/8/include'
$ make iwyu
With this, sometimes IWYU suggest `"stdbool.h"` instead of
`` to me, but at least it's better than nothing. Adding
`#include ` instead of copy/pasting IWYU's suggestion
works, too.