vipoo / iRacingReplayOverlay.net

Tools to capture game data, and then transcode a captured video file - overlaying race status
GNU General Public License v3.0
33 stars 15 forks source link

Josua additions #70

Closed SpirouHyluan closed 8 years ago

SpirouHyluan commented 8 years ago

Dean,

i managed to use GitHub as you requested in Iracing official forums. Here is the Pull request, I hope I did it properly...

Please forgive the code... I hope there is not too much to be done to make it clean.

You'll see in comments that I finally added the random battle selection tonight.

Thanks for your help,

Josua

vipoo commented 8 years ago

Hi mate,

Sorry havn't as yet had a chance to review this code - last weekend there was just too much motor racing (Bathurst, WEC and Russian GP) - Hopefuly can look at your stuff this weekend.

Thanks again for the contribution -- it really appreciated.

Cheers Dean

SpirouHyluan commented 8 years ago

Hi Dean,

don't worry about the delay ! I'm moving this week so I haven't time for anything else either.

When you'll have the time, I have two some questions you might have an easy answer to, which could help me for next features.

Josua

vipoo commented 8 years ago

Hi Josua,

I am finally looking at the code now - and its working for the most part - I am cleaning it up a bit - hopefully will have something pushed within the next 24hrs - I am aiming to get your features into a new beta release.

Dean

vipoo commented 8 years ago

Hi Josua,

I have 'merged' some of your changes. I did not commit your pull request directly.

If you look at my repository's master branch - you will see 2 of your features added - the "preferred driver selection for battles", and the "ignore incidents" options.

I decided to not use your pull request, so that I could commit, each feature as a single independent commit - I also modified your code a bit. I believe my modifications still achieve your desired behaviour. (I kept your tag as the author of the commits)

I am going to conduct some test runs now, and then if all works, I will push this to the beta release - probably tomorrow my time.

My next step, is to bring over your graphic overlay additions - the "Outro" stuff.

You may want to pull all 'upstream' changes from my master branch to your master branch.

Dean

SpirouHyluan commented 8 years ago

Hi Dean,

I'm happy you considered merging some features ! Thanks a lot.

If I understand well you modified the behaviour of the "focus on prefered drivers" checkbox. In my version, I was focusing on prefered drivers battles if one exists. If none was found, I was using your original battle detection, to stay on battles all the time. It was interesting, I think, to keep the idea of a full race replay, but with a focus on the some drivers.

I don't know what's the good behaviour to implement, I just wanted to point the differences I saw.

If i can help, feel free to ask (I know my code is terribad though).

Thanks again,

Josua

2015-11-02 7:36 GMT+01:00 Dean Netherton notifications@github.com:

Hi Josua,

I have 'merged' some of your changes. I did not commit your pull request directly.

If you look at my repository's master branch - you will see 2 of your features added - the "preferred driver selection for battles", and the "ignore incidents" options.

I decided to not use your pull request, so that I could commit, each feature as a single independent commit - I also modified your code a bit. I believe my modifications still achieve your desired behaviour. (I kept your tag as the author of the commits)

My next step, is to bring over your graphic overlay additions - the "Outro" stuff.

— Reply to this email directly or view it on GitHub https://github.com/vipoo/iRacingReplayOverlay.net/pull/70#issuecomment-152931072 .

vipoo commented 8 years ago

Hi Josua,

Thanks for the update -- I think i understand your code better now.

My original code would focus on battles for perferred and non perferred drivers - but ordered such that perferred driver battles were more likely than others, to be selected.

But in merging your code, I noticed a bug I had, where it would only compare the 'follower of a battle' to the 'perferred drivers list' --- this would mean if a perferred driver was a leader in a battle, it may not get selected.

I will have a closer look at this logic over the weekend.

Cheers

SpirouHyluan commented 8 years ago

Hi Dean,

yeha I noticed that too when I tried to focus on prefered drivers and finally got a way to find all battles involving a prefered driver. Code is not very smart, but working I think.

I now have one more idea about the replay direction and will probably look at it this Week End.

This is about the final lap direction, which is showing all drivers crossing the line. It is a good idea but for big fields, like in GT3 series, it takes a very long time to show everyone (almost 1:30 in a 10 min highlight is quite long imo). So here is the idea : to cut the final lap video only to the podium (and the prefered drivers when the option is selected). Then, showing the "outro" in which all results are displayed. There I will need your help to add the outro video since i didn't manage to find a way to make it work.

Cheers and thanks again looking into the project,

Josua

2015-11-06 8:22 GMT+01:00 Dean Netherton notifications@github.com:

Hi Josua,

Thanks for the update -- I think i understand your code better now.

My original code would focus on battles for perferred and non perferred drivers - but ordered such that perferred driver battles were more likely than others, to be selected.

But in merging your code, I noticed a bug I had, where it would only compare the 'follower of a battle' to the 'perferred drivers list' --- this would mean if a perferred driver was a leader in a battle, it may not get selected.

I will have a closer look at this logic over the weekend.

Cheers

— Reply to this email directly or view it on GitHub https://github.com/vipoo/iRacingReplayOverlay.net/pull/70#issuecomment-154333073 .

SpirouHyluan commented 8 years ago

Hi Dean,

i just noticed an annoying "bug" in the app. When using it on a team event, car's driver is always the same one (the last it seems). I guess it is because you designed the soft before driver swap existed !

I tried to see what is going on and I understand that in the SDK you use the sessiondata info to get driver's name. I tried some things to get current driver but it seems to be too hard for me.

Could you give me an advice about this particular thing ?

Thanks,

Josua

2015-11-06 10:18 GMT+01:00 Josua Duteriez josuaduteriez@yahoo.fr:

Hi Dean,

yeha I noticed that too when I tried to focus on prefered drivers and finally got a way to find all battles involving a prefered driver. Code is not very smart, but working I think.

I now have one more idea about the replay direction and will probably look at it this Week End.

This is about the final lap direction, which is showing all drivers crossing the line. It is a good idea but for big fields, like in GT3 series, it takes a very long time to show everyone (almost 1:30 in a 10 min highlight is quite long imo). So here is the idea : to cut the final lap video only to the podium (and the prefered drivers when the option is selected). Then, showing the "outro" in which all results are displayed. There I will need your help to add the outro video since i didn't manage to find a way to make it work.

Cheers and thanks again looking into the project,

Josua

2015-11-06 8:22 GMT+01:00 Dean Netherton notifications@github.com:

Hi Josua,

Thanks for the update -- I think i understand your code better now.

My original code would focus on battles for perferred and non perferred drivers - but ordered such that perferred driver battles were more likely than others, to be selected.

But in merging your code, I noticed a bug I had, where it would only compare the 'follower of a battle' to the 'perferred drivers list' --- this would mean if a perferred driver was a leader in a battle, it may not get selected.

I will have a closer look at this logic over the weekend.

Cheers

— Reply to this email directly or view it on GitHub https://github.com/vipoo/iRacingReplayOverlay.net/pull/70#issuecomment-154333073 .

vipoo commented 8 years ago

Hi Josua,

Yeah you are right - this was done before driver swaps - I need to update my SDK library to expose this data better - and map it thru the app.

I have not really looked at this - i will get back to u soon.

Cheers dean

On 12 November 2015 at 10:30, SpirouHyluan notifications@github.com wrote:

Hi Dean,

i just noticed an annoying "bug" in the app. When using it on a team event, car's driver is always the same one (the last it seems). I guess it is because you designed the soft before driver swap existed !

I tried to see what is going on and I understand that in the SDK you use the sessiondata info to get driver's name. I tried some things to get current driver but it seems to be too hard for me.

Could you give me an advice about this particular thing ?

Thanks,

Josua

2015-11-06 10:18 GMT+01:00 Josua Duteriez josuaduteriez@yahoo.fr:

Hi Dean,

yeha I noticed that too when I tried to focus on prefered drivers and finally got a way to find all battles involving a prefered driver. Code is not very smart, but working I think.

I now have one more idea about the replay direction and will probably look at it this Week End.

This is about the final lap direction, which is showing all drivers crossing the line. It is a good idea but for big fields, like in GT3 series, it takes a very long time to show everyone (almost 1:30 in a 10 min highlight is quite long imo). So here is the idea : to cut the final lap video only to the podium (and the prefered drivers when the option is selected). Then, showing the "outro" in which all results are displayed. There I will need your help to add the outro video since i didn't manage to find a way to make it work.

Cheers and thanks again looking into the project,

Josua

2015-11-06 8:22 GMT+01:00 Dean Netherton notifications@github.com:

Hi Josua,

Thanks for the update -- I think i understand your code better now.

My original code would focus on battles for perferred and non perferred drivers - but ordered such that perferred driver battles were more likely than others, to be selected.

But in merging your code, I noticed a bug I had, where it would only compare the 'follower of a battle' to the 'perferred drivers list' --- this would mean if a perferred driver was a leader in a battle, it may not get selected.

I will have a closer look at this logic over the weekend.

Cheers

— Reply to this email directly or view it on GitHub < https://github.com/vipoo/iRacingReplayOverlay.net/pull/70#issuecomment-154333073

.

— Reply to this email directly or view it on GitHub https://github.com/vipoo/iRacingReplayOverlay.net/pull/70#issuecomment-155942971 .

SpirouHyluan commented 8 years ago

Dean, you might see I added some commits in the pull request. There are some things you might find interesting. Let me know if it is the case.

I saw you improved your battle detection algorythm. I'm not sure of what it does exactly. I thing I'll give it a try if you include my latest commits and then probably will restart form your branch to continue improving the soft. For example, I'd like to use the "Scan period" to detect overtakes instead of incidents. It might be usefull to be sure to get all overtakes (of all prefered drivers at least).

Cheers.

Josua

vipoo commented 8 years ago

I will check details on the pull request - tonight - just got in to my work.

I had on Sunday, wanted to try and integrate your outro and alternative intro code - but I got distracted as I looked at the battle selection.

I noticed the code was not 'calculating' probabilities all the well! Maths was never my strong point.

Its hard to explain, but I will try:

The basic idea is, that all the battles are found, then ordered by their position in the field. Then a range is assigned to each battle. A range from 0 to 100.

The battles up the front, have more 'range' than those battles towards the end. A random number is generated between 0 and 100 to then select a battle.

To calculate how much 'range' to give to each battle, I do something like:

Given a factor of 2, moving from the last battle to the first, I assign a ratio of 2 times the number of the previous battle: eg.

If we have 5 battles, we would calculate odds such as:

Battle 1: 16

Battle 2: 8

Battle 3: 4

Battle 4: 2

Battle 5: 1

This gives me a range from 1 to 16 - I then normalise these numbers to get a range from 1 to 100.

Previously it was not doing this.

In addition, if the preferred driver names are given, these are ordered at the top - to ensure they have a high chance of selection.

In regards to your idea of collecting battle information with a pre-scan --- this is something that I have been thinking about - (in fact an early prototype did just this). This could be leverage to speed up the whole capture process. As we could skip/fast-forward the replay during capture...

Cheers Dean

On 22 November 2015 at 20:39, SpirouHyluan notifications@github.com wrote:

Dean, you might see I added some commits in the pull request. There are some things you might find interesting. Let me know if it is the case.

I saw you improved your battle detection algorythm. I'm not sure of what it does exactly. I thing I'll give it a try if you include my latest commits and then probably will restart form your branch to continue improving the soft. For example, I'd like to use the "Scan period" to detect overtakes instead of incidents. It might be usefull to be sure to get all overtakes (of all prefered drivers at least).

Cheers.

Josua

— Reply to this email directly or view it on GitHub https://github.com/vipoo/iRacingReplayOverlay.net/pull/70#issuecomment-158740271 .

SpirouHyluan commented 8 years ago

Dean,

Thanks for taking the time to explain what the code does to me. I looked it a little and i am wondering about one thing : what is happening if the "focus on prefered driver" checkmark is checked, but there is no battle involving a prefered driver at this moment ? There is no battle at all found, i guess ? I might be a solution to not get them in final edit and avoid missing any battle from prefered drivers. I did not think about that.

About the next things to implement, the first priority for me would be to correct driver's name in team events. On this I feel totally worthless. Then about the overtake scan, it might be a solution to not miss an overtake because the battle selected by random wasn't the good one at this moment.

I also tried to understand the edit section and I think i didn't understand everything. But with your current battle detection, the problem i was having might be solved.

Anyway, thanks again for looking into this and I hope I might help a little more :)

Cheers,

Josua

vipoo commented 8 years ago

Hi Josua,

Just a quick note, to say I am still working through things - But as we approach xmas, I seem to be struggling to find time - only seem to get a couple hours a week - at most - to work on this project.

This weekend, I started restructuring the projects & setting up a CI environment - I want to be able to deploy the application, with a simple one-click button - its not that its hard at the moment - but i thought i need to make this a bit easier.

As such, I have used the site AppVeyor, to automated the builds & run the tests - next I will get it to help me automate deployments.

You can see the output at: https://ci.appveyor.com/project/vipoo/iracingreplayoverlay-net (the sdk at: https://ci.appveyor.com/project/vipoo/iracingsdk-net)

I have used sub-modules within the main project, to reference the iRacingSDK and SuperMFLib projects. This may change the way forking and merging are managed, but this change will allow the main project, to be 'bound' to a specific commit of iRacingSDK and SuperMFLib.

Cheers Dean

SpirouHyluan commented 8 years ago

Hi Dea,

thanks for the update. I though when I installed your app that the installer was great. But I understand your will to bind SDK version to the app, moreover with the changes that might be necessary for the team swap support.

Now I don't know how I will be able to contribute to the project, I was just starting to understand how github works ! I'll see that later. Honestly I didn't have a lot of time to dedicate to the project since I had some physical subjects to work on.

Let me know when you have something I can work on in the new environment. I'll see if my last additions are included and will do it if not. About the SDK change for team swap, I could'nt see if I can do something by myself. BUt I tried already and... Failed :)

Josua

2015-12-07 2:43 GMT+01:00 Dean Netherton notifications@github.com:

Hi Josua,

Just a quick note, to say I am still working through things - But as we approach xmas, I seem to be struggling to find time - only seem to get a couple hours a week - at most - to work on this project.

This weekend, I started restructuring the projects & setting up a CI environment - I want to be able to deploy the application, with a simple one-click button - its not that its hard at the moment - but i thought i need to make this a bit easier.

As such, I have used the site AppVeyor, to automated the builds & run the tests - next I will get it to help me automate deployments.

You can see the output at: https://ci.appveyor.com/project/vipoo/iracingreplayoverlay-net (the sdk at: https://ci.appveyor.com/project/vipoo/iracingsdk-net)

I have used sub-modules within the main project, to reference the iRacingSDK and SuperMFLib projects. This may change the way forking and merging are managed, but this change will allow the main project, to be 'bound' to a specific commit of iRacingSDK and SuperMFLib.

Cheers Dean

— Reply to this email directly or view it on GitHub https://github.com/vipoo/iRacingReplayOverlay.net/pull/70#issuecomment-162386871 .

vipoo commented 8 years ago

I have just push a commit - which includes new flash cards for intro and 'outro' - I used your commit as a starting point -- i think it now looks cool.

Thanks again for your contribution..