Baseball game dev diary version 0.3.0.202011232200: adding the bases

  1.  Added subs for hitSingle, hitDouble, hitTriple and hitHomer. Only hitSingle to be utilised initially. Sidenote: turns out you can’t use single and double as sub names.
  2. Added buttons for bases, and code to display playerIDs in button text for batter and last three batters on bases.
  3. Added output all data before pitch procedure to Next batter button to have a separation between data shown at end of play and start of next play. Needed to invoke two clicks from user per play – one to prepare for the next plate appearance (nextBatter) and one to execute the next plate appearance (BeginPA). Added a procedure for postPlayDataUpdate for this same reason – end of play display would be lost by the next before pitch display if there isn’t a user interruption between them. 
  4. Broke the check end of inning down into two separate procedures instead of being in the begin plate appearance procedure. Checkendofinning() simply calls switchTeams if outs is at 3, and SwitchTeams does the switch and resets outs to 0.

Points 2 and 3 above tied into each other, and made me realise that there really needs to be a way to show the different game states at both the start and end of each play, hence the use of the previously inactive Next Batter button.


Comments

Popular posts from this blog

V1.1.4.202103032300 Basic player creator, line score tidy up and additional play results, including errors

MLB (Road to) The Show attribute progression

MLB The Show 21: create a stadium prediction & using created stadiums in online games