Sim QootyPy - Alpha v3.0 Released

Remove this Banner Ad

Hello all, those who have been following the developments within this thread will know that I have been working on a project to recreate the Qooty program in a modern coding language known as Python using a module called Pygame. Recently, I've managed to get the project to a stage where the application has the fundamental functions of Qooty i.e. it can sim a game and produce stats. In terms of planning, I've outlined below how I see the project playing out going forward from now to actual implementation. I would say it is now at Phase 2.

The completion times are an aim, but not a hard deadline as something like this quite complicated and will likely go through a number of roadblocks along the way.

BOLD BLUE IS A NEW FEATURE

PhaseTo-DoEstimated Completion Time
1. Develop Basic Features of Qooty that allow the running of a Qooty Game- create some graphics for main menu screen and sim screen ✅
  • code a timer counts up automatically that is able to detect the end of the quarter, then reset play to centre bounce (end of quarter is randomised between 25 and 35 minutes) ✅
  • code positional tracking along 3 x 5 x,y coordinates (where ball goes beyond these coordinates, move the ball position back within range and initiate a ruck contest aka boundary throw in) ✅
  • code event categories that include aspects of a footy game: hitout, mark, kick, handball, tackle, frees for/against, bounce, dispossession, goal, behind, out of bounds on the full ✅
  • enable submission of teams (worked around this by making the process a matter of filling in a spreadsheet that the app reads from) ✅

-
code app to track which individual players are in possession / direct opponent ✅
- count stats for each category for the individual player when they engage in an action e.g. kick or handball ✅
-
incorporate a probability of follower players gaining possession ✅
-
incorporate a probability of interchanges occurring ✅
-
export end of game stats to a .csv file ✅
- print lines of commentary on screen and into a .txt file at end of match ✅
2. Initial User Testing and Remaining Core Features- provide initial version of the application for users to test and gather feedback on the functionality of the features developed in Phase 1
- develop remaining core Qooty features including:
Best on Ground votes calculation ✅
weather ✅
- End of match reports pertaining to:
match ups ✅
scoring summary ✅
team statistics ✅
February 2022
3. Develop Aesthetic Features & Add To Existing Ones- provide updated version of application to users for further testing of all core features, gather feedback
  • Improve presentation of the sim screen
    • Identify Players in their respective positions ✅
    • Show weather conditions on screen ✅
  • Add an 'Settings' screen accessible from the in main menu for user to adjust sim speed, etc. ✅
    • Add more weather options ✅
  • Go to an interim 'Match Summary' screen after conclusion of the match instead of straight to main menu ✅
  • Develop Forum-Friendly file formatting w/ BB codes printed in commentary file ✅
    • Incorporation of jumper numbers on initial line-up reveal ✅
  • Add more variety to commentary lines
  • Distribute center bounces with position along the center-line ✅
  • Develop more logical form calculations and BOG votes :ballotcheck:
April 2022
4. Beta Testing- Run exhibition games with admin, sim team and volunteers that are posted on the forum
- Gather feedback, identify bugs, flaws, fixes
May 2022
5. Full Parallel Run- Test the sim over the large sample of a full length season to identify any anomalies in statistical distributions
  • Compare results with results of original sim
  • Identify significant differences, gather feedback on whether these differences need to be adjusted for or accepted
TBA
6. Implementation- Transfer SFA competition from Qooty to QootyPy.TBA
 
Last edited:
QootyPy Alpha Version 1 - for initial testing
  • Thread starter
  • Moderator
  • #2

Above is the onedrive link to an initial version of QootyPy

Instructions after download

- fill in the TeamSelection.xls spreadsheet with the names you want to select for home and away teams
- attempt to run the python_qooty.exe , this will hopefully work without needing you to download anything else.
> If this does not work then download python from Welcome to Python.org and try the .py file​
- let me know if you're still having trouble, you will probably need to download pip install, pandas or others if you're not a regular python user
- let me know if you're able to successfully sim a game and generate a commentary and stats file
 
Last edited:

Above is the dropbox link to an initial version of QootyPy

Instructions after download

- fill in the TeamSelection.xls spreadsheet with the names you want to select for home and away teams
- attempt to run the python_qooty.exe , this will hopefully work without needing you to download anything else.
> If this does not work then download python from Welcome to Python.org and try the .py file​
- let me know if you're still having trouble, you will probably need to download pip install, pandas or others if you're not a regular python user
- let me know if you're able to successfully sim a game and generate a commentary and stats file
This is fantastic KP and it looks great. Having the stats dump straight into Excel is brilliant. The commentary is a little disjointed but the old qooty commentary wasn't perfect either.

{1}[Contest] 0:00: Rodney Dangerfield gets the hit out
{1}[h_C] 0:04: GWS Goose is wins it from the bottom of the pack
{1}[a_C] 0:08: fumbler has been stripped of the ball
{1}[h_C] 0:12: beez manages to break out into space
{1}[h_C] 0:15: beez goes for a run and takes a bounce
{1}[h_CHF] 0:18: beez goes for a run and takes a bounce
{1}[h_FF] 0:25: beez chips the ball sideways
{1}[h_lFP] 0:32: The kick has been spoiled and ball goes to ground
{1}[a_rBP] 0:39: Chief manages to break out into space
{1}[a_rBP] 0:43: T2B_ bombs it long
{1}[a_rW] 0:46: Matt_352 takes an easy mark uncontested
{1}[a_rW] 0:53: Matt_352 sends the ball forward by hand
{1}[a_rHFF] 0:56: There is a free kick paid to Ljp86
{1}[a_rHFF] 1:03: Ljp86 sends the ball forward by hand
{1}[a_rFP] 1:07: VandoHawk runs onto a loose ball
{1}[h_lBP] 1:14: WaLkEr_ThE_StAr has been stripped of the ball
{1}[a_rFP] 1:18: Umpire says VandoHawk has thrown the ball
{1}[h_lBP] 1:21: WaLkEr_ThE_StAr goes for a run and takes a bounce
{1}[h_lHBF] 1:24: WaLkEr_ThE_StAr passes the ball laterally with quick hands
{1}[h_lHBF] 1:24: The ball has trickled over the boundary line
{1}[h_lHBF] 1:31: Rodney Dangerfield gets the hit out
{1}[h_lHBF] 1:38: omgfridge is wins it from the bottom of the pack
{1}[h_lHBF] 1:42: omgfridge has been stripped of the ball
{1}[a_rHFF] 1:46: Ljp86 has been stripped of the ball
{1}[h_lHBF] 1:49: omgfridge manages to break out into space
{1}[h_lHBF] 1:52: omgfridge passes the ball laterally with quick hands
{1}[h_CHB] 1:55: Dory_77 runs onto a loose ball
{1}[a_CHF] 2:02: BringBackTheAnchor has been stripped of the ball
{1}[h_CHB] 2:06: BringBackTheAnchor lays a crunching tackle on Dory_77
{1}[a_CHF] 2:09: BringBackTheAnchor manages to break out into space
{1}[a_CHF] 2:12: A Swallow launches a massive torp
{1}[a_CHF] 2:12: A Swallow's shot is wayward and only registers a point
--------------------
GUM: 0.0.0
DRA: 0.1.1
--------------------
 

Log in to remove this ad.

  • Thread starter
  • Moderator
  • #4
This is fantastic KP and it looks great. Having the stats dump straight into Excel is brilliant. The commentary is a little disjointed but the old qooty commentary wasn't perfect either.

{1}[Contest] 0:00: Rodney Dangerfield gets the hit out
{1}[h_C] 0:04: GWS Goose is wins it from the bottom of the pack
{1}[a_C] 0:08: fumbler has been stripped of the ball
{1}[h_C] 0:12: beez manages to break out into space
{1}[h_C] 0:15: beez goes for a run and takes a bounce
{1}[h_CHF] 0:18: beez goes for a run and takes a bounce
{1}[h_FF] 0:25: beez chips the ball sideways
{1}[h_lFP] 0:32: The kick has been spoiled and ball goes to ground
{1}[a_rBP] 0:39: Chief manages to break out into space
{1}[a_rBP] 0:43: T2B_ bombs it long
{1}[a_rW] 0:46: Matt_352 takes an easy mark uncontested
{1}[a_rW] 0:53: Matt_352 sends the ball forward by hand
{1}[a_rHFF] 0:56: There is a free kick paid to Ljp86
{1}[a_rHFF] 1:03: Ljp86 sends the ball forward by hand
{1}[a_rFP] 1:07: VandoHawk runs onto a loose ball
{1}[h_lBP] 1:14: WaLkEr_ThE_StAr has been stripped of the ball
{1}[a_rFP] 1:18: Umpire says VandoHawk has thrown the ball
{1}[h_lBP] 1:21: WaLkEr_ThE_StAr goes for a run and takes a bounce
{1}[h_lHBF] 1:24: WaLkEr_ThE_StAr passes the ball laterally with quick hands
{1}[h_lHBF] 1:24: The ball has trickled over the boundary line
{1}[h_lHBF] 1:31: Rodney Dangerfield gets the hit out
{1}[h_lHBF] 1:38: omgfridge is wins it from the bottom of the pack
{1}[h_lHBF] 1:42: omgfridge has been stripped of the ball
{1}[a_rHFF] 1:46: Ljp86 has been stripped of the ball
{1}[h_lHBF] 1:49: omgfridge manages to break out into space
{1}[h_lHBF] 1:52: omgfridge passes the ball laterally with quick hands
{1}[h_CHB] 1:55: Dory_77 runs onto a loose ball
{1}[a_CHF] 2:02: BringBackTheAnchor has been stripped of the ball
{1}[h_CHB] 2:06: BringBackTheAnchor lays a crunching tackle on Dory_77
{1}[a_CHF] 2:09: BringBackTheAnchor manages to break out into space
{1}[a_CHF] 2:12: A Swallow launches a massive torp
{1}[a_CHF] 2:12: A Swallow's shot is wayward and only registers a point
--------------------
GUM: 0.0.0
DRA: 0.1.1
--------------------
Yeah, I think this is probably about as perfect as the commentary will get. It's sort of one of those things where trying to fix one issue creates another. I spent hours fixing issues that actually affect the integrity of the game such as players tackling teammates, player randomly switching teams and kicking goals for the other side. Those are the sort of issues, if you spot them I'll have to do something about, but other issues are probably just aesthetic.
 
No issues with generating a stats file or commentary and with just a quick skim of commentary fil it all seems in order, couple of questions;

Is higher scoring common or did I get a once off? my game finished 17.17 vs 19.15. Also curious about increased stoppages? On the stats sheet there was a total of 78 hit outs (1 team with a single player getting 42, the other with two getting 18 each)

I also like the more even spread of disposals across the game, no one finished with less than 4 which feels a lot more realistic
 
  • Thread starter
  • Moderator
  • #6
No issues with generating a stats file or commentary and with just a quick skim of commentary fil it all seems in order, couple of questions;

Is higher scoring common or did I get a once off? my game finished 17.17 vs 19.15. Also curious about increased stoppages? On the stats sheet there was a total of 78 hit outs (1 team with a single player getting 42, the other with two getting 18 each)

I also like the more even spread of disposals across the game, no one finished with less than 4 which feels a lot more realistic
High scoring will generally be common until weather conditions get factored in.
The increased stoppages are a result of boundary throw ins that have been introduced.
 
High scoring will generally be common until weather conditions get factored in.
The increased stoppages are a result of boundary throw ins that have been introduced.
all seems well then, anything in particular you wanted people to look out for
 
  • Thread starter
  • Moderator
  • #8
all seems well then, anything in particular you wanted people to look out for
Always check the total goals and behinds for a team on the stats sheet and check if it matches up with the final score.

And maybe other anomalies like teammates tackling each other, a player from one team taking a mark or free kick and the other team ending up with the ball
 
Always check the total goals and behinds for a team on the stats sheet and check if it matches up with the final score.

And maybe other anomalies like teammates tackling each other, a player from one team taking a mark or free kick and the other team ending up with the ball
Are those likely to be anomalies with the code or the commentary? A dodgy commentary line doesn't necessarily mean the code is incorrect.
 
Simmed a couple of games now, had a couple of instances of players being interchanged with themselves, and noticing that there's a few times where players will kick then mark their own ball, for example;

<<<ON: Wacky Tiger | OFF: Wacky Tiger>>>
<<<ON: Dancing Potato | OFF: Dancing Potato>>>
they were Game 1

<<<ON: DockerDen5215 | OFF: DockerDen5215>>>
<<<ON: boncer34 | OFF: boncer34>>>
<<<ON: NaturalDisaster | OFF: NaturalDisaster>>>
These were game 2

{1}[h_CHB] 15:32: boncer34 runs onto a loose ball
{1}[h_CHB] 15:39: boncer34 manages to break out into space
{1}[h_CHB] 15:43: boncer34 chips the ball sideways
{1}[h_CHB] 15:46: boncer34 ragdolls some poor spud and takes a strong mark
{1}[h_CHB] 15:53: boncer34 passes the ball laterally with quick hands
{2}[a_rHBF] 7:06: Connor Idun ragdolls some poor spud and takes a strong mark
{2}[a_rHBF] 7:13: Connor Idun chips the ball sideways
{2}[a_rHBF] 7:17: Connor Idun ragdolls some poor spud and takes a strong mark
{2}[a_rHBF] 7:24: Connor Idun goes for a run and takes a bounce
{2}[a_lFP] 11:24: Marlowe launches a massive torp
{2}[h_rHFF] 11:31: Marlowe ragdolls some poor spud and takes a strong mark
{2}[a_lHBF] 11:38: Marlowe sends the ball forward by hand
{3}[h_FF] 21:27: Phil Davis bombs it long
{3}[a_C] 21:34: Phil Davis ragdolls some poor spud and takes a strong mark
{3}[h_C] 21:41: Phil Davis goes for a run and takes a bounce
{3}[h_CHF] 21:45: Phil Davis releases a teammate with a quick handball
{3}[h_CHF] 25:02: Connor Idun ragdolls some poor spud and takes a strong mark
{3}[a_CHB] 25:09: Connor Idun chips the ball sideways
{3}[a_CHB] 25:13: Connor Idun ragdolls some poor spud and takes a strong mark
{3}[a_CHB] 25:20: Connor Idun goes for a run and takes a bounce
{4}[a_C] 15:13: Josh Kelly manages to break out into space
{4}[a_C] 15:17: Josh Kelly chips the ball sideways
{4}[a_C] 15:20: Josh Kelly ragdolls some poor spud and takes a strong mark
{4}[a_C] 15:27: Josh Kelly sends the ball forward by hand

these were all game 2, not sure if it's fixable but thought it was worth mentioning
 
  • Thread starter
  • Moderator
  • #11
Are those likely to be anomalies with the code or the commentary? A dodgy commentary line doesn't necessarily mean the code is incorrect.
Especially pay attention to the player names within the commentary, because that part directly reads from the code.
 
  • Thread starter
  • Moderator
  • #12
Simmed a couple of games now, had a couple of instances of players being interchanged with themselves, and noticing that there's a few times where players will kick then mark their own ball, for example;



they were Game 1




These were game 2








these were all game 2, not sure if it's fixable but thought it was worth mentioning
Interchange we'll just write off as a quirk. Just means the bench player stands up ready to go on the field and then sits back down.

Any instances of marking their own ball happening with "uncontested marks" or only contested marks?
 

(Log in to remove this ad.)

Interchange we'll just write off as a quirk. Just means the bench player stands up ready to go on the field and then sits back down.

Any instances of marking their own ball happening with "uncontested marks" or only contested marks?
Could you do a quick name check of interchange player variables, and if the text of each equal each other, then just don't show it.
Eg in QBasic I'd have just added something like if ChangePlayer1$<>ChangePlayer2$ then print ChangeComment$
So if the player switches with themselves, the activity still happens but the game simply doesn't tell us about it.

In fact you could even add some value here!
if ChangePlayer1$<>ChangePlayer2$ then
print ChangeComment$
else
print AtBenchActivity$
end if


With AtBenchActivity drawing from a set of comments something like "On the bench we can see "+ChangePlayer1$+" receiving physio attention to the "+BodyParts$(int(rnd(1)*20+1)) :D
 
Interchange we'll just write off as a quirk. Just means the bench player stands up ready to go on the field and then sits back down.

Any instances of marking their own ball happening with "uncontested marks" or only contested marks?
Expansion!!

Headless to the midfield.
 
  • Thread starter
  • Moderator
  • #19
Would this vary for the snow dome?
It always has. I suppose you could have the option to set conditions for venues, like the Snow Dome is always snowy (therefore slow). Don't know why anyone would want to constantly play games where 60 is a winning score though.
 
It always has. I suppose you could have the option to set conditions for venues, like the Snow Dome is always snowy (therefore slow). Don't know why anyone would want to constantly play games where 60 is a winning score though.
ok Steven Hocking
 
  • Thread starter
  • Moderator
  • #22
Oh also I've noticed in my sims that the Home team ruck takes every stoppage but the away team always splits it between two players
You sure that's not just a case of the away ruck being benched? Search the starting ruck's name
 
You sure that's not just a case of the away ruck being benched? Search the starting ruck's name
I was just coming back to delete this post as the game I simmed over dinner had both teams sharing ruck time
 
Small error

{1}[h_rW] 1:06: Matt_352 is wins it from the bottom of the pack

You want to know things like how the possession changed?

{1}[h_FF] 4:42: Bonz manages to break out into space
{1}[h_FF] 4:49: Strigoi bombs it long
{1}[h_FF] 4:49: Strigoi puts it straight through the big sticks for a goal
 

Remove this Banner Ad

Back
Top