Page 1 of 2
svn2git conversion plus a few improvements
Posted: Wed Sep 02, 2020 3:44 am
by tstellar
I wanted to try to speed up the game simulations in bygfoot, so I used the svn2git tool to convert the current svn trunk to git and pushed it along with some other fixes to
github. Along with the simulation speed up, I cherry-picked the initial CMake support from the cmake branch and added some fixes to get a basic cmake build working.
The improved simulations speed is quite noticeable on the older system that I'm using, so I thought I'd post this here in case someone else was interested in trying it out.
Re: svn2git conversion plus a few improvements
Posted: Wed Sep 02, 2020 7:41 am
by gunnar
Nice. I have to admit I'm not really working on bygfoot ATM. When the corona mess started I had a surge of good will (I don't find the right words in English, but I hope you understand what I mean.) to start working on it again, but working from home drained that quickly. I'll take a look at what you've done.
Re: svn2git conversion plus a few improvements
Posted: Thu Sep 03, 2020 4:26 am
by tstellar
I also ran into some bugs in the xml files, so I've fixed those now and added some code to validate the xml files on startup.
Re: svn2git conversion plus a few improvements
Posted: Thu Sep 03, 2020 7:22 am
by will_the_canuck
Hey tstellar. The potential of your changes to speed up the processing of games and scores outside of the user realm (aka simulations as you call them) is something that is quite interesting I'll say, as anything to speed that up to a point would be worthwhile. As you mention that you took the source from the cmake or trunk branch, that is a different version from what is currently in production or available as a current binary. Basically, that is version 2.3.3, whereas the current available version via the download area is version 2.3.2, and from what I saw from the notes on 2.3.3, it is supposed to work a little differently from 2.3.2, in regards to the saving and loading of saved games.
So my question is, when you made a binary of this that is apparently working, in what operating system environment did you make the program run? Just curious. Also, you said you tested this on some definitions, where I thought I read somewhere that you tested this on the England definitions? If so, which ones? Perhaps the ones available for download from the "Definitions" section of the forum that were updated for 2019/2020? That would truly be a big test as I'm trying them out right now and on my Intel Atom N450 cpu, the wait time is quite large, but then my computer isn't very powerful. And some of the definitions with the 2.3.3 branch may not work properly, as you've already noticed, at least with regards to the corrections you had to do with the USA and Mexico definitions. And as you mention your computer as being an older system, mind me asking what kind of specs it is, to determine its power and all? At least that is one good thing about bygfoot I'll say...the specs needed to play the game aren't that bad. As long as your computer is adequate, you should be able to play it without much issue, if any.
Anyways, that's all I can think of at the moment. Though as for the definitions from the 2.3.3 branch, if you know how to read the definition files, it might be best to check them out first. It also depends on which countries you want to play also, as some countries don't work outright, like San Marino for one. I did post an update to that one finally that works. And Mexico is another one that doesn't work as well also, which I also did an update for, but if you play that one, take the second file posted there, not the first one.
Bye for now,
will_the_canuck
Re: svn2git conversion plus a few improvements
Posted: Mon Sep 07, 2020 2:44 am
by tstellar
I was building on Fedora and also Gentoo and using the definitions from the 2.3.2 release.
Re: svn2git conversion plus a few improvements
Posted: Tue Sep 15, 2020 3:45 am
by tstellar
I've pushed some more commits to the branch, and I'm seeing about a 30x improvement in sim speed for complex countries with lots of leagues (e.g. England) and about a 15x improvement for countries with less leagues (e.g. Faroe Islands). I've been doing the performance measurements using the 2019/2020 definitions that were posted on the forums, since these are much more complete than what is currently in trunk.
Re: svn2git conversion plus a few improvements
Posted: Tue Sep 15, 2020 7:11 am
by gunnar
Your changes are nice indeed. You're at a point where we should issue a new build.
But then we would need to refresh our anonymised definitions.
Re: svn2git conversion plus a few improvements
Posted: Tue Sep 15, 2020 6:11 pm
by tstellar
gunnar wrote: ↑Tue Sep 15, 2020 7:11 am
But then we would need to refresh our anonymised definitions.
What is the process for doing this, do we just need to replace the team names with city names?
Re: svn2git conversion plus a few improvements
Posted: Tue Sep 15, 2020 8:23 pm
by tstellar
tstellar wrote: ↑Tue Sep 15, 2020 6:11 pm
gunnar wrote: ↑Tue Sep 15, 2020 7:11 am
But then we would need to refresh our anonymised definitions.
What is the process for doing this, do we just need to replace the team names with city names?
What I mean is, we have the updated definitions in the forums, how do we anonymise those?
Re: svn2git conversion plus a few improvements
Posted: Wed Sep 16, 2020 7:08 am
by gunnar
Re: svn2git conversion plus a few improvements
Posted: Wed Sep 16, 2020 6:46 pm
by tstellar
Do you have an updated link to the official_names file? This link is broken:
https://bygfoot.sourceforge.io/revisions/official_names
Re: svn2git conversion plus a few improvements
Posted: Thu Sep 17, 2020 1:40 pm
by gunnar
Re: svn2git conversion plus a few improvements
Posted: Mon Sep 21, 2020 10:13 pm
by will_the_canuck
If you're wanting to or thinking of using the definitions that were posted for the 2019/2020 seasons in the bygfoot updates, be advised of some of the updates by me, will_the_canuck.
As I did an update for San Marino and also created a definition for Gibraltar, I did these after billys_boots posted his updates and therefore my updates have extras included that aren't part of the other European updates. On top of including the UEFA European Championship in a friendly setting, where the user will just get to spectate the matches, I've also included updates to the UEFA competitions in that I resolved the updated Champions League and Europa League files for the European countries. So whereas billys_boots' definitions would include the older Champions League and UEFA Cup files, mine are different. Also, mine use different timings and add some other countries, although not all playable (kosovo and liechtenstein). And I've changed the Intercontinental cup to the FIFA Club World Cup and made it similar to the South American model. There's also the Copa Libertadores cup listed, of which the winner will play in the Club World Cup. It is a work in progress mind you.
As for my USA 2019 updates, you may want to check out the tier one teams in the Eastern Conference. I have D.C. United listed as D.C. Utd. and New York City F.C. as New York City, although that last one, I don't feel so bad about. I just didn't want to have D.C. U. listed for D.C. United, as it might remind users of the comic book movie thing...i.e. DC Universe. There's also a friendly match set up for the teams in the top tier and some other friendlies too. Remember, everything was a work in progress. The USA 2019 definitions are standalone and shouldn't interfere with other definitions. But I should add that as I have 4 different versions contained in the one zip file, be aware that 3 versions include promotion and relegation (which isn't part of the USA system) and one version has no promotion or relegation system, which is how the USA system works. There is an included readme file which should hopefully explain everything.
As for the Mexico updates I did, if you decide to include them, as the current ones don't quite work out, please use the ones labelled Mexico_definitions-updated-upgraded-corrected.zip. That one works and like the USA definitions, are a standalone version too. I just took the original definitions and reworked them and expanded on them also.
So as my definitions are works in progress, and outside of the UEFA definitions, they are not interconnected like the UEFA definitions currently are, I'm working on that too although it is going slowly and will take time also. Although as I currently do have offline things to work on, I'm not working on anything bygfoot at the moment, although I do at times check out the forum to see if anything new is posted.
That's all for now and tstellar...good work.
will_the_canuck
PS - the russian flag in the 2.3.x tree is the wrong flag. Just wanted to say that.
URGENT: I came across an error in my work
Posted: Tue Sep 22, 2020 9:11 pm
by will_the_canuck
URGENT:
Well, it seems I messed up again as when playing bygfoot last night for a few rounds, I got an error again which I put off in a previous season as odd. So, let me explain.
The error in question has to do with the updates I did for the UEFA Champions League (uefa_cl*.xml) and UEFA Europa League (uefa_el*.xml) cup files. When compared to the old UEFA Cup competition, the Europa League competition has more opportunities for teams to transfer from the Champions League to the Europa League than the previous UEFA Cup had. So when I was testing my new UEFA cup competition files with certain definitions, there appeared to be no problems. When I was playing with my English definitions that had the new cup competition files, the initial testing didn't show any problems that I could see as with England, although it has 7 teams qualify for the Champions League and Europa League, 6 of those 7 teams qualify into the group stages of either the Champions League or Europa League. Only the 6th (or 7th) placed team would qualify in a round prior to the group stage, that being the League Cup winner, or at least the 7th placed team not yet qualified.
So, the way I have it encoded, the League Cup winner (or the next team not yet qualified) qualifies in that spot and they enter in the Second Qualifying Round of the Europa League. If they don't make it to the Play-Off Round, two rounds later, then there will not be any error. If the English team makes it to the Play-Off Round, then an error occurs. Now the error is that in week 11, the second leg of the Play-Off Round is played for both the Champions League and Europa League, but in the case of England, only 1 team would be playing before the Group Stage. So, if that team is still playing in the Play-Off Round, the Champions League Play-Off Round would play in week 11, round 1, as no English teams would be playing in that round. The Europa League Play-Off Round would play in week 11, round 2, as the English team would likely play a league game in week 11, round 1. Although I'm using the code which I believe will hold the update for the next cup round until after the Europa League has played, I believe the Champions League information is updating after week 11, round 1, and by the time I get to week 11, round 2, the information I need to transfer teams over from the Champions League for the Group Stage is now incorrect. So if I'm correct, it is an easy enough fix but it is the testing part that takes time. So, with regards to my European definitions, the international cup files are not working but everything else so far appears to be working normally.
So that's that. As for my European updates, I guess they aren't quite ready to be integrated with the other definitions based upon the international cup files having an unforeseen error.
Oh well.
But on a second note, to gunnar, with regards to the real names and anonymous names for team names, if we were to comment the real names in the league files that would only be visible to someone that read the actual league file, would that suffice? An example is below from the league_england1.xml file:
Code: Select all
<teams>
<team>
## Arsenal
<team_name>A. London</team_name>
</team>
I am of course assuming that A. London is supposed to be Arsenal.
At least this way, only if someone checks out the league file or if the person updating the league file will know that for Arsenal, you can use A. London. Know what I mean? And this way, it won't affect the game in how the name is displayed as it is set up as a comment and shouldn't show up in the game otherwise.
That's all for now...now I have to make two other posts to mention my blunder. Argh.
will_the_canuck
PS - I should maybe add that with my league_short files used in the USA 2019 definitions, I may have used some real names or names to be more descriptive without being too descriptive, if you know what I mean?
Re: svn2git conversion plus a few improvements
Posted: Sun Oct 04, 2020 11:20 pm
by tstellar
I've just pushed some new updates. I noticed that the definitions from the forums were missing reserve teams, so I added some additional promotion logic for promoting / relegating reserve teams. As well as some tags to define reserve teams in the xml files. I also fixed a bug in cups that have only 2 teams in the first round.
I wrote a script to try to update the forum definitions with the bygfoot names for all the teams, but it turns out there are ~5000 teams in the definitions that don't have entries in the names file. So, it would be a pretty big job to try to update them all. I did update the Faroe Islands definitions with the bygfoot names, since I was using this for testing my reserve team changes.