-
Notifications
You must be signed in to change notification settings - Fork 0
Mon, Oct 8, 2018
Mission Bit classes have started a while ago, and I spent most of my time working on that, which means less time for Juicy Shmup. But I've found some time last weekend to work on it, and I'm happy that I got a decent amount of work done! :D
The poor excuse of the Dogfighter AI has been implemented. I think it's been there for a while now but I've never actually decided to push that commit. Dogfighters track the player, shoot a burst of ten rounds when it's in range, and back away when the player gets too close, like it's trying to evade ramming. That last point is super exciting to me and makes it look like the AI actually has a brain. Insert gif here
Due to what I assume is floating point calculations, all enemies would shake left and right once they're directly in front of the player. It basically never landed on the exact x position as the player, so I fixed it with
if (Math.abs(body.getPosition().x - playerPos.x) < 0.25f)
body.setLinearVelocity(0, body.getLinearVelocity().y);
In the pursuit of providing flow to the player, I've written a rudimentary enemy director. Here's its breakdown:
-
Player is doing well > Game isn't challenging enough > Throw more enemies
-
Player isn't doing well > Game is too challenging > Throw less enemies
Right now, it's checking the score delta every five seconds. If the score delta passes a certain threshold, the director will decrease the time between enemy spawns. If the delta remains stagnant, it'll ramp up the enemy spawns less, and after 15 seconds (three checks) of failure, the director will decrease the rate of enemy spawns.
I want to switch to checking time since last enemy was killed, that way I don't have to check score delta every five seconds. Then enemy spawn rates are more responsive instead of timed check.
The game will throw more advanced enemy types after passing raw score thresholds. If the player has been playing for a certain amount of time, they should be expected to defeat lower level enemies without even thinking about it. Better score delta should therefore increase the potential raw score of the player, quickly allowing them to pass the threshold of advanced enemy spawn.
If the player begins to struggle with the advanced enemy types, the game will dial back on their spawn rate, but by being at that particular raw score, they should be able to fend off those enemy types.
Like the enemy director, I've created a manager for all the effects in the game. That effects manager processes all the particle and light effects in the game. It works, but it's not as flexible as I'd like it to be.
On that note, there's a bunch of other effects that I need to edit, like how the game normalizes the game speed every frame. I want to have the ability to toggle that normalization.
Illegal songs have been added, and some cool sound effects from OpenGameArt have been added too. I say some because there are a few sounds that aren't legal to use, but I want something that feels as right as they do. On desktop, all sound files play correctly and when they're supposed to, but on Android, I think there's something limiting sounds. The game plays a ton of sound effects at once, two when an enemy explodes, and a bunch of shooting sounds due to the rapid-fire nature of the player's weapon. I think I'm getting limited by the sound channels or something because most, but not all, of the shooting sounds play, and none of the enemy kill sounds play while I'm shooting. I've seen threads where changing Sound classes to Music classes work, but I haven't gotten around to that yet and I'm hesitant about the potential performance impacts.