The Village

by John Lokker & Ian McBride

Final Graphics Project
CSC 471 - Spring 2012

If you wait until night* in The Village, the monsters will get you.

We modeled and designed basic village elements consisting of houses with beds, tables, and chairs.



To keep track of all objects in the world, we created an array of a struct we created to keep track of an object's state. This struct contains elements such as the object's position, bounding box points, type (house, cow, door, gate, etc.), whether it is being interacted with (always false for most objects, variable for gates and doors), and its curent angle of rotation.

The doors into the houses and gates through the fences are interactable objects that open when you bump into them. To achieve this goal, we set our collision detection method to return a -1 if no collision is detected, a -2 if we detect a collision with an non-interactable object, and the index in the array of structs for the object we collide with if the object can be interacted with (i.e., gates or doors). During movement events (W, A, S, D), we check the return value of this method and if we receive an index, begin an interaction method with that index. This gives us the swinging doors and gates shown below.



We used hierarchical modeling to create all models from a single unit cube, believe it or not!

Animal movement was done using a timer function seperate from that used for interactions. This continuously updated the positions of all animals in the world, creating the back-and-forth effect seen in the world.



We implemented a basic pitch and yaw camera with WASD movement controls for traversing around the village using equations covered in class. In order to prevent the user from being able to "fly," we set the Y value of the Eye position to a constant height, letting the lookAt vector move freely as it should.

*Disclaimer: Nighttime never comes in The Village.