• Announcements

    • khawk

      Download the Game Design and Indie Game Marketing Freebook   07/19/17

      GameDev.net and CRC Press have teamed up to bring a free ebook of content curated from top titles published by CRC Press. The freebook, Practices of Game Design & Indie Game Marketing, includes chapters from The Art of Game Design: A Book of Lenses, A Practical Guide to Indie Game Marketing, and An Architectural Approach to Level Design. The GameDev.net FreeBook is relevant to game designers, developers, and those interested in learning more about the challenges in game development. We know game development can be a tough discipline and business, so we picked several chapters from CRC Press titles that we thought would be of interest to you, the GameDev.net audience, in your journey to design, develop, and market your next game. The free ebook is available through CRC Press by clicking here. The Curated Books The Art of Game Design: A Book of Lenses, Second Edition, by Jesse Schell Presents 100+ sets of questions, or different lenses, for viewing a game’s design, encompassing diverse fields such as psychology, architecture, music, film, software engineering, theme park design, mathematics, anthropology, and more. Written by one of the world's top game designers, this book describes the deepest and most fundamental principles of game design, demonstrating how tactics used in board, card, and athletic games also work in video games. It provides practical instruction on creating world-class games that will be played again and again. View it here. A Practical Guide to Indie Game Marketing, by Joel Dreskin Marketing is an essential but too frequently overlooked or minimized component of the release plan for indie games. A Practical Guide to Indie Game Marketing provides you with the tools needed to build visibility and sell your indie games. With special focus on those developers with small budgets and limited staff and resources, this book is packed with tangible recommendations and techniques that you can put to use immediately. As a seasoned professional of the indie game arena, author Joel Dreskin gives you insight into practical, real-world experiences of marketing numerous successful games and also provides stories of the failures. View it here. An Architectural Approach to Level Design This is one of the first books to integrate architectural and spatial design theory with the field of level design. The book presents architectural techniques and theories for level designers to use in their own work. It connects architecture and level design in different ways that address the practical elements of how designers construct space and the experiential elements of how and why humans interact with this space. Throughout the text, readers learn skills for spatial layout, evoking emotion through gamespaces, and creating better levels through architectural theory. View it here. Learn more and download the ebook by clicking here. Did you know? GameDev.net and CRC Press also recently teamed up to bring GDNet+ Members up to a 20% discount on all CRC Press books. Learn more about this and other benefits here.
Sign in to follow this  
Followers 0
Freeky

Soccer AI

9 posts in this topic

Hi,
 
I want to make a retro-ish soccer game. I want to keep it as simple as possible. I thought about basing it on 'Exciting Soccer' (video) or 'Nintendo World Cup' (video).
 
The only problem is making the AI. The ideal scenerio would be that I can first make the game AI only (so it basically plays itself) and later add an option for the user to take control of one player.
 
I'm not aiming for a super intelligent AI, but rather for a 'kind of interesting to watch' AI. 
 
I am aware of the book 'Programming AI by Example' wich has a whole chapter on this topic. And I don't own the book, but I have seen videos of the result and I'm not really impressed. If you look at this video you might understand what I mean. It seems like only the players closest to the ball are doing anything. Also note what players 4 and 7 are doing at 0:14. 

 

I find the AI of Exciting Soccer way more interesting, although it's actually very stupid. I just like how all the players are moving along with the ball and the game.

 

So my question is: Does anybody have any advice on how to make this? How do I make a fun-to-watch game of (seven a side) soccer where all players in the team seem to be playing together?

 

Many thanks!

 

Freek

0

Share this post


Link to post
Share on other sites

I like Hodgman's answer, but I also feel like there should be a level somewhere in the middle regarding clear paths. If a player doesn't have a good shot at goal, I would suggest keeping an eye on how many team members they could kick it to, and how many opposition members are nearby. That way they can make a decent judgement of when to pass the ball.

 

At the higher end I would suggest individual team member preferences and abilities, so they have some flavour. So some of them are offense/defense oriented, some focus on assists, some do long kicks, etc.

2

Share this post


Link to post
Share on other sites

Thanks for your reply!

 

I have heard about flocking before, but never thought that it could be usefull for something like this. I will definately have a look at it.

 

The formation database system would be the most complicated part by far, since the players should find a balance between keeping to their formation, and wandering off to mark an opponent, or to get to the ball or wathever. (And of course to keep in more interesting)

 

Passing is indeed also a problem. I think I'm going to do that by looping through all teammates and giving each of them a 'score' for how good it is to pass the ball to them. Then pass to the one with the highest score. I was also thinking about using this system for positioning the players in some ocasions.

 

Player spesific skills and characteristics is something for later. I first want to focus on making some identical players play a game of soccer, then I'll make different players/teams.

0

Share this post


Link to post
Share on other sites

I think that optimal play (for some metric of optimal) is a good start. But later down the track remember to allow sub-optimal choices, e.g. pass to the second best option, because optimal play is predictable play.

0

Share this post


Link to post
Share on other sites

You may want to search for the term robocup, it's a tournament that's held, i think every year, that pits different AI soccer teams against each other.  Mostly done by universities.  You might look at some example AIs that you like and use similar strategies.

2

Share this post


Link to post
Share on other sites

Thank you.

 

I have been observing many different soccer AI's, including RoboCup. Although I've noticed that RoboCup AI's are way more complex than most (retro) game AI's. For what I'm planning to do, I'd like to keep it as simple as possible.

 

The system I've used in my first prototype is the one I told about earlier. Only a few players on the field are 'active': The ones from each team that are closest to the ball, and a player that is about to receive a pass. For the rest I loop through many positions on the field placed in a grid, and apply points to them based on many different factors.

 

For example some of these factors are:

 - Can I receive a pass from the player with the ball from this position

 - Is this position close to my home position (So that not all players will go to the same position)

 - Can I shoot on goal from here?

 - Are there no opponents to close to this position?

 - Isn't there a teammate already at this position?

 

These are all for the team that has the ball, the defending team of couse has other factors, wich I still need to work on a bit more.

 

A similair strategy is also used to find the best player to pass to.

 

I like how it looks so far, but it still needs a lot of tweaking. I've seen players pass back to the keeper when they could also have shot at goal for example. 

 

The formation database system Hodgman talked about (and wich apparantly is also used in FIFA and PES) would probably be better, but it will be much more complicated and I'd seriously have so study soccer tactics. Also, I like how chaotic my current system is. :)

 

Thanks again, and more tips and suggestions are welcome!

0

Share this post


Link to post
Share on other sites

I'm always impressed with the behaviors I get when implementing any sort of flocking.  While I've never played soccer on a field or on a game, I have created some killer squad-based movement for a combat based game by combining small flocks into a large flock.  I'm sure this idea can be tweaked for the various duties of footballers (I imagine they are defensive and offensive players and whatnot).

 

I created a "base" flock of five agents -- four grunts and a leader.  The grunts flock (averaged direction and speed, tight cohesion) based on the leader's movement.  There are several of these groups with all of the leaders being a separate "flock" that is moving toward a military objective with different cohesion rules.

 

For the player, this created a really aggressively moving group of soldiers advancing on a position.  How you can make this work to emulate soccer, I'm not sure. 

 

Also (this has nothing to do with the OP), since when did Americans start caring about soccer?  240 years of no interest in the World Cup came to a crashing halt this summer.  Everywhere I went had it on the TV.  What gives? 

0

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
Sign in to follow this  
Followers 0