| Zombie simulator: props |
|
|
|
| Sunday, 24 January 2010 12:04 |
|
Since our last episode, I've done a bit more work on the physics engine so that once a building piece has hit the ground and stopped moving, it gets converted back into a mesh and stored in a particular "rubble" mesh buffer that each building has. The physics engine gets very slow when you get lots of objects on the screen, even when they are not moving, so converting them back into a mesh helps keep the performance up. I've still got to do some bounding box work to stop pieces from one building falling into another, but for now, it's time to move on to something else. And that something else is a new building model, which I'm calling the "prison" design, and some props, starting with street lights.
Long ago, when I wrote the module that converts the map into objects, I set it up so that the roads were created as meshes in two varieties, "corners" and straights. Now that it's time to dot the props around the city, it's trivial to work out where the road edges are. I made a couple of mods to the road generating function to put a single street lamp mid way down the right hand side of all straight road pieces and what you see above is the result. Next up, I'm going to sprinkle the town with rubbish bins, letter boxes, trees, benches, bus stops, stop signs and traffic lights. All I need now are the models... blog comments powered by Disqus |



