IS50B Game Development Programming Week 1

Channel:
Subscribers:
2,650
Published on ● Video Link: https://www.youtube.com/watch?v=nn01OsyBufA



Duration: 1:24:00
287 views
3


We wrote some easy linear algebra functions that will give you a nice toolset when writing video games in C++. We covered:
*vector length - computes how far apart two points are

*vector normalization - sets a vector to length 1
*dotproduct - takes two vectors as input, returns a number from -1 to 1, with 1 meaning they are pointed the same way, -1 meaning they are pointed in opposite directions, and 0 meaning they're orthogonal.
*scalar crossproduct - takes two vectors as input, returns a number from -1 to 1 with 0 meaning they're parallel, and negative numbers meaning the second vector is to the right of the first vector, and positive if it is to the left
*Voroni map generation that scatters cities on a map, and colors tiles on the map based on which city is closest to them.
*Lloyd's algorithm for Voroni relaxation to smooth out cells in a Voroni diagram and create more rounded countries in our map generator


I talked a fair bit about writing AI code for pedestrians to detect if they're going to get run over by a car so that they behave more realistically than in Cyberpunk 2077







Tags:
C++
Game Programming
Game Development
Linear Algebra