Showing posts with label game characters. Show all posts
Showing posts with label game characters. Show all posts

Friday, October 5, 2018

The Making of Cosmos Arena



Cosmos Arena is a local multiplayer party game for up to 4 players. Right now it is PC only but we hope to make an XBox port as well.



I'd like to share with you the story of how Cosmos Arena came to be.

Getting Started

My team started working on this project in 2016 when I was still working a full time job in AAA. I launched my studio Astire Games and brought on some contractors, most of whom were also working day jobs, so we were moonlighting to get to the first prototype.

First Prototype

In this prototype we started on the core mechanics - character movement and traps

At some point I realized that AAA work was not satisfying my drive as a developer, and working nights and weekends on Cosmos Arena wasn't enough for me. On top of working AAA and moonlighting, I was also teaching Game Design as an adjunct faculty.

Leaving a comfortable day job for a side project is a risky move, and I don't think I would have done it if not for the teaching gig. I was pretty confident I could live on my teaching income for at least a few months, so I decided to take the leap and I left AAA to go indie.


Funding

Anyone who has tried to get a project up off the ground knows that it takes money. Even if you are the only one working on the project, you at least need enough for yourself to live on, but if you plan on having other people work on the project then you need a starting fund.

I was teaching 8 hours a week, and I figured if I really stretched I could live on that income. But I also wanted to have other people working on this project...There wasn't a particular skillset I was looking for since it was all prototyping at that point, but working alone can be lonely and it can be hard to stay motivated. So I found some friends who were looking for a side project who were willing to work on the cheap, and I dug into my savings from my time working in AAA.

In a lot of ways I got really lucky - I have some very talented and supportive friends with a wide range of skills, and it wasn't long at all before we had a second prototype with character animations, obstacles, sound effects, and a start screen.

Second Prototype


Contract Work

Self-funding Cosmos Arena had a limited lifespan, which I knew going in. I had hoped to get the prototype to a point where I could start soliciting outside funding.

This is where my luck started to run out...I had basically no idea how to get funding for a project. I tried looking for potential publishers, but the prototype was just not ready to meet those expectations. On top of that, I hadn't been able to find an environment artist, and the character artist and one of the programmers were leaving for new full time jobs.

I managed to rough out the scene with some placeholder art from the Unity Asset Store, but it still needed a lot of work and I was running out of money and people.

First Art Style


Around this time I decided I either needed to get a job, or find some contract work for my team. As it happened, a contract project kind of fell into my lap. I had a programmer and a sound designer still on my team, and I was contacted by a couple who had a vision for a children's app and a budget for development. They already had some art made for it, so I jumped at the opportunity.

Contract work was great, it allowed me to keep my team together and add some new folks, and it added to the company bank account. But it was time-consuming, and it pretty much put Cosmos Arena on the back burner for several months.

Showcasing

At a couple of different times, we had an opportunity to showcase Cosmos Arena at local events. These opportunities were fantastic for getting me motivated to dive back into the project - usually there would be about 2 weeks to a month where I knew the game would be showcased and I wanted it to have something new to show, so there would be a hard push to get in new content and new features.

Showcase Build


Our showcase opportunities included the Intel Buzz Workshop at the Austin Games Conference, the Intel Indie Lounge at the Game Developers Conference, the Austin Game Dev booth at SXSW, and the IGDA booth at Dreamhack.

Second Showcase Build


Interns

Due to the sporadic nature of development on this project, all of the original team moved on to other things at various points during this timeline. Still on a tight budget, I decided to leverage my position teaching to find rising new talent looking for opportunities.

Initially I started taking interns at my company and letting them work on their own projects, which I then helped them publish. Finally I decided I had found the right interns for Cosmos Arena, so I offered them paid contract internships to spend the summer building levels.

Bringing on interns also coincided with finally having an artist to set the art direction of the project.

New Art Style and Levels


Art Direction and Iteration

There has been a lot of iteration and changes to the art style over the past two years, but honestly most of that iteration happened in the last 3 months. Here is a glimpse of some of that iteration...

















Game Mechanics and Iteration

Not only did the art style change dramatically over time, also our core mechanics and design have changed. We've added new win conditions for different levels, replaced a health/damage system with a shield and one-hit-kill, we added a ghost mode when a player dies so they can take revenge on their killer, and we've incorporated building and planting to offset the killing and destroying.

Development


Alpha Release

We just hit our Alpha milestone and decided to make the game available for free for a limited time while we work through some bugs and collect feedback. If you've enjoyed learning about our development process, we would love for you to try the game and give us your feedback :)


Thanks for reading and thanks for playing!

Sunday, August 27, 2017

Game AI: Non-Human Behavior Part 5

This is part 5 of a series on Game AI for Non-Human Behavior. Here's what you might have missed!
Part 5 will be a deep dive into sensory input, and resulting behaviors.

Source: Atari
In 2015 there was an article published in nature that used Atari 2600 games to explore Reinforcement Learning in AI. Reinforcement Learning is the process of allowing AI to explore different options and learn behavior through a reward system, as opposed to Supervised Learning where AI performing sub-optimal behavior is explicitly corrected. The article, "Human-level control through deep reinforcement learning," examines sensory input used to understand the surrounding environment. In their research, the sensory input used correlates to visual input (or sight), allowing the AI to look at the pixels that make up the current game state.

Source: The Hunt, Netflix
In contrast, these blind catfish living in underwater caves have adapted to survive completely without sight. When one sense fails, we rely on honing our other senses to adapt to a world without the missing sense.

Source: https://askabiologist.asu.edu/echolocation
As children, we learn the five senses as sight, sound, smell, taste, and touch. These are the senses we as humans understand, because these are the senses we experience. However, there are other senses present in nature that are outside our area of experience. Bats, for example, use sonar in place of sight to determine the positions of things around them.


A "sense" is defined as a system of a group of cell types that responds to specific physical phenomena, which correspond to a particular region of the brain that interpret those signals. Some plants have specialized cells which detect gravity, allowing the plants to grow upright with their roots growing down into the earth.

Source: http://www.defenders.org/sharks/basic-facts
Even with senses we understand, such as smell, non-human creatures have far superior uses of them in many cases. Sharks can determine the direction a smell is coming from based on which nostril received the scent first.

Source: nature.com/scientificamericanmind/journal/v19/n4/images/
scientificamericanmind0808-22-I1.jpg
Though the focus of reinforcement learning is on changing behavior based on rewards, it relies on information about the environment being interpreted through senses. We can see something similar happen in the classic rat maze example - the hungry rat is placed in a maze that has a piece of cheese at the end and allowed to explore the maze until it finds the cheese. The rat is then placed back at the start of the maze, and this continues until the rat manages to navigate the maze perfectly. The cheese in this example is obviously the reward, but the rat needs a way to understand its environment in order to get the reward.

Source: http://www.smithsonianmag.com/smart-news/
were-terrible-distinguishing-real-and-fake-schools-fish-180953162/
Beyond just understanding the environment, the senses also allow organism to understand the creatures around them, resulting in group-based behavior like flocking. To put flocking in simple terms, we can use an algorithm that uses cohesion, alignment, and separation to simulate behavior well enough for gameplay purposes.

Source: http://harry.me/blog/2011/02/17/neat-algorithms-flocking/
Each agent in the AI flock will calculate it's desired vector of movement based on cohesion (the need to stay within in the group), alignment (the need to face the same direction as the group), and separation (the need to avoid hitting other members of the group). The calculation for cohesion is to look at the position of your neighbors within a specific range, find the center of mass, and move towards that center of mass. For alignment, the agent looks at the direction each of its neighbors is facing and aligns itself to the average. For separation, the agent will check to see if it is too close to any of its neighbors, and adjust accordingly. The three of these combined into the agent's velocity vector will result in a simple flocking behavior.

Source: https://www.gizmodo.com.au/2014/03/
what-happens-when-you-throw-four-sharks-into-a-giant-school-of-fish/
However, the flock's simple behavior may be disrupted by the presence of predators, causing the agents to need to assess their environment beyond just the position and orientation of their neighbors.

Source: https://www.wired.com/2011/12/
the-true-hive-mind-how-honeybee-colonies-think/
Bees are another wonderful example of teamwork behavior. Pheromones are special scented chemicals that allow some organisms to communicate information with each other via scent. Bees use pheromones the share information through the hive, resulting in a hive the essentially thinks together as if it were a brain with each bee acting as a neuron. I can imagine a similar system that could be used to have a group of friendly characters so coordinated that they act as a hive of bees with the player as their queen.

If you have enjoyed this series on AI for non-human behavior, please follow and subscribe!

Sunday, August 20, 2017

Game AI: Non-Human Behavior Part 3

This is part 3 of a series, if you are just joining in be sure to start at part 1!

Nature is weird, and full of constant surprises.There are a lot of things in nature that we still don't understand.Take for example these thousands of circles in the Kalahari desert:

Source: Africa, Netflix
We don't know what causes them...Scientists have suggested numerous options - but ruled all of them out - including poisonous plants, insects, and magnetism. There is so much about our planet that is outside of our understanding, and so much to draw inspiration from.

Source: Bill Nye the Science Guy 
People think science is pretty cool, that's why we have a large chunk of the entertainment industry using science to draw in their audience. As game developers, we can use that fascination to our advantage, to get our players excited.

Source: Niche, Game
I've been playing a game recently called Niche where the player controls a herd of animals and tries to help them survive. The game does some really interesting things with reproduction and genetics, allowing the player to alter the chances of certain traits, and choosing which animals will mate with each other. This game does a really great job of taking elements of nature and science that people find fascinating, and then turning those elements into engaging gameplay mechanics.

Source: Factorio, Game
Another game that I think does a great job with this is Factorio. In Factorio, the player plays as a character stranded on an alien planet, and the player needs to collect resources to build a rocket to get off the planet. A lot of the resources can't be used as raw materials, so the player builds a lot of different kinds of processing plants, essentially creating an entire factory from scratch. But the alien species living on the planet does not want to see their beautiful planet destroyed by pollution and over-harvesting. The more the player builds and expands, the more of the natural planet gets destroyed, and the angrier the aliens become. The aliens will attack the player and the base, because they are defending their planet. I really like the way this game makes you think about how your actions are impacting nature, and finding more sustainable and less invasive ways to do things is more challenging but helps keep you at peace with the creatures inhabiting the planet.


I've design characters and AI for a handful of games, and I've learned a few lessons from the process. Instinctively, it might seem that character design, combat, and behavior are all distinct design challenges that can be handled independently, but I've found that when it comes to the player interacting with the characters, these three things are very tightly intertwined, and they deserve to be designed together. There are games that have characters that just make sense because their character design feels perfectly aligned with their AI behavior, and the transition from behavior to combat seems completely natural and expected for how that character is perceived. On the other hand, I'm sure we've all played games where a character feels out of place, their behavior does not make sense for what that creature is, and the transition to combat feels clunky and unexpected.


I personally have fallen into this trap, and I'd like to think that I learned from my mistakes, and hopefully you can too. The very first game I worked on where I designed the AI and combat was a co-op exergame where two players work together to defeat giant robot spiders in an underground subway system.

We spent a lot of time designing and researching the exercise portion, and not a lot of time thinking about our enemies. We knew we needed something that would be immediately recognized as evil, we needed the player to be able to attack from a distance, and we wanted the enemies to swarm the player. A couple of interesting things that came from our design was that the spiders would come out of webs in the corners, so players could predict where they would come from, and some spiders could attack from a distance by spitting sticky webs at the player to temporarily trap them.

This project was over 5 years ago. I was the lead designer on this project so I was responsible for designing engaging enemies, but it was my first time designing anything related to AI, so I treated the character design, AI behavior, and combat completely separately, because I didn't know any better. I took the easy route - enemies were mainly different in their health and how much damage they could do, with the exception of the web-spitting spiders, and the only distinction for the boss was that she was huge and much stronger than the little minions, but no interesting differences and no narrative reason why there was one enormous spider surrounded by a horde tiny spiders.


Why are they robot spiders? What made them? The spiders are pretty scary, but their creator is probably pretty terrifying. Why are they attacking the player? Blood lust? Or are they defending their nest? Perhaps seeing a mother spider with an egg sac could help shed some light on their behavior. If I could go back and do it again, I would begin by considering why are these characters here, and what is their incentive to attack the player. I would also draw inspiration from nature to come up with more interesting behavior instead of run in and attack.

Source: The Hunt, Netflix
Spiders are bizarre but highly specialized hunters, with unique features and behavior adapted to any environment they live in.

Source: The Hunt, Netflix
This is a Portia Spider hunting another spider by dropping down on it from above. The Portia Spider specializes in hunting other spiders, so rather than building her own web she goes out on the hunt.

Source: The Hunt, Netflix
 This is a Spitting Spider that shoots poison out of its mouth at its prey. And this Spitting Spider could end up being a meal for Portia.

Source: Africa, Netflix
And here is a spider that is cartwheeling down a hill to escape a predator. Spiders are an amazing example of how their actual behavior in nature is probably more profound and well-designed than anything we could come up with when brainstorming a spider-based character for a video game. This world has wonders and terrors beyond our wildest imagination.

Source: Image By Jon Richfield
 If you are concerned that spiders are just not large enough in real life to inflict the kind of terror you are looking for, then allow me to present to you the Huntsman spider which can get up to one foot in diameter, and can move nearly a meter per second. That sounds pretty terrifying to me.

In part 4 I'm going to talk about modes of hunting (and avoiding being hunted) that can be found in nature.