Saturday, February 1, 2014

Game Dev 7: Getting new objects (Houses, Trees) quickly into the game, and a Skybox!

Leveraging the infrastructure I've already created, I decided to see how easy it would be to add new objects into the game world using my engine. Each object consists of models, animations, and bounding boxes for collision. I roughed out what was needed for a house and trees in less than an hour. I added in an animation to make the trees "wiggle" every now and again. To say that I'm happy with the ease I could add such objects in would be an understatement. I can tell that the modularity I've baked into the engine will pay off in terms of reduced programming time down the line. Additionally, all that modularity allows me optimize code and improve performance later, such as in the ability to plug and play different graphics rendering modes to display the object.

I also decided it was time to get rid of the black background and build a simple skybox. A skybox is simply a cube, with the top half representing sky and the bottom half representing sea. The skybox's purpose, of course, is to mimic the sky and the horizon. The game world (really only the player to some radius) exists within the sky box. Of course, the skybox isn't restricted to being a box and can be a semi-sphere or another shape entirely. Choosing a cube however is cheap and effective.

Already, a game is starting to take shape from the 3d engine I'm working on. I'm not sure how I like my lack of lighting and texturing for all these models, but that's something to decide later.


No comments:

Post a Comment