far-cry-6-cover-mob

Far Cry 6 Senior AI Programmer takes us behind the code

8minutes read

11/26/2021

CG Spectrum Mentor, Bryan Griffiths knows games and has worked on everything from AAA to mobile to classic board games. His most recent role was an AI Programmer at Ubisoft Toronto, where he worked on the highly anticipated game Far Cry 6 (released just last month) and we had the privilege of chatting with him about it!

Tell us about working on Far Cry 6. In your role as Senior AI Programmer what was your main concern/goal for the project?

Getting a chance to work on the Far Cry series at Ubisoft Toronto was very exciting for me personally and it was doubled by the fact that after many years I was returning to work with old friends and co-workers whom I had worked with over a decade earlier at a different studio. That’s one thing that I think many people don’t understand about this industry, it is still young, close-knit, and often times very fluid. You will often meet people you have worked with multiple times over the course of your career at different studios and under different company cultures.

It's important to build good working relationships with people at every point in your career and to constantly develop your personal networking skills, not just your technical skills.

My main concern for the project was the massive size and scope that comes with a sequel in a well-established series. There is a constant push to go bigger, but that isn’t always best for the game. In this case, going bigger (Yara is the biggest FC landmass to date) was actually helpful in nailing the guerilla warfare feeling and theme.

Ubisoft's official story trailer for Far Cry 6

You are able to wander the island and get lost on hidden paths, find beautiful untouched vistas, quiet fishing spots, hidden camps, towns, and even a city. But the content teams had to really grind to get it all in and looking amazing.

The test teams had to wander every square foot searching and recording issues each week. I kid you not, even entire mountains had to be rebuilt from the ground up to change sightlines, key paths, or camp locations for certain events and key moments. And through all of that the AI needed to continue wandering, hunting, and fighting amongst the ever-shifting environment, vegetation, and cover, without breaking the gameplay or feel of the series.

Far Cry 6 Environment Mountains

An example of the amazing environments in Far Cry 6. (Image: Ubisoft)

What were some of the main challenges the programming team faced in the production process?

Like every project at some point you run into budget issues, scheduling issues, or tech debt. In this case, our budget and schedule took a hit during the COVID-19 outbreak and the shifting of the workforce from in-office to remote. However, due to some foresight on my part and building the ability for our engine to use controllers over VPN a few months before our Shanghai studio was forced to close and go remote, Ubisoft was able to use my How-To as a quick fix to get employees up and running from home immediately while they worked on a long term solution to roll out. By the time our North American studios had to go remote, we were able to transition to a solid solution that had the groundwork already laid to support us remotely from home, lessening the impact and opening a whole new era of game development with larger and wider spread global and local teams.

[featured]

Also being a series with nine titles under its belt, all using the same engine, tech-debt was often our main challenge. Tech-debt is a concept in the software industry that expresses the implied cost of future rework caused by choosing a quick fix now instead of using a better approach that would take longer to implement and test. This occurs a lot in game development with its often knee-jerk reaction to trends, user-testing, competitive releases, publisher deadlines, showcase demos, lack of software design experience, etc. You can’t plan for and react to everything with a perfect solution and oftentimes you are aiming at moving goalposts that just make it pointless to spend too much time worrying about the future. As a result, in any series, there will be rework and iteration required in this fast-paced industry that will slow down the number of new features going in.

Give us some insight into the daily routine of your team? How did you work together?

The Far Cry 6 AI team at Ubisoft Toronto was great, I made some great friends there who I can’t wait to run into again on future projects! We averaged around eight software devs, three testers, and two designers over the course of the time I was on the project. We would start each day off with a quick 10-15 minute scrum to go over any issues that cropped up the day before and talk about any issues with our individually assigned tasks that we were worried about, or blocked by. Then we would break off to other meetings or jump right onto our current priority task/feature.

Throughout the day, senior developers on the team would do code reviews for each other and the junior staff, as tasks were completed and tested, before submitting. Occasionally for more difficult systems, critical bugs, or time-sensitive tasks, a peer programming approach, where two developers work at a single computer, would be employed to help make sure the task was designed, assessed, and completed with as few side effects as possible in the first attempt.

Far Cry 6 Weapons

Weapons in Far Cry 6. (Image: Ubisoft)

Earlier in the project, new features would be designed and pitched to the team, plus other relevant stakeholders, then refined by any feedback given in that feature presentation. After feature approval, it was broken down into workable tasks and approved again for production. Those tasks were then created and distributed to relevant personal and worked on in a series of tiers for easier iteration, feedback, and approval processes until the feature made it to a shippable state.

Far Cry 6 is a major title. What are some of the benefits of working on such a big production? And what are some of the negatives of creating a blockbuster game?

On a big project, you often get to work with a larger pool of specialists who know a lot more about their role and have a wealth of individual experiences to draw from and share. So you can learn a lot from just being immersed in that kind of community. However, sometimes you can feel that your individual impact on the project is lessened when compared to a smaller title. But that isn’t to say that your work is any less important. The AAA games need all of the vast numbers of minor pieces to come together and make it a masterpiece.

Far Cry 6 billboards in Toronto (from Reddit)

Far Cry 6 billboards in Toronto (Image: Ubisoft via Reddit)

Another positive to working on a bigger production is getting to see your game splashed around the media circuit, on tv, billboards, etc. It's something special to experience, but can also be a negative if you let it.

Enjoy the ride, but make sure you get off at the end and let the players do with it as they will.

Try not to obsess about how well its Metacritic score is, don’t engage in debates about it versus other games, etc. Take time off from that project, before you come back to look at how well it was actually received, do a critical post-mortem on how it did, what problems you created/faced during production and how you could solve them better next time, etc.

Each game is a learning process (big or small, success or failure) and you need time to assess it without the circumstance of a release, or critical reception, whirling about you and distracting you from the facts. All of these issues can be magnified on a larger project and help to magnify your mood if you get swept up in the game’s reception worldwide. So just be mindful of it.

How did you come to specialize in AI? Is this the area you want to continue to work in?

My father is an aquatic biologist and, from an early age, I have been traveling the world, seeing insects and animals of all sorts interacting with each other. Combine that with a love of gaming, running endless sessions of Dungeons and Dragons and all manner of tabletop games and I quickly found myself working on ways to replicate simple behaviors in video games and in simple programs of my own.

By the time I hit university I was already writing simple AI and decided to make it a specialization of mine as part of my computer science degree.

I will always be working or playing with AI and only see it becoming more and more important in our lives and therefore my career path.

Post on Reddit by a Far Cry 6 player

AI is a fascinating element of game implementation. What real-world phenomena do you consider when programming for AI? How do you brainstorm ideas with your team?

Often AI for games isn’t like that of academic AI or what we see in movies. It's more akin to what I call II or the Illusion of Intelligence. We don’t want to actually make artificial intelligence within games, because the point of a game is to provide entertainment for the user.

If the AI learned to play better against you, then you would become bored of always losing. It would often use exploits and bugs to give itself an edge against players, as well as making game designers' jobs even harder to balance the game. The list of issues goes on and on. However, this kind of AI can be extremely useful when we are testing the game, building content for the game, and many other tool applications which allow us to automate the development process in AAA game development.

AI in our game is used to create the illusion of intelligence, one that entertains and delights the players. One that works within the context of the game, its difficulty, and supports the main gameplay loop.

We want it to be fallible, but not exploitable. Often times we want it to be predictable allowing it to become a tool the player can use to further their plans, but without making it look “dumb”. Designers often want to be able to control its actions to fit their needs, but we don’t want it to feel heavily scripted or tied to every setup. Because of this giant balancing act, I often think of the AI as a sports player. One that has an average skill, or competency, at everything I need it to do. From there, I expose settings and extra skills that designers can modify, or grant to the AI, to shift it towards their vision for the setup and a way for them to influence it, or provide a high-level goal. Then the AI gets all the rest of its information from the player’s actions, other AI, and the world, and the behaviors work out what to do from there.

As for brainstorming ideas... There is never a short supply of ideas from yourself, your peers, and your co-workers at a AAA company with thousands of employees around the world. I prefer to start with the goals of a particular entity, the area it will be first featured in, and from there, work towards the fun. Iterating and refining the entity as you get a feel for playing it in its “natural” environment. As with all things in game development the real greatness and polish will come from that iteration upon an original idea.

In what ways, if any, has Far Cry 6 expanded the use of AI in gaming?

That was never a focus of Far Cry 6 or our AI team specifically. What we did do is add an additional layer to how Far Cry’s AI traditionally viewed the player. Previously the AI enemies always viewed the player as a constant threat whenever they detected them in the world. In FC6, this was evolved and expanded to allow the player to exist as a non-combatant when obeying the laws enforced by Anton’s military state.

Gone are the days where you find a great fishing spot to relax at and then have an enemy wander within a hundred meters of you and immediately get shot for holding a fishing rod. In FC6 players will witness the action between the rebels and Anton’s forces fighting around the world, but not directly, or immediately, singling them out or drawing them in.

Far Cry 6 Player Fishing

A player relaxing and fishing. (Image: Ubisoft)

The player is free to navigate around or through the chaos, just like all the other civilians in the game. However, the play also has the ability to set up booby-traps, gain the higher ground, or slip in behind the enemy before engaging. Just don’t break any laws while you're at it and your master plan can be set up and then executed.

What have you been looking forward to most with the release of the game? Without giving away spoilers, what can audiences look forward to in terms of gameplay?

For me, in the main game, I can’t wait to discover all the secrets, treasure hunts, and easter eggs. I always enjoy finding new things and hidden encounters. But what I am most excited about is the post-launch lineup. Entering the minds of the FC 3, 4, and 5’s main villains and exploring that side of the franchise will be a real treat! On top of that, all three crossover events are from other franchises that I love watching, and hitting them with a dose of Far Cry humor and over-the-top spectacle should make for an interesting ride.


Interested in a game programming career?

Want to work on amazing games like Far Cry 6? Then consider taking CG Spectrum's Game Programming Course taught by industry professionals, like Bryan. You'll also have the benefit of small-scale classes conducted entirely online, ensuring specialized training and tailored career development assistance. Start, or expand upon, your career as a game programmer and explore all the places it will take you!

LEARN GAME PROGRAMMING

Tags:   Game Programming