Jump to content
  • Advertisement
Sign in to follow this  
kilo_4que

Developing a simple soccer game, need help

This topic is 4819 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

Hi guys, as you can see i am new to this forum and am rather happy to see so many people with a similar interest in game programming as i I am currently working on a soccer game of which I have started the utmost basics such as the soccer pitch designed in photoshop and set as a background on a form designed in C# I am pretty new to game programming and programming c# in particular, but really want to test myself in seeing if i could complete this game all bymyself my initial aim is now that I have the canvas ready is that I have two characters on the pitch. These characters or more appropriately players would be represented by round coins which i have also designed. Rather than jumping the gun, i want to first play with behaviours of agents, consequently I want to have one player which is a human player on one team and and an AI agent on the other team i.e. only two players on the pitch with no ball involved. I want to programm it such that when i move the human player anywhere on the pitch, the AI player manipulates the human player movement and moves accordingly. Likewise Artificial Intelligence integrated. I want to build this game in a similar way to how a person builds a car where he carries out a few mods. Tests analyses and then moves onto the next few mods. Likewise i want to get two players running on a pitch, then maybe introduce a ball and finish with say a game of 5 a side soccer Hence if someone could lend a hand in designing a game which to be honest is very exciting for me though programming is not my strongest of qualities lol help on the forum would be great as well as my msn contact which is kilo_4que@hotmail.com Regards

Share this post


Link to post
Share on other sites
Advertisement
the rendering/animation is one part of the problem. A.I. is far more difficult. I've been toying with the ideal of a Sensible Soccer remake (since SWOS and Kick Off 3 are my all time favorite footie game).

Collision detection can be kept to a minimum of work. Simple sphere collision tests should be more than adequate.

as far as A.I. is concerned, that's another story. You can always start off with no A.I. or very very little. To get the controls, game flow, animation working together. Rip graphics from other footie games using emulators, or design you own simple graphics. Sensible Soccer had shokingly low-res graphics, but it worked. So that's not the end of the world.

Share this post


Link to post
Share on other sites
Hi oliii, thanks for ure reply matey. Theres some very good positives i have taken from ure post ;)

Regarding graphics, I have designed my very own simple ones such as circular coins to represent players and a similar coin with a pic of a football in the centre to signify player occupying the ball.

On the subject of AI you have got it 100% correct, im also aiming to get one player to run around on the pitch with good flow and am then gona plan on some AI for an agent opposition just to manipulate movement and understand behaviours.

Consequently, I have two ideas of how to design the game but dont know weather one of the recommendations has potential of good AI. I mean i can design the game similar to the old Sega Mega Drive classic, "Italia 90" where players pass a ball around etc or I can have a new much simpler concept where the ball doesnt travel, but if a pass is possible then the player u are passing to highlights as the player in possesion i.e. u have a imaginary straight path between u and ure player. If that path is being blocked by opposition and an attempted pass is made then the opposition cause an interception.

I think to some extent the latter is easier to program that no ball object is needed but then gets difficult in algorithms and would be much of a pleasure to play lol. Plus AI wouldnt seem to be as evident which I want to introduce later due to AI being a subject of interest which got me interested in gaming and robotics such as RoboCup.

Share this post


Link to post
Share on other sites
as far as AI goes, I'm really intrigued by the boids and the emergent behaviours that comes out of the hat. Although I don't think you can do a soccer game without higher level of intelligence, like decision making (state machine most problably, to keep it simple), a simple boid interraction could be worth a try, at least for navigation.

I don't believe Sensible Soccer and other of those great 8-bit games went further than the basic concepts of football strategies. Zone defense, man marking, intercepting, one-twoes, long passes, through balls, preset attacking patterns and default defensive positions, and basically going with the flow (you have the ball and inside opponent territory, switch to offensive and push the back line forward, ect...). Maybe not even that. Get to a set position if attacking or defending, go towards the closest opponent, if nobody else challenges, move into space if attacking...

There are also individual skills, like how to beat the defender, or wait for the defender to make the tackle, or make the defender just hold on until the right time to tackle the ball (or brake a leg).

Goal (kick off 3) AI was tricky at times, and at the same time predicatable enough. Sometimes, if the A.I. had the ball and was in the offensive (the game was weird, sometimes, the AI would just 'switch on' and beat the shit out of you), the dude would try to get into the best position to either make the pass he was supposed to or shoot. You could frustrate him by just standing at the right spot and prevent the preset attack to develop. Which is fair enough. They were also very good at protecting the ball and dribling.

Sensible Soccer was a more arcady affair, and would just pass the ball around until in a good position to take a shot. The game controls were dead simple. One button, and short press for short pass, long press for a through ball or strong pass, pull the stick back at the right moment, and the ball would take off for a shot, add some swerve to aim for the spot. Very intuitive, very simple. One thing I always hated though, is to never be in control of the keeper. That's actually something hard to do.

There are lots of thing to consider to make the computer play football with more skill than kids in a schoolyard (however fun it used to be). That's just my thinking. I haven't really though on how to do a team AI for a sports game, but it's an interesting problem, and not easy to formalise.

my 2 cents.

Share this post


Link to post
Share on other sites
also, having an artificial type of physics would be weird to me. I'd personnaly prefer a normal physics, where the ball just reacts naturally, and have zone of influences of the players that attract the ball to them if close enough (depend on the skill level maybe), and if the ball goes astray (poor passing skills and under pressure), make the player who is supposed to get to the ball turn towards the loose ball (change in balance also dependent of skill level). if an opponent is in the way, then collision and he gets the ball or is deflected (if it's a shot, or strong pass, of defender interception skills poor). through balls could be a problem, since you have to target in front of the intended target. Same for long passes. That can be fixed by calculating where the ball would land, and make the closest player converge towards that spot.

Share this post


Link to post
Share on other sites
the thing ive found about developing ai in the past is to develop it incrementally, tweaking it here and there, slowly perfecting it and adding parts.

Share this post


Link to post
Share on other sites
Give me your thoughts on this:
Keep in mind that I have never done a soccer type game of this sorts and that this is just an idea.

For the ai, couldn't you just have each player have a radius of action around them. What I mean is that they follow maybe a simple "run-in-place-randomly" ai pattern while the ball is not in their "radius of action" and when it is they follow the ball until they are "connected to it" then they could make decisions based on teammate position on the field as well as the general location of the opposing goal. Given distances from the goal they can either shoot if they are within a certain area or pass to a player that is in that area. This seems like logical way to do it but tell me any faults in it... as I know there are some :)

toXic1337

[EDIT]
This is what oliii is saying... (srry didn't read all of your posts oliii)

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!