Basic Football Manager?

BlitzMax Forums/BlitzMax Beginners Area/Basic Football Manager?

Hotshot2005(Posted 2005) [#1]
hiya all

I know how to do bubble sort with league table but I do have problem making

Tranfer makets database (such as selling and buying new player)
Fixture list.

does anyone have basic small example or tips?

cheers


tonyg(Posted 2005) [#2]
Transfer Markets will depend on how realistic you want it to be. Basically, it's a list of names with attributes calculated to make a suggested price.
Fixture Lists are very hard.
This should help taken from Championship Manager forums..

Assign a number to each team, starting at 1 and incrementing by 1, e.g (1..Arsenal, 2..Aston Villa, 3.. Bolton, 4..Chelsea, 5..Wrexham)

2. If the number of teams is odd, add 1 so that the last number is even. (There is now a team 6 - called a "ghost team")

3. On paper, write out the numbers sequentially. In VB - or any other language bar assembler - create an array of size 6 and assign each number to separate array element, i.e.

0 1 2 3 4 5 <-Array Element
1 2 3 4 5 6 <-Number

or (on paper)

1 2 3 4 5 6


4. To generate fixtures for round 1, pair teams with an equal "distance" from the left and right borders, i.e. the left-most team plays the right-most team, the 2nd-left-most team plays the 2nd-right-most team etc. The fixtures for the first round then reads
1 vs 6 (team 1 - Arsenal - doesn't play in this round)
2 vs 5
3 vs 4

5. To schedule subsequent rounds, keep the left-most number (which is always number '1') fixed and shift all other numbers 1 position to the right. The right-most number "wraps around." Repeat above fixture-generating method. For round 2, then, we get

1 6 2 3 4 5

and the fixtures are

1 vs 5
6 vs 4
2 vs 3

6. The fixtures of every even round should be reversed so that the original home team is away and vice versa. For round 2, then, the games are:
5 vs 1
4 vs 6
3 vs 2


Repeat until you have a complete schedule.

It is mathematically impossible (in non-trivial cases) to have a complete set of perfect home/away sequences, i.e. so that each team play at home then away then home etc. The above algorithm generates near-perfect sequences, though.

This problem is known, by the way, as a Round Robin scheduling problem. If you're mathematically inclined you can always look up "graph colouring" in any decent Combinatorial Analysis textbook.




Hotshot2005(Posted 2005) [#3]
I knew the fixture was going to be hard as I guess they are like for loop of changing the fixture around....right?

as for tranfer market...it doesnt have to be that realistic but like old day of football manager on C64 on sort of tranfer market....as I trying make small game for it then try expand it more....


Fry Crayola(Posted 2005) [#4]
I had a nightmare generating fixture lists for the game I wrote for the Amstrad CPC. In the end, I took the simple route and you might want to too.

Let's assume there are only three leagues in your game - one with 24 teams, one with 16 and one with 20. What you do is find a league with that number of teams (the English Premiership (20), Championship (24) and Northern Irish Premier League (16) for this example) and look at the fixture lists.

You then take each round of fixtures from here. It's not always easy when some leagues have games postponed or moved for television, but it can be done. Once you have a half-schedule, you just reverse it for the second half. And job done. That's what I did. Useful whenever Tony's not around there to give you a mathematical solution. Where were you in 1995!!!

Good luck with the game. I'm working on a similar thing.


Hotshot2005(Posted 2005) [#5]
hmmm I did the easier way of doing but I am working on 20 Teams Bless me lol...dont worry I will get way around it.... thanks to everyone helping me?

MAX_LIST=2
Dim TEAM$(3)
For I=1 To MAX_LIST
If I=1 Then TEAM$(1)="LIVERPOOL" : TEAM$(2)="MAN UTD"

If I=2 Then TEAM$(1)="MAN UTD":TEAM$(2)="LIVERPOOL"

Text 0,0+Y*2,TEAM$(1)+" Vs "+Team$(2)

Y=Y+10
Next
WaitKey