https://github.com/nqpz/futracer
Race through breathtaking 3-D graphics with Futhark! :snail:
https://github.com/nqpz/futracer
3d-engine 3d-graphics futhark
Last synced: 7 months ago
JSON representation
Race through breathtaking 3-D graphics with Futhark! :snail:
- Host: GitHub
- URL: https://github.com/nqpz/futracer
- Owner: nqpz
- License: mit
- Created: 2016-10-05T00:49:42.000Z (about 9 years ago)
- Default Branch: master
- Last Pushed: 2021-04-06T20:15:56.000Z (over 4 years ago)
- Last Synced: 2025-03-24T08:55:46.703Z (8 months ago)
- Topics: 3d-engine, 3d-graphics, futhark
- Language: Python
- Homepage:
- Size: 201 KB
- Stars: 14
- Watchers: 3
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# futracer
Race through breathtaking 3-D graphics with Futhark through OpenCL
(*not* OpenGL)!
Run `make` to build the library, and then run `./futcubes.py`,
`./futfly.py`, or `./futdoom.py` to run the example programs. Use the
`--help` argument to see which settings exist.
There are three rendering approaches: `segmented` (the default) `chunked`, and
`scatter_bbox`. The `segmented` approach is a rasterizer, while
`chunked` and `scatter_bbox` are raycasters.
*Click on the image to see a 1-minute video of `futcubes.py` in action.*
[](https://hongabar.org/~niels/futracer/futracer-textured.webm)
*Click on the image to see a 1-minute video of `futfly.py` in action.*
[](https://hongabar.org/~niels/futracer/futracer-futfly.webm)
*Click on the image to see a 30-second video of `futdoom.py` in action.*
[](https://hongabar.org/~niels/futracer/futracer-futdoom.webm)
## Dependencies
futracer depends on the programming language Futhark;
see [http://futhark-lang.org/](http://futhark-lang.org/)
and
[https://github.com/HIPERFIT/futhark](https://github.com/HIPERFIT/futhark).
futracer also depends on PyGame, PyPNG (only `futcubes.py` and
`futdoom.py`), and NumPy.
## Keyboard controls
Use the arrow keys for now. Use Page Down and Page Up to decrease and
increase the view distance for rendering (fun!). Use 1 and 2 to
decrease and increase the draw distance.
Use R to switch rendering approaches.
For the `chunked` rendering approach, use A and D to decrease and
increase the number of draw rectangles on the X axis, and W and S on the
Y axis. Sometime in the future this should be chosen automatically.
Warning: This might slow down the program to a crawl for some reason.
## Scripts
`futdoom.py` supports custom maps. For an example of a (poorly)
randomly generated map, run:
```
./futdoomlib/scripts/generate_random_map.py | ./futdoom.py --auto-fps --level -
```