Opry99er Posted April 24, 2013 Author Share Posted April 24, 2013 So... here's the statistical scores for the current players in this simulation... As I've said before, the lower the score, the better. It's weighted to 1.00 as the max OPS (Babe Ruth) and 1.00 as the minimum WHIP (Addie Joss).... The farther away from 000 the player gets, the less effective he is, comparitively. All statistics have been pulled from www.baseball-reference.com, and the REAL high OPS hitters have been skewed a little to allow for the 1.00 baseline. Now all I need to do is create an algorithm to weight the dice rolls based on this statistical table. Any suggestions are certainly welcome. =) W. Johnson (061) J. Bench (182) L. Gehrig (010) R. Hornsby (005) E. Mathews (115) H. Wagner (143) T. Williams (005) J. Dimaggio (023) B. Ruth (000) N.Ryan (147) Y. Berra (170) T. Helton (038) R. Carew (178) A. Rodriguez (056) C. Ripken Jr. (212) B. Williams (142) P. Rose (216) M. Cuddyer (202) Quote Link to comment Share on other sites More sharing options...
Opry99er Posted April 25, 2013 Author Share Posted April 25, 2013 Almost done with the BBS version of this game... It's shaping up to be a good one!!! Hopefully there will be some new BBSers out there who sign on to play it. =) I'll probably be putting the full XB version on hold for a while so I can focus on some other projects. Some TurboForth stuff is creeping on my brain and I gotta get back to Beryl!!!! Quote Link to comment Share on other sites More sharing options...
Opry99er Posted April 26, 2013 Author Share Posted April 26, 2013 (edited) So my code has increased in size QUITE A BIT.... The code I'm posting here is for the BBS, so the weird "PRINT" feel is in effect. I have added batter/hitter matchup statistics, I have added the user interface to hit or pitch aggressively... This thing is still buggy because it's extremely late and I don't have time to debug right now... The one thing right off the top that needs to be fixed is the user interface "press 1 or 2" thing. I'm apparently calling for the wrong keystrokes, so it's probably just a small fix... but as I said, I'm wiped and I have GOT to get to bed... I have to be up in 5 hours. Feel free to try it out... I haven't really tested the new code yet, but it doesn't crash, and that is at least a bonus. =) **Tonight I added: *aggressive vs. cautious hitting and pitching *batter vs. hitter historical stats Again... it's slow and buggy right now, but I'll have it all worked out tomorrow night. ***EDIT*** This post has been edited. Removed code listing because of insane formatting flaws. Will repost later today. Edited April 26, 2013 by Opry99er Quote Link to comment Share on other sites More sharing options...
Opry99er Posted April 26, 2013 Author Share Posted April 26, 2013 Already 170 lines of code... no graphics, sound, "glitter", "sparkle", introduction, instructions, disk access, statistical compilation, or in-game narration. The full version is going to be a monster when it's all said and done... I won't be near a terminal all day today. Any chance someone could run a SIZE check for me? before RUN and after RUN? I'm curious as to how much space I have left, since I DIMed about 27 new arrays last night..... Thanks in advance. Owen *****By the way, if the "base" display doesn't work properly, it's because the formatting got a little screwy on me last night. I found a small issue where first base was directly underneath second and right next to third... If that happens, it's in line 261... 261 CALL C(" "&STR$(BBBFLG)&" "&STR$(BFLG)) For some reason the part after BBBFLG where the quotations leave a one space gap isn't pasting correctly. I am not sure why. Quote Link to comment Share on other sites More sharing options...
unhuman Posted April 26, 2013 Share Posted April 26, 2013 Start XB: 11840 / 24488 Pre Run Code: 11840 / 17822 Post Run (broke before playing first batter in top of 2nd): 10925 / 17334 Cautious Pitching does not work. Was playing this for the first time in a while... When there's a man on first and Cal Ripkin (or anyone, but I grew up with the O's) hits a double... Does the guy go to third or does he stretch it out? Does it decide? Also, it would be nice on the game screen to show the runner positions... When displaying Inning #1 might be nice to say Top or Bottom. Also, when home team is up, I get promoted for both hitting style and pitching style... Shouldn't the computer decide the other? -H Quote Link to comment Share on other sites More sharing options...
Opry99er Posted April 26, 2013 Author Share Posted April 26, 2013 If there's a double, all runners on base advance two bases... Not realistic, but hey.... =) When you're in the main gameplay screen, it SHOULD say TOP or BOT above the INNING... If it does not, then the PRINT style has moved that off the page. Cautious and Aggressive are still buggy, as I wrote last night. Use "0" and "1" instead of "1" and "2" for now. To your question about pitching vs. hitting, YES... You should only select for YOUR team... The other is selected by the computer. If it is prompting you for both, that is another bug I have not yet discovered. As to base runners, it DOES show them... There is a base-path display in the bottom right of the screen. Lines of code 260-262 are the base-runner display. Hmmm.... If ALL these things are malfunctioning, perhaps something has gone terribly wrong with the listing I posted... Seemed to work fine last night..... Quote Link to comment Share on other sites More sharing options...
Opry99er Posted April 26, 2013 Author Share Posted April 26, 2013 Ahhh... That bug asking for BOTH hitting and pitching... Got that one pegged... Just late night last night, not paying attention. paste this line over the pre-existing LINE 1812. 1812 CALL C("1) AGGRESSIVE HITTING?"):: CALL C("2) CAUTIOUS HITTING?") :: GOTO 1820 Quote Link to comment Share on other sites More sharing options...
Opry99er Posted April 26, 2013 Author Share Posted April 26, 2013 Wow.... That formatting is WAAAAAAAAAAAAAAAAAAAAY off!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! Look at it! Somehow it got all screwed up and all the spaces are missing! **Deleting the code for now... Everything got messed up, and I don't know why. I'll have to re-post later. Quote Link to comment Share on other sites More sharing options...
Opry99er Posted April 26, 2013 Author Share Posted April 26, 2013 Yea Howie... I can see why you had all those problems. =) Since I changed the whole shebang to PRINT statements for the BBS, the spaces inside the quotations are crucial to having the correct display. What you were seeing was a big cluster f... I'll re-post later with a .dsk attached so that these problems don't happen again. Quote Link to comment Share on other sites More sharing options...
Opry99er Posted April 27, 2013 Author Share Posted April 27, 2013 Funky issue here... in testing, I have run this part of code about 30 times... I NEVER get a 5 or a 6... I SHOULD be getting quite a few while using the "AGGRESSIVE" option. WHDICE=WHDICE+2 :: IF WHDICE>6 THEN WHDICE=6 That should LOAD UP the "6" s, but I'm not gettin' em. Any ideas? 1800 BCH=INT(RND*BAPSC)+1 :: PCH=INT(RND*POM)+1 !Batter vs. hitter matchup based on score 1805 IF BCH>PCH THEN SFDICE=1 ELSE SFDICE=2 !If the batter wins, SFDICE is 1, otherwise, 2 1810 WHDICE=INT(RND*6)+1 1811 IF TAP=1 THEN 1812 ELSE 1815 1812 CALL C("1) AGGRESSIVE HITTING?"):: CALL C("2) CAUTIOUS HITTING?"):: GOTO 1820 1815 CALL C("1) AGGRESSIVE PITCHING?"):: CALL C("2) CAUTIOUS PITCHING?") 1820 !REM CALL KEY FOR 1 or 2--- this will help determine the outcome of the at-bat 1825 CALL KEY(0,K,S):: IF S=0 THEN 1820 1830 IF K<49 THEN 1820 ELSE IF K>50 THEN 1820 !!! 1840 K=K-48 :: IF K=1 THEN 1850 ELSE 1880 !If 1 is pressed, continue with program, else goto 1880 1850 WHDICE=WHDICE+2 :: IF WHDICE>6 THEN WHDICE=6 !aggressive play, increase big result 1880 WHDICE=WHDICE-2 :: IF WHDICE<1 THEN WHDICE=1 !cautious play, decrease big result 1890 RETURN Quote Link to comment Share on other sites More sharing options...
Opry99er Posted April 27, 2013 Author Share Posted April 27, 2013 (edited) Here's the program. Drop it in Classic99 and RUN DSK1.BBSBALLT2 BBSBALLT2.zip Edited April 27, 2013 by Opry99er Quote Link to comment Share on other sites More sharing options...
Opry99er Posted April 27, 2013 Author Share Posted April 27, 2013 (edited) Idiot... I figured it out. Paste THIS line into the program 1850 WHDICE=WHDICE+2 :: IF WHDICE>6 THEN WHDICE=6 :: GOTO 1890 ***EDIT*** I fixed the code in the previous post's file DOWNLOAD. Just DL and enjoy. Anyone who tests this out, I'd certainly appreciate if you'd post the final score of your simulation. =) Edited April 27, 2013 by Opry99er Quote Link to comment Share on other sites More sharing options...
Opry99er Posted April 27, 2013 Author Share Posted April 27, 2013 Ran a sim with some cool and surprising results... Final score was HOME: 13 AWAY: 8 It's a pretty extreme score, but that stuff happens. =) I'll need to sim several games to see what the average score is. If it's too ridiculous, I may adjust the pitchers' effective dominance rating... Of course, I'd love to let things fly as they are... but the reason the scores are so high is the high OPS scores of the batters. These are all-star teams and it shows!!! Cool things I've noticed though... The player stats are working. =) Pitchers who are at the plate are striking out and grounding out... Babe Ruth is hitting up a storm, and Rod Carew hit 1 of 4 (.250 average)... It's crazy to see the partial realism created by this simulation. =) LEFT TO DO: 1) Complete testing and adjusting dominance ratings to create a bit more realism 2) Record the number of hits for each team (for display at the end of the game) 3) Create INTRO and INSTRUCTIONS 4) Streamline the user interface (not so many delays) ***POSSIBLE REVISIONS*** 5) multiple extra players with randomized opponent teams created before the game begins 6) save hitting stats for each player to be displayed (on command) at the end of the game Quote Link to comment Share on other sites More sharing options...
Opry99er Posted April 27, 2013 Author Share Posted April 27, 2013 uhHUman... You should enjoy this display MUCH better. =) You'll get what you're looking for here, I think. DL it and give it a sim or two. InsaneMultitasker... Once the debugging is done, I'll be ready to send you something nice. =) Quote Link to comment Share on other sites More sharing options...
Opry99er Posted April 27, 2013 Author Share Posted April 27, 2013 (edited) Edited April 27, 2013 by Opry99er Quote Link to comment Share on other sites More sharing options...
Opry99er Posted April 27, 2013 Author Share Posted April 27, 2013 (edited) This is going to require some serious adjustments... =) Most recent sim: HOME: 22 AWAY: 8 Wow..... Are the player stats THAT far off? I'll have to do a comparitive analysis of the two teams and post it here... I'm also wondering if my matchup algorith is too simple and doesn't allow for enough randomization. I'll have to look at that too... Edited April 27, 2013 by Opry99er Quote Link to comment Share on other sites More sharing options...
Opry99er Posted April 27, 2013 Author Share Posted April 27, 2013 This should explain it... (By the way, there is statistically NO WAY the away team can win in the game as it currently sits) Home Team average OPS: 942 Away Team average OPS: 848 Home Team Pitcher score: 939 Away Team Pitcher score: 853 Essentially you've got a COMPLETE mismatch between the two teams... The home pitcher will necessarily dominate the opposing team and the away pitcher will necessarily get dominated by the home hitters.... This tells me three things.... 1) The teams are completely unbalanced 2) The stats work! 3) The the randomization algorith works (because the away team scores at all!) Quote Link to comment Share on other sites More sharing options...
Opry99er Posted April 28, 2013 Author Share Posted April 28, 2013 Made an adjustment or two and now we have parity! Last two games, home team won one (8 to 6) and the away team won one (6 to 3) Really it is no longer a simulation, but a "game"... Direct user input affecting the outcomes of plays takes the Sim element out of it... For this particular version. Quote Link to comment Share on other sites More sharing options...
Opry99er Posted April 29, 2013 Author Share Posted April 29, 2013 Added intro and instruction text... Added an option for "play in steroids era"... Will post updated file tonight once I clean up a bug. Turning into a nice little game. Quote Link to comment Share on other sites More sharing options...
Opry99er Posted April 29, 2013 Author Share Posted April 29, 2013 I have broken my end-of-game/walk off code and Im having a hell of a time fixing it!!!! Code just Eating a hole through my head... Ugh!! Bad mental block on this... Hate that!!! Quote Link to comment Share on other sites More sharing options...
+InsaneMultitasker Posted April 29, 2013 Share Posted April 29, 2013 Maybe it's time for a 7th inning mental stretch? Quote Link to comment Share on other sites More sharing options...
Opry99er Posted April 29, 2013 Author Share Posted April 29, 2013 Ahhhhh!!!!! And I thought you weren't a sports fan!!? My brain is fried from staring at this code...normally program flow and debugging come naturally, but this one is a doozie... Perhaps because it's my own program or because im trying too hard, but either way I'm just not getting it this time... 7th inning mental stretches aren't always possible when you're on a self imposed deadline. I just want to get done so I can do other things (TI related, of course) with my free time. Quote Link to comment Share on other sites More sharing options...
Opry99er Posted April 29, 2013 Author Share Posted April 29, 2013 Enjoy!!! **NEW FEATURES** 1) Instruction/Introduction 2) Box Score at the end 3) Fixed all bugs (that I've found so far) Play in Classic99 CPU overdrive (since the XB PRINTing is slooooooow) BBSBALLT3.zip Quote Link to comment Share on other sites More sharing options...
Opry99er Posted April 29, 2013 Author Share Posted April 29, 2013 Last few things to accomplish before I call the BBS version done... 1) "Filler text" (e.g. "Whoa, he knocked the cover off that ball!!!!" **for a homerun, obviously) 2) Route CALL KEY stuff through the custom CALL KEY routine (for BBS purposes) 3) Re-add the "Play in steroids era" stuff... I took this out because it was causing 18-23 scores. =) Just needs some tweaking 4) Create a "help" screen of sorts. Basically if the user pressed "?" it would take them to a screen showing game stats and player strengths (in case one wanted to pitch more carefully to Babe Ruth, or be more aggressive with Rod Carew) And then it'll be done. About an hour of coding left. All "baseball code" is done. I won't be adding any more features to the baseball gameplay itself or tweaking the engine... it's going to be called "done" for this version. Just some cosmetic and superficial changes left in order to give the user a "richer" experience. =) If anyone sims some games, post thoughts (please) and also maybe post some scores... any oddities you find, let me know so that I can take a look. BTW, a pitcher shouldn't be going 4/5 with 2 homers.... =) Quote Link to comment Share on other sites More sharing options...
unhuman Posted April 29, 2013 Share Posted April 29, 2013 Regarding steroids... Maybe you're dosing everyone... In the steroid era, perhaps only 1-2 players per team were enhancing their games. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.