Powargrid
  • Home
  • Blog
  • Buy
  • Demo
  • Media
  • Press
  • The Daily Blobbie
  • Blobbie Meme Maker
  • Forums

Now Where Did We Hide That Script?

12/2/2016

0 Comments

 
We're in the process of cleaning up the dialogues for the second to last campaign mission. Part of that is making sure that the dialogues trigger at the appropriate moments, so this involves playing the mission a couple of times (ok, we could call it testing, but we enjoy our own game so much we don't actually call it that). We then noticed a small thing: the AI overcharged a specific power plant in this mission, which it shouldn't do. The mission's AI script needed a tweak to prevent this overcharge. Only one problem: the AI script was nowhere to be found.
Picture
​The first thought was that the script had ended up somewhere else between our assets, but a search didn't turn it up. It simply wasn't there, which meant the mission was still running only the base version of our AI. It puts up a good fight, as it should, that late in the campaign. It was a pleasant surprise to see our AI holds up that well without mission specific tweaks.
So we added an AI subclass to the mission and disabled overcharge. For that one power plant to be precise, so don't think it won't surprise you with a sudden overcharge :). Of course, this got us thinking about which other mission specific things this AI should do. We gave the AI:
  • Smarter defensive moves. The base AI isn't good at claiming territory and taking advantage of the lay of the land. Instead it 'brute forces' its defences by building power lines on all tiles from where its power plants can be hit. While claiming territory turned out to be difficult to code in a generic sense, it's trivial when you know what the game grid looks like. The AI behaviour hasn't changed much, but since it blocks off territory now, it looks a lot smarter :).
Picture
  • Switching between different AI modes. The AI starts off in kamikaze mode (the AI offensive/defensive scale ranges from there all the way up to turtle), but after a first rush at the player's base, it wizens up and defends if the player becomes too threatening. This creates a nice balance between an aggressive start, really pushing the player in the defensive, and a more balanced mid game, making sure the player can't get to the AI's power plants too easily.
  • Extra aggression when the player does things that 'annoy' the AI. When annoyance conditions are met, usually by placing weapons or destroying certain buildings, the AI switches (back) to a much more aggressive stance. This makes the mission a little easier to finish, but it's a very logical thing for the AI to do story wise and it makes the mission feel a little more interesting.
​As you may have surmised, we find building and testing AI behaviour to be fun. So much fun that we often get caught up playing our game instead of just testing. And even though we should spend our time on coding, building and writing, we think it's a good sign that we can still get so immersed in our game even after years of development :).
PS: For more on how we built our AI, see these articles:
Part 1
Part 2
Part 3
0 Comments



Leave a Reply.

    Author

    We're Michiel and Willem. Hi!
    This blog is about the development of Powargrid and our experiences in doing so.

    Archives

    June 2017
    May 2017
    November 2016
    October 2016
    September 2016
    July 2016
    May 2016
    April 2016
    March 2016
    February 2016
    January 2016
    October 2015
    September 2015
    August 2015
    July 2015
    June 2015
    May 2015
    March 2015
    January 2015
    December 2014
    November 2014
    October 2014
    September 2014
    July 2014
    June 2014
    May 2014
    April 2014
    March 2014
    February 2014
    January 2014
    December 2013
    November 2013
    October 2013
    September 2013
    September 2012
    August 2012

    Categories

    All
    Game Design
    Marketing
    Progress
    Slacking
    Tech

    RSS Feed

© Wee Free Studio | Steam | Twitter | Facebook | RSS feed | Press | Contact