polyadvent

A game engine from scratch in C
git clone git://jb55.com/polyadvent
Log | Files | Refs | README

commit 7642a2c88772cc7516824b4edf7cde68664ffaf4
parent e5d6f94fad546dd9e2bb0e284ce0c7bfe722db3f
Author: William Casarin <jb55@jb55.com>
Date:   Sun, 21 Jul 2019 17:57:50 -0700

grid docs

Diffstat:
Mdoc/terrain-collision.txt | 19+++++++++++--------
1 file changed, 11 insertions(+), 8 deletions(-)

diff --git a/doc/terrain-collision.txt b/doc/terrain-collision.txt @@ -4,18 +4,21 @@ Basic Idea Use an overlay grid for space partitioning vertex indices: - - +-----+-----+-----+-----+-----+ + 0 1 2 3 4 5 + 0 +-----+-----+-----+-----+-----+ | | | | | | - +-----+-----+-----+-----+-----+ + 1 +-----+-----+-----+-----+-----+ | | | * | | | - +-----+-----+-----+-----+-----+ + 2 +-----+-----+-----+-----+-----+ | | | * | * * | | - +-----+-----+-----+-----+-----+ - | | | * | * | | - +-----+-----+-----+-----+-----+ + 3 +-----+-----+-----+-----+-----+ + | | a | * | * | | + 4 +-----+-----+-----+-----+-----+ | | | | | | - +-----+-----+-----+-----+-----+ + 5 +-----+-----+-----+-----+-----+ + + buckets = size / pdist ? + Where *'s are indices to the corresponding vertex. We'll need to save height in memory so that collision can reference the heights.