This week was not as productive as I hoped it would be. (classic devlog story?)
Last week I got InControl and Pool Manager 5 from the asset store and changed the way I was handling basic control and spawning.
I can now handle dynamically placing a lot of objects and NPCs in the scene without much of a performance hit but I’ll still need to fundamentally change the way I’m instancing some of the NPCs.
For example, I only want Wild Creatures to be active when a Bud or the Player enters the Wilds. If an AI Bud does it its fine – I just instance a few wild creatures to make sure AI Buds aren’t able to collect Orbs without resistance.
The issues arise if the player enters the Wilds. Right now at the start of the game I randomly place some Wild Locations – a place with Orbs in the middle and Wild Creatures patrolling them. When the Player enters the Wilds, the Wild Creature Spawner checks for the closest Wild Location in relation to the player and spawns Wild Creatures there. The spawning must happen off camera. But if the Player enters the Wilds and moves between different Wild Locations, the Wild Creature Spawner starts working really hard trying to figure out when Wild Creatures should be despawned and when and where they should spawn again.
Obviously I can’t have dozens of AIs roaming around, especially if they’re off camera. That’s super expensive. But although the system I have now works, it has too big a footprint and causes some mild frame spikes.
Another challenge was getting InControl and Playmaker to work together. After some push and pull things are now working. The game detects if the player is using a keyboard or a controller and changes accordingly.
Shaders are Cool
This week also marks my first foray messing with shaders, something I always just assumed to be too complicated to bother. As it turns out, if you’re only doing super basic stuff, it’s not that bad and can even produce some interesting results:
This was part of a push to try and come up with something a bit more interesting to look at for an upcoming event where I’ll be showing a prototype of the game.
Some experiments worked well:
Some not so much:
And I don’t even know what happened with this one:
Also, last Friday I downloaded the Android SDK and got the game to work on my mobile phone. Still haven’t been able to get InControl’s virtual joystick to work but the game now supports another control method – click/touch anywhere and the player’s character will move there.
I’ve been thinking of adapting the basic capture-the-orb gameplay to a simple standalone mobile game. Quite a few people have told me this is something I should do and after playing with these shaders and watching people have fun playing the super rough version on my phone (including getting some laughs and excitement from people who usually don’t play games, which is like, the best feeling ever), it’s something I’m giving serious consideration and probably going to pursue.
Not next week, though. Next week is all about getting a better PC prototype working in time for Friday’s event. I’ll try to address the technical issues with the Wild Creature Spawner, but I’ll mostly be focusing on Bud AI interactions and Home gameplay.
Original Publication: 2016/05/22/project-buds-devlog-2-shaders