Here’s all the mention-worthy stuff that me and Thai have been working on since the last blog two weeks ago.
Here’s some quick changes that don’t need much explanation, to start things off:
The minimap now has fog-of-war style behaviour. Stuff now appears on the minimap as you fly around the level. Because the levels are procedural, it really helps emphasise the exploration side of the game. You can’t just bring up the map at the start of the level and see where you need to go to get everything done. You now have to explore. This is one of me fave things from this update and something I’ve wanted to get in for a while, and I think it’s pretty cool.
Here’s a double speed gif of it updating as I fly around a level.
I made a bunch of other changes to the minimap while I was it:
Level generation & Missions
The mission generator will now always pick an un-played mission, instead of just a random one, until you’ve played them all this life. Once you’ve played them all (all two of them!) it’ll reuse old ones. As we add more missions you’ll start to see less recycling.
Missions now have more control over the level flows they generate. We can now specify if they’re linear/branched/etc, on a per-mission basis. This means we can make the levels more sprawling for missions where you have to find stuff, and make them more linear when we just want you to get somewhere and destroy shit.
The levels that we can generate with branching are pretty cool and varied. Here’s the map view of part of a bigger, branching level:
Static level items/scenery can now be swapped out at level creation time, after the level is generated – and this is linked to the spawning system. It’s used for the static turrets at the moment, so you’ll notice turret types are randomized now.
“Rooms”, or level sections, are now responsible for handling more stuff They now “own” their enemies and and loot. They know their collision/volume bounds and they know when the player enters them. This was needed for the level culling stuff that I’ll talk about in a bit.
Yesterday we started to do some rough prep work for transitioning between indoor/outdoor areas. It’s one of those things that sounds pretty straight forward, until you try and do it. Turns out there is a bunch of things to worry about. Like toggling lights at the right time and deciding where and when exterior walls should be shown. It’s early days for this yet, but it’s fun to work on and it’ll hopefully lead to some pretty awesome levels.
To help with the level transitioning, I went back and spent some time reworking one of the level-block generation tools so that it can handle tileset specific lights and tell all the tiles in a tileset which light they need to be using. I’ve made it so rooms/sections now know if they’re and indoor or outdoor section to help with transitioning and when to toggle lights.
The camera is one of the things that gets changed pretty much every week. I’m never really completely happy with it. Here’s this week’s changes:
Thai replaced my placeholder laser turret stuff with shiny new effects. I also made the laser beams flash when first activating. They don’t hurt you while they’re warming up like this, and it gives you a bit of notice before you get zapped.
Here’s the warning flash, new laser and new burn effect in action:
We also added the first pass of missiles and missile turrets. Thai wants to make a new turret just for the missiles so they look better when launching from it and I want to do a few more tweaks to the missile behaviour. They’re only in the larger rooms of the factory levels at the moment, as they need quite a bit of space for the player to manoeuvre. They’ll be used more in the outdoor areas. They’re pretty brutal at the moment, be warned :)
Playing with the missiles in an empty test level:
Finally, I made it so turrets can spawn rotating in either direction instead of just one. This is a small change but it can really take you by surprise :)
As I mentioned earlier, I did a lot of work on the room system last week. When I started making really big levels, the FPS on my PC went from 100 to 30 and was really unstable – so rooms are now disabled when you’re not near them and only rooms directly connected to your current room/section are now activated. This is a pretty common sense optimization, but I was surprised how much difference it made, because offscreen rooms weren’t actually being rendered before anyway.
To allow for this change, I had to make rooms responsible for handling a lot more stuff. Like which enemies they own etc, so the entire lot can be deactivated and reactivated easily and without breaking anything. Quite a big job, but a massive 70fps boost. Well worth it.
I also reworked the way the mininmap is rendered. It’s now shitloads better and faster, and as a side bonus I now have some useful geometry built at runtime that I’m gonna use for other optimisations soon.
All of this should give a boost to your FPS even if you weren’t having problems before.
Bugfixes / Improvements
There’s now a feedback reporting portal in town. So leave some feedback! :)
I fixed a few bugs that you guys reported (thanks for the feedback!) and made a few of the requested improvements.
Thai made a new aiming laser that has a reticule that projects onto whatever you’re aiming at and scales based on distance. Eventually we want to tie the reticule effect into items, so you’ll have different/funny reticules based on what you’ve got equipped.
As I said in my last blog, there’s a lot of code or generally shit stuff leftover from earlier prototyping that I’ve ignored for too long. So I’m fixing it bit by bit when I need to add new features to the old, shit bits.
This week I majorly reworked all the movement code. Everything (ehmm, most things) still fly/move/handle the same as they did, but the code isn’t so shit and I can change it all easier.
I also separated lots of enemy AI code from the movement code (this was the reason it was shit). Once I’d de-shitted it all, I could easily add enemy roaming behaviour. So now enemies fly about a bit when they’re idle, before they’re aware of the player. This isn’t just a visual thing, as it actually helps to keep the gameplay more dynamic too.
Thai has been working one some other additional stuff that I didn’t cover above because it’s mostly work-in-progress and not ready to be shown for realz yet.
I’ve updated the Facepunch Prototypes build on Steam. Let me know what you think!