This week I made a flying drone enemy type.
They track you, zip around the place, and are fun to shoot.
Initial tests were interesting, almost boids-like:
I found that for the drones I could use a surprising amount of the same code I used for the turrets which was nice. Apart from the actual flying code, a drone is pretty much a turret that moves. And similarly to the turrets I showed last week, they're made of functional parts just like vehicles. Here's a group of them where the one on the right has lost its heat sink and is starting to overheat, and another gets it heat sink shot off:
(sorry for the huge gif! Webm support will get better one day...)
I gave the drones some basic AI. I won't claim it's anywhere near as interesting as Dave's vehicle AI but it doesn't need to be in this case. They don't "fake" their flying though, they thrust around with real physics, so of course you can shoot or crash into them to throw them off. Hitting stuff way up in the air is tricky and not really good fun, so I've designed them to hover along close to the ground.
You can see the physics at work in this scenario when I first gave them weapons...
Yeah so, standard recoil is a bit much for them. Hence I must confess they are cheating a little now: It was either spend ages writing some smart AI that'd attempt to counter weapon recoil while flying somehow, or just let them have less recoil on their guns. I hate it when AI gets to cheat (vehicle AI never cheats by the way, it only sees what it can actually see and collects only scrap that it really collects) but the pragmatic choice here was obvious. So the drones you see elsewhere in this post are using specially engineered reduced-recoil MMGs.
See you next week.
Edit: I just decided to see if I could
Scraps: Modular Vehicle Combat
Moment Studio
Moment Studio
2020-12-18
Action Indie Singleplayer Multiplayer
Game News Posts 61
🎹🖱️Keyboard + Mouse
🕹️ Partial Controller Support
Mostly Positive
(156 reviews)
http://www.scrapsgame.com
https://store.steampowered.com/app/350150 
The Game includes VR Support
Scraps Linux [960.68 M]
Scraps lets you create a vehicle that’s great or a vehicle that sucks. Maybe your vehicle falls over when it corners or doesn't have enough power to fire its weapons – that’s okay. Maybe it doesn't need an engine because it moves by firing its cannons backwards. You decide what you drive.
Your design choices aren't just cosmetic - they're truly functional and at the very least affect the weight and balance of your vehicle. Battle in single-player against the AI, on LAN, or over the Internet. Easily host your own LAN or Internet games. Using the Scraps demo version, your friends can join a LAN game even if they don't own the full game.
language Note:
The only complete language at this time is English, but partial in-game translations are selectable for Russian, Danish, Dutch, Norwegian, Romanian, French, and Swedish.- OS: Tested on UbuntuGraphics: Radeon HD 6570 / Mobility Radeon HD 5850. Shader model 3.0.Network: Broadband Internet connectionStorage: 1 GB available spaceAdditional Notes: Broadband is only required for Internet play.
- Graphics: Radeon HD 6570 / Mobility Radeon HD 5850. Shader model 3.0.Network: Broadband Internet connection
- Storage: 1 GB available spaceAdditional Notes: Broadband is only required for Internet play.
- OS: Tested on UbuntuGraphics: Radeon HD 5750 / Radeon HD 6750MNetwork: Broadband Internet connectionStorage: 1 GB available spaceAdditional Notes: Broadband is only required for Internet play.
- Graphics: Radeon HD 5750 / Radeon HD 6750MNetwork: Broadband Internet connection
- Storage: 1 GB available spaceAdditional Notes: Broadband is only required for Internet play.
[ 5951 ]
[ 1903 ]