[News] BBC BASIC Beta Testing - 2009/03/06 r720

Porting Richard Russell's BBC BASIC (Z80) to the TI-83+ and TI-84+ series calculators.

Moderator: benryves

builderboy
New Member
Posts: 17
Joined: Wed 10 Jun, 2009 9:58 pm

Re: [News] BBC BASIC Beta Testing - 2009/03/06 r720

Post by builderboy »

well there are currently still many other ways of not letting yourself type *bye. Like *FX 12,1 *FX 11,1 ;)

And it seems that if you knew what you were you were doing, you could enable it in the begining of your program, and then disable it back at the end. Its just that 2nd and Alpha are probably the most used keys in games, next to the arrow keys, and restricting their usage to only inkey(-1) seems kind of limiting...

hmmm, maybe you could implement some kind of argumentless command DEFAULT to restore all things like key repeats and key functions to default settings, for casel like above, and others (LIKE THE *FX 12 thing, that was really annoying)

Then again, i'm not sure how hard it would be to add function, or even do what i'm suggesting, as i'm not an assembly person :P
User avatar
benryves
Maxcoderz Staff
Posts: 3089
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Re: [News] BBC BASIC Beta Testing - 2009/03/06 r720

Post by benryves »

builderboy wrote:Its just that 2nd and Alpha are probably the most used keys in games, next to the arrow keys, and restricting their usage to only inkey(-1) seems kind of limiting...
I see your point. The Escape handler currently resets some settings, so a command that makes 2nd and Alpha return ASCII codes when pressed wouldn't be too much of a problem (and pressing Escape would return them to normal).
Then again, i'm not sure how hard it would be to add function, or even do what i'm suggesting, as i'm not an assembly person :P
Star commands are easy; other ones are hacked on top of BBC BASIC's error handler so aren't very practical.
builderboy
New Member
Posts: 17
Joined: Wed 10 Jun, 2009 9:58 pm

Re: [News] BBC BASIC Beta Testing - 2009/03/06 r720

Post by builderboy »

Well in that case... :)
User avatar
tr1p1ea
Maxcoderz Staff
Posts: 4141
Joined: Thu 16 Dec, 2004 10:06 pm
Location: I cant seem to get out of this cryogenic chamber!
Contact:

Re: [News] BBC BASIC Beta Testing - 2009/03/06 r720

Post by tr1p1ea »

Hey builderboy, i saw your tetris game on ticalc.org and its fantastic!
"My world is Black & White. But if I blink fast enough, I see it in Grayscale."
Image
Image
User avatar
benryves
Maxcoderz Staff
Posts: 3089
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Re: [News] BBC BASIC Beta Testing - 2009/03/06 r720

Post by benryves »

Wow, that's fantastic! :D

I'm sorry that I haven't got around to adding the input features you requested, but I've had a lot of work on my plate recently. :( I'm not ignoring you!
builderboy
New Member
Posts: 17
Joined: Wed 10 Jun, 2009 9:58 pm

Re: [News] BBC BASIC Beta Testing - 2009/03/06 r720

Post by builderboy »

:D and I have a breakout game coming up! I just need to figure out menus and such.
I'm surprised that nobody else is making any sort of games for BBC Basic, it really is quite powerful.

EDIT: lol, i just went anr read the readme, and i spelled Tetris wrong two different ways in the introduction! "Hits head against wall" Blarg!
builderboy
New Member
Posts: 17
Joined: Wed 10 Jun, 2009 9:58 pm

Re: [News] BBC BASIC Beta Testing - 2009/03/06 r720

Post by builderboy »

Hi again, i hope i'm not being a nag, but I found an interesting quirk, although i'm not sure its a bug, and i'm not sure anything can be done, as it might be part of the original program. :puzzled:

The RND behaves strangely when first used, and I'm not talking about being initialized by run, I mean after that. The first time I ever run RND successfully It always returns 1 the very first time. And even what i am taking a larger sample RND(30) it usually stays under 10 for the first 10 or so iterations. When i take it out of 7 numbers (the number of pices for my Tetris, which i originally noticed the problem) the first number is always 1 and the second number is always either 1 or 4. I did some more tests, and 1 seems to be the most commonly occuring number near the begining of execution.

Yeah, just thought you should know if you didn't already. I don't know if this can be fixed exactly, because you said it was really hard to alter prebuilt commands. And i guess in programs that really need it to work, they could simply poll RND about 50 times and it eventually evens out.
User avatar
benryves
Maxcoderz Staff
Posts: 3089
Joined: Thu 16 Dec, 2004 10:06 pm
Location: Croydon, England
Contact:

Re: [News] BBC BASIC Beta Testing - 2009/03/06 r720

Post by benryves »

Is that always repeatable? (eg quitting BBC BASIC then starting it again?)

One possible fix (which may be worth doing anyway) is sticking IF RND-(1+ABSTIME) at the start of your program to set the random number generator's seed explicitly.

Don't worry about nagging me, but I have a huge amount of work on my plate at the moment and have no time to do any programming for "fun".
builderboy
New Member
Posts: 17
Joined: Wed 10 Jun, 2009 9:58 pm

Re: [News] BBC BASIC Beta Testing - 2009/03/06 r720

Post by builderboy »

Yeah, the way i tested it was this. I made program RND

Code: Select all

Repeat
Print RND(7)
Wait50
Until False
ran it, and recorded the first 6 numbers it gave. Then i saved, closed, and restarted BBc Basic. I repeated this 20 times and got the following statistics for how much each digit appeared in each iteration of RND(7)

Iteration1 (first digit RND(7) gives me):
1:100% :o

Iteration2:
1:60%
4:40%

Iteration3:
1:25%
2:5%
3:25%
4:5%
5:5%
6:25%
7:10%

and so on. The percentages evened out after a couple iterations, but the first few are very biased, leaning more towards the low end.

As for your fix, that seems to be better than mine :) and small enough to be a reasonable addition to any program that needs complete randomness for the early numbers. I imagine it won't be an issue for all games.
Post Reply