18 lines
1 KiB
Markdown
18 lines
1 KiB
Markdown
# Notes
|
|
|
|
## Reminders
|
|
- `wrap.fnl` is the "entrypoint" for the project.
|
|
- Run the project via `make` or `love` (ex: `love .` from base directory)
|
|
|
|
## Ray-Casting Basics
|
|
Every frame, from left to right, a vertical slice is drawn. The slice can be a
|
|
part of a texture, or a color. Generally, the slice is drawn the full height of
|
|
the wall; half-walls are possible, and presumably so are windows. The slice to
|
|
be drawn is determined by sending a ray from the camera (or camera plane) in the
|
|
facing direction, until the ray intercepts with a wall. The walls, as well as
|
|
most other level details, are provided in a 2-d array, generally of numbers. In
|
|
this example, the number 0 represents open space, and every number above 0
|
|
represents a wall with a specific texture. The initial way of determining the
|
|
ray is using Euclidean geometry, but this can result in a fish-eye lens
|
|
appearance. Lode's tutorial uses vectors to establish a camera plane from which
|
|
all calculations are performed. This helps reduce the fish-eye appearance.
|