Camera and Scene Systems
By Chris Caruthers
The first two systems I’m undertaking are the Camera and the Scene systems. Camera should be pretty simple. Through the Game class, Camera will have the player’s world matrix, with which I can create a parented world matrix for the camera(really just the view matrix). Right now a hard locked camera will do so I can just XMMatrixTranslate every frame to get the new view matrix. This also means that no real controls have to be implemented for the camera yet, as controls will be moving the player and the camera will react accordingly. Camera will also contain FOV and any other camera related variables. I expect the Scene system will be a bit tougher. First I need to have the ability to create GameObjects such as floor, walls, and cover. Upon Load these will be created and pushed into a vector to be sent to the game object manager. We decided to use a file system for our levels as long as we’re testing to reduce build and load times prior to implementing procedural generation, however I think it would work nicely to use some procedural generation to keep the file type simple. My idea is to print a seed, along with the width, length, and number of cover blocks to randomly create. Upon reading in the file, the system would build game objects for the floor, walls and ceiling based on the values, and then with the random seed, create the cover blocks randomly. Using the seed ensures that a given file will load the same level no matter what, but keep the file simple. I also plan to allow for reading of hard coded blocks by reading xy position, height, width, and length. The scene manager keeps track of multiple scenes, but for now this is mostly moot because we’re only gonna need one scene for now, however moving between levels will be very important in the future.
Comments
Post a Comment