Baseball game dev diary V0.5.0.202011300120 pitches pitches pitches!

  1. Added a lastInning variable so that end of game check is in the ‘last inning or later’, rather than 9th inning or later. Some games could be 7, or even 3 innings. Inspired by a review of my own dev diary, 0.1.1. Tested 9, 2, 1, and 90 inning games to ensure reliability, by simming to the top of the last inning. (Incidentally, the 90 inning game was a 153-175 scoreline). 
  2. At last – pitches! Presently it simply randomises whether it’s a ball or a strike and whether a swing is taken, and whether the swing connects (connection = hit, miss = strike), but it’s a start (all are 50/50). If this seems simple, it’s not. Presently called strike and swinging strike are the same value. This will need to be changed. 
  3. Had to move ballCount, strikeCount and resultText scope to global. 
  4. Had to implement ball 4 and strike 3 logic. As a result created Strikeout procedure. 
  5. Put in basic hit logic so that if connection is made, determine whether single or extra base hits. Presently set as a single for code that is reserved for groundouts and flyouts. This will be an easy conversion afterwards. Even then it will be temporary anyway.  

Had to rearrange a fair bit of code around to ensure everything still worked both when simming and user-driven. Waaaaay more complicated than it first seemed to be. This was a late session and I was wrecked for the whole day afterwards. The buttons weren't enabling/disabling as required and I suspected there were a few other issues but I had to abandon it in favour of sleep. 


Comments

Popular posts from this blog

MLB (Road to) The Show attribute progression

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

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