Jump to content
IGNORED

New Baseball game for the TI-99/4a


Opry99er

Recommended Posts

Essentially yes... I was trying to increase scores SOME and increase the chance of a home run vs. a fly out... But it basically just made pitchers ineffective and increased ALL offensive production.

 

No worries, I've got it figured out now. Howie, you tried the new version out yet?

Link to comment
Share on other sites

Not yet - will do it RIGHT NOW!

 

My notes:

1. It started me at the top of the 9th

2. I'd prefer you to scroll things up the screen that occurred rather than print + call clear.

3. home team lost 3-0 (after 1 inning) with all aggressive play

4. might be easier / cleaner if you used data statements for the player info and other info that's grouped (instructions)

Edited by unhuman
Link to comment
Share on other sites

Thanks... that 9th inning thing was part of my end-of-game testing... Line 100 needs to be changed to "INN=1" instead of "INN=9"

 

 

=)

 

 

The PRINT scrolling and CALL CLEAR stuff is specifically designed for the BBS application. The actual XB game will not have that in it at all... =)

Link to comment
Share on other sites

This is the correct file... For some reason I posted the beta testing/bug squashing version of the game... (as noted by unHUman--- the game starting in the 9th inning was the giveaway)

 

This will be the last "test" version before I call it done. I have three small changes to make tonight and then the BBS version is finished.

 

intro_zps80a89b72.jpg

 

Introduction Screen

 

 

 

bbsball_zps82c0e9c6.png

 

Main game screen

 

 

 

boxscore_zps4162f28e.jpg

 

Box Score

BBSBALL.zip

Link to comment
Share on other sites

It's done... I won't be making any more major adjustments or changes to this version of the program.

 

***NEW ADDITIONS

 

1) "Check matchup" at any time... "?" pulls up the matchup between hitter and batter. You can see the OPS for the hitter and the WHIP for the pitcher

 

2) "PLAY AGAIN?"--- after the game, obviously, this one is self explanatory

 

3) Adjusted the statistical categories in order to create some more parity.

 

 

***I have actually played 4 games, HOME won 2 times, AWAY won 2 times... Average score seems to be 6-10 runs per team. Enjoy. =)

BBSBALL1.zip

  • Like 1
Link to comment
Share on other sites

With the help of InsaneMultitasker, I have the game 99.9% ready to go up on the Heat Wave BBS... It's running in the BBS environment now, but there are just a few little things to change before it's loaded into Geneve and put "online," so to speak.

 

First, I lied... I am going to make one more significant change. Between innings (and half innings), the screen clears, The inning # scrolls into view, then it pauses, and then "which team is up to bat" scrolls in behind it in the form of "HOME/AWAY TEAM UP TO BAT"...

 

Seeing this run about a thousand times has made me kind of hate it... What I will be doing is displaying an inning-by-inning box score on the screen instead, with a prompt to "press any key to continue". It will look something like this:

 


INNING 1 2 3 4 5 6 7 8 9 X
---------------------------
HOME 0 1 3 2 0 0 1 . . . . .
---------------------------
AWAY 2 0 1 0 1 0 0 . . . . .

**PRESS ANY KEY TO CONTINUE**

That looks pretty mangled.... whatever, you get the point.

 

To do this, I'll need a two dimensional array handling the score BY INNING PER TEAM... This array will look something like this:

 

100 DIM SCPI(2,10) ! first dimension is the number of teams, second dimension is the number of innings to track
That way, I can PRINT "HOME: "&STR$(SCPI(1))&STR$(SCPI(2)).......

 

Anyway, shouldn't take but a few minutes tonight to get it done... Then I'm going to need to get a few BBS-specific stuff in there dealing with the carrier from the rs232, and VOILA!!!! You can play baseball on the dial-in (or telnet) BBSes for the TI-99/4a.

 

This has been a great learning experience, and I hope (once I get a couple other things accomplished) to do more game conversion/development for the BBS scene.

Link to comment
Share on other sites

I have the game 99.9% ready to go up on the Heat Wave BBS... It's running in the BBS environment now, but there are just a few little things to change before it's loaded into Geneve and put "online," so to speak.

Owen, one thing I need you to look for is the program PreScanIt! It will process the game and will enable prescan, which will speed up the game start to nearly instantaneous. You can do also this manually following the XB manual but it is time-consuming.

Link to comment
Share on other sites

Well, this is all I could find...

 

Pre-Scan-It

 

Of course, that's just the manual--- I haven't had any luck getting the actual program yet... still searching the databases. I'm sure I'll find it, but it seems like everyone spells it differently...

 

PreScanIt

PrescanIt

Prescan-it

Pre-Scan-It

 

etc...

 

It might be here on this forum even... just haven't found it yet. I'll get it. =)

Link to comment
Share on other sites

Looking more and more like I'll have to do this by hand... Anyone have a copy of this for download? Perhaps I'm looking in the wrong places... I haven't checked the gameshelf yet... if I remember correctly, Walid had some development resources there at one point

Link to comment
Share on other sites

That is the command to turn off the pre-scan. :) (!@P+ turns it on).

 

The way that XB works is when you type RUN, first it scans the program, and prepares space for all the variables and CALLs used by your program. This is what is happening during the delay between RUN and startup.

 

Turning the prescan off lets you speed that period up, because it doesn't have to scan the rest of the program. BUT, if the variables/CALLs are not 'allocated', then the interpreter will faill when it sees them.

 

To see it work, start small:

 

100 A=5
110 B=10
120 CALL HCHAR(10,10,42)

 

No surprises what that does - pretty much nothing.

 

Now add the pre-scan disable:

 

50 !@P-

 

When you run it now, you get a SYNTAX ERROR IN 100 -- it doesn't know what 'A' is.

 

To get around this, you just have to define all your variables and calls at the beginning of the program. You don't have to /use/ them, which means you can actually cheat and use code that is incorrect in terms of syntax, but is enough for the prescanner. For instance:

 

10 GOTO 50
20 A::B::CALL HCHAR

 

Notice how we use a GOTO to skip line 20 - which defines A, B, and CALL HCHAR, but does not actually use them (indeed - all three statements are technically syntax errors - but the prescan doesn't check if you use them correctly).

 

And with that - the program works!

 

I don't remember ALL the rules about disabling pre-scan... I know you have to have all your variables and CALLs defined. You also have to turn it back ON before the first SUB statement (!@P+).

Link to comment
Share on other sites

I read most of that in the XB manual this morning, but the example you gave is certainly helpful, Tursi. =)

 

I think, in looking at some of the example code from the pre-existing BBS games, this method may have been used in order to speed the "launch sequence" up a bit. I hope I can find Pre-Scan-It, but if not... no big deal. I don't mind doing this manually, as all my variables and arrays are already at the start of the program... I've found that having them ALL up front and all the subs ALL at the back is just good organization... =)

  • Like 1
Link to comment
Share on other sites

I read most of that in the XB manual this morning, but the example you gave is certainly helpful, Tursi. =)

 

I think, in looking at some of the example code from the pre-existing BBS games, this method may have been used in order to speed the "launch sequence" up a bit. I hope I can find Pre-Scan-It, but if not... no big deal. I don't mind doing this manually, as all my variables and arrays are already at the start of the program... I've found that having them ALL up front and all the subs ALL at the back is just good organization... =)

Yes - speeding up the "launch sequence" is the primary reason for turning off prescan.

Link to comment
Share on other sites

So, the WEREWOLVES AND WANDERERS game code has the following at the head of the program (or very close to the head)

 


100 GOTO 131
110 COLS,DFD$,A,A$,B,C,D,E,F,B$,G,H,I,J,K,L,C$,M,N,O,D$,P,Q,R,S,T,U,V,W,X,Y,Z,AA=0 :: DIM BA(19,7) :: CALL B :: CALL A :: CALL F :: CALL C :: CALL D :: CALL E :: CALL LINK
130 DATA 0,2,0,0,0,0,0
131 !@P-

 

Yep.... this doesn't look too much of a "pain" to do. =)

 

I'll keep looking for the Pre-Scan-It, but if I can't find it--- then I'll just do this...

Edited by Opry99er
Link to comment
Share on other sites

So, the WEREWOLVES AND WANDERERS game code has the following at the head of the program (or very close to the head)

 


100 GOTO 131
110 COLS,DFD$,A,A$,B,C,D,E,F,B$,G,H,I,J,K,L,C$,M,N,O,D$,P,Q,R,S,T,U,V,W,X,Y,Z,AA=0 :: DIM BA(19,7) :: CALL B :: CALL A :: CALL F :: CALL C :: CALL D :: CALL E :: CALL LINK
130 DATA 0,2,0,0,0,0,0
131 !@P-

 

Yep.... this doesn't look too much of a "pain" to do. =)

 

I'll keep looking for the Pre-Scan-It, but if I can't find it--- then I'll just do this...

Yep, that's it. Like Tursi mentioned, you also need to turn prescan back on before the sub programs.

 

Also you'll see in 'Werewolves' that we appear to be setting strings to a value. Since this is prescan only, it doesn't matter. :)

 

I do not recall whether or not DATA statements require prescan, though from the same snippet I suspect XB needs to scan them.

Link to comment
Share on other sites

Little issue here... i might have a solution, but I'm still working on it.

 

I need to display the entire box score onscreen for a team... Here's the code so far:

 


1215 CALL C(" BOX SCORE"):: FOR I=1 TO 3 :: CALL C(""):: NEXT I
1220 CALL C(" ******************************")
1250 CALL C("HOME *"&STR$(INSC(1,1))&"*"&STR$(INSC(1,2))&"*"&STR$(INSC(1,3))&"*"&STR$(INSC(1,4))&"*"&STR$(INSC(1,5))&"*"

 

Problem is, if I try to display INSC(1,X), where X represents the innings, 1 through 9, I run out of line space for one XB line. In other words, the number of characters required to code that segment into the PRINT style command is MORE than XB will allow per line of code. Since the entire display on that line has to be in one PRINT command, I'm in a pickle...

 

I'd thought about using a FOR NEXT loop, but I cannot do it within the parentheticals of the CALL C (or PRINT, as it turns out to be)...

 

All I'm trying to do is the following:

 



BOX SCORE

INNING 1 2 3 4 5 6 7 8 9 X
*********************
HOME *1*0*0*4*2*0*0*3*0*X*
*********************
AWAY *0*0*0*0*5*1*0*2*3*X*
*********************

 

Any ideas?

Edited by Opry99er
Link to comment
Share on other sites

This got REALLY buggy for a while.... but I've got it now.

 

This is the new "between-innings" display.

 

boxscore_zps058d608f.png

 

 

Here's the (mangled code-box) code

 

 

 

1215 W$="HOME *"&STR$(INSC(1,1))&"*"&STR$(INSC(1,2))&"*"&STR$(INSC(1,3))&"*"&STR$(INSC(1,4))
1216 X$="*"&STR$(INSC(1,5))&"*"&STR$(INSC(1,6))&"*"&STR$(INSC(1,7))&"*"&STR$(INSC(1,)&"*"&STR$(INSC(1,9))&"* *"
1217 Y$="AWAY *"&STR$(INSC(2,1))&"*"&STR$(INSC(2,2))&"*"&STR$(INSC(2,3))&"*"&STR$(INSC(2,4))
1218 Z$="*"&STR$(INSC(2,5))&"*"&STR$(INSC(2,6))&"*"&STR$(INSC(2,7))&"*"&STR$(INSC(2,)&"*"&STR$(INSC(2,9))&"* *"


1219 CALL C("         BOX SCORE"):: FOR I=1 TO 3 :: CALL C(""):: NEXT I
1220 CALL C("      1 2 3 4 5 6 7 8 9 X")
1230 CALL C("     *********************")
1250 HS$=W$&X$ :: CALL C(HS$)
1260 CALL C("     *********************")
1261 AS$=Y$&Z$ :: CALL C(AS$)
1262 CALL C("     *********************")
1263 CALL C(""):: CALL C(""):: CALL C("")
1264 CALL C("PRESS ANY KEY TO CONTINUE")

 

 

Edited by Opry99er
Link to comment
Share on other sites

1215 W$="HOME *"&STR$(INSC(1,1))&"*"&STR$(INSC(1,2))&"*"&STR$(INSC(1,3))&"*"&STR$(INSC(1,4))
1216 X$="*"&STR$(INSC(1,5))&"*"&STR$(INSC(1,6))&"*"&STR$(INSC(1,7))&"*"&STR$(INSC(1,)&"*"&STR$(INSC(1,9))&"* *"
1217 Y$="AWAY *"&STR$(INSC(2,1))&"*"&STR$(INSC(2,2))&"*"&STR$(INSC(2,3))&"*"&STR$(INSC(2,4))
1218 Z$="*"&STR$(INSC(2,5))&"*"&STR$(INSC(2,6))&"*"&STR$(INSC(2,7))&"*"&STR$(INSC(2,)&"*"&STR$(INSC(2,9))&"* *"

 

Give this a try. It will be somewhat slower to execute, how much slower I do not know. It also may give you the ability to display extra innings by tracking the total innings in a variable, and replacing '9' with that var.

W$="HOME *"::Y$="AWAY *"::FOR X=1 to 9::W$=W$&STR$(INSC(1,X))&"*" :: Y$=Y$&STR$(INSC(2,X))&"*"::NEXT X

Edited by InsaneMultitasker
Link to comment
Share on other sites

Hmmm... Very interesting! It will save some program space, that's for sure...

 

I'll try that out here in a few... Next I just need to finish the testing on the "enhanced batter interface" we talked about and do the Prescan mod and it'll be done. Today!!!!!

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...