First up - there's a new Feedback build up on IndieDB:
Back onto a more 'what's going on with the game' perspective after the more personal post the other day. QoS2QQ has progressed at a rapid rate the last few weeks - I've taken some time away from my full time job in order to help work through that (and a public holiday due to the AFL Grand Final also helped. Best thing I've gotten out of a football game yet - and before anyone asks, I have no idea who even played).
The previous update featured more about the UI changes - I know that I was focusing a lot on the score screens, etc. While this work continued, the main focus of this recent update was the addition of computer AI players. This addition was definitely scope creep in a major way - taking a local multiplayer game and attempting to also say 'also Single Player' through the addition of bots isn't the most wonderful thing in the world. However, this is something I feel needed to happen - the game was getting ignored by a lot of potential players simply because 'I don't have anyone to play with'. If the choice is provided between never playing a game, or playing against bots? I'll take the bots. I'm still quite adamant I don't want to go down the networked multiplayer route (to quote myself 'the marketplace is a veritable graveyard of dead network multiplayer games'), and this seems a happy medium.
So, let's talk about the bots for a bit. First off, implementation - it was incredibly easy. A QoS2 bot is essentially:
(Imagined dialogue from the bots there. There becomes a tendency to anthropomorphise AI, which I'm not sure how I feel about. Regardless, the bots were designed around these three principles. Path finding was done via the A* algorithm - I'd read about it prior (about 3 years ago) and determined I'd need to implement it in the future but not actually gotten around to it. Luckily, it turns out Kev Glass has a tutorial on this specific topic... and surprise, it's in Slick2d's library. That became an extremely simple task to implement, which cut down on hours significantly. I suppose after struggling with a lot of stuff for Slick2d, this is finally a win. (for the record, a vast amount of Slick2d implementation is difficult due to the fact the library's passed through various hands and various resources have ceased to exist on active internet and have to be fetched using Archive.org. Ugh).
Once we had pathfinding in place, targeting seemed like a relatively easy thing - remember, the principle here is not to build a perfect bot, but rather something the player can compete with. If it were unable to make mistakes it would be miserable to play against. With this in mind, the Bot currently finds a 'place to go to' by compiling a list of all gems on the map and picking one. In the future, I'd like to change this to account for light radii (ie: it can only pick something it can see), though this will obviously take more time. The bots will also target lootboxes - mostly to act as resource denial against a player (though more will come from this later).
At present, the bots don't move boulders, though I have some suspicions on how we can go about making this work.
After this, there were a few thoughts on weapons. The bots aren't too interested (yet) in pushing rocks onto players, though I think this will come into play eventually. I did manage to get them to implement two different weapons, however - the laser and the Grav Bomb. The laser was relatively easy - every few updates, the bot will check to see if there are any players within horizontal range (as well as checking if they are in the same location on the Y-Axis). If they are, it then checks to see if they are friendly (same team). If they are from an opposing team (or the game mode does not require teams), the bot will shoot.
After a little bit of playing around which this structure, I then added the option that if a bot is one square higher (and a player is in horizontal range), the bot will actually shot from where it is - this is in the hope it will rain down death upon the enemy below. Grav Bombs work much the same - though they can destroy players with explosions, they mostly aim to hit them dead-on.
As for bot-aggression, one of the things I've noted they do well, is triggering the gravity inverter (there's one at the top of all maps, and sometimes one at the bottom as well). It is designed into the bots that they can adapt to gravity being inverted - so maybe purposefully triggering them needs to be part of their 'screw you meatbag' algorithms they'll be given later to take out human players specifically.
Well, that was quite a lot about that. I've been working on a few other nice things, but I'll talk about those next time. Hope you're all doing well!