Buildings, Doors & Zombies
Since my last blog update I’ve spent the majority of my game dev time working on my map and in particular the buildings. When I say buildings I mostly mean one in particular which is a house that I’ve been working on for a good while now. The house initially started out as 100% csg but after memory issues in the editor and feedback and advice on the forum I decided to re-do parts of the house as models. This meant I had to use blender more than I would have liked but the good thing is I think I am getting a bit more used to it so I guess the learning experience is good.
So now my doors, door frames, windows and light fixtures are all models instead of csg. The advantage with this it seems is that the models are instanced automatically by the leadwerks engine and can be used over and over without increasing memory usage too much. The other advantage is it allows me to set the view range on the different models, something that csg ignores, maybe because it doesn’t need it so much compared to complex models. So for example by setting my ceiling light models to Near they aren’t rendered far away so I am hoping this will help speed up game performance too. I also removed the csg skirting boards along the walls in favour of wall textures with skirting on. The look is just as good but more importantly again it should hopefully provide better performance.
In general I’m wrestling a lot with performance as I go because my pc is not high end. Before I renovated the house building a street with 10 of them was giving me about 5fps but I’ve managed to bring this up to about 10fps and I still have some more improvements I can make. Although for every improvement I make I’ll want to also be adding some other stuff in so it might cancel out each other in the long run. Will just have to see how it goes.
The floors and walls in my buildings I have left as csg, the advantage I see with this is I can easily apply different textures to the walls and floors in the different buildings to add variety. And I can easily adjust building layouts in the editor if I need to. If I have to convert these to models for performance then I’ll probably wait for a csg to mdl conversion because it would take me ages to re-texture it in blender.
Lights
I added workable lights/light switches - This was pretty quick and easy to do thanks to the flowgraph which I used for the first time and switching the lights on for the first time was a happy moment. I’m not sure about the lights yet I’ll have to see how they effect performance before I decide on which ones to have. Right now they are all in there for now but are hidden.
Doors
So the next thing to add was doors which turned out much trickier than the lights. I used the default swingingdoor.lua script but their are so many little things to consider that it took a while to get them working right. And then the zombies wanted to walk through them when closed, which took another while to figure out.
Zombies
During the steam sale I picked up the zombie pack and the fps pack and I’ve been testing them out. I’ve changed the default ai a bit so there are fast and slow zombies in the game and also they can re-animate (as in come back to life) a number of times after you kill them. So watch your back when you kill one You can run into buildings and close the doors to try and evade them but be careful as they can sometimes muddle doors open, so again watch your back
I’m having a blast at the moment now that there is some actual gameplay and managed to scare myself a few times so that’s a good sign.
I’ll probably do a dev log video soon but for now I will finish this blog post with some screenshots of a test zombie horde. This actually had very little impact on my frame rate which I was happy to see.
- 6
14 Comments
Recommended Comments