Modeling AI behaviour for a fast-paced first-person shooter game such as Halo is a difficult task. Actors must cooperate with each other, react to arbitrary action by the player, and produce varied results. Encounters may contain a large number of actors, requiring special data structures to accomodated memory needs and allow efficient computation. The system implemented in Halo 3, a AAA title from 2007, involves a scheme for clumping actors into groups that share state and a system for representing actor behaviour.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| * Interpolation functions! | |
| * Author: Ian Dunn | |
| */ | |
| #pragma once | |
| template <typename T> | |
| T LinearInterpolate(T p1, T p2, T x) | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <vector> | |
| #include <string> | |
| #include <iostream> | |
| #include <map> | |
| #include <sys/stat.h> | |
| #include "glm/glm.hpp" | |
| #include <assimp/Importer.hpp> | |
| #include <assimp/scene.h> | |
| #include <assimp/postprocess.h> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <vector> | |
| #include <string> | |
| #include <iostream> | |
| #include <map> | |
| #include <sys/stat.h> | |
| #include "glm/glm.hpp" | |
| class SVertex | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #lang plai-typed | |
| (define-type-alias number-like-function (('n -> 'n) 'n -> 'n)) | |
| (define-type-alias (chooser-of 'm) ('m 'm -> 'm)) | |
| (define-type-alias (pair-of 'q) ((chooser-of 'q) -> 'q)) | |
| (define-type-alias (accessor-of 'r) ((pair-of 'r) -> 'r)) | |
| (define | |
| (add1 [f : number-like-function]) : number-like-function |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <assimp/Importer.hpp> | |
| #include <assimp/scene.h> | |
| #include <assimp/postprocess.h> | |
| Assimp::Importer Importer; | |
| aiScene const * const Scene = Importer.ReadFile(FileName, | |
| aiProcess_CalcTangentSpace | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #include <stdio.h> | |
| #include <stdlib.h> | |
| int main(int argc, char * argv[]) | |
| { | |
| if (argc != 4) | |
| { | |
| fprintf(stderr, "usage: histdiff <size> <file1> <file2>\n"); | |
| return -1; | |
| } |
NewerOlder