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
[News] BBC BASIC Beta Testing - 2009/03/06 r720
Moderator: benryves
-
- New Member
- Posts: 17
- Joined: Wed 10 Jun, 2009 9:58 pm
- 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
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).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...
Star commands are easy; other ones are hacked on top of BBC BASIC's error handler so aren't very practical.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
-
- New Member
- Posts: 17
- Joined: Wed 10 Jun, 2009 9:58 pm
Re: [News] BBC BASIC Beta Testing - 2009/03/06 r720
Well in that case...
- 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
Hey builderboy, i saw your tetris game on ticalc.org and its fantastic!
- 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
Wow, that's fantastic!
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!
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!
-
- New Member
- Posts: 17
- Joined: Wed 10 Jun, 2009 9:58 pm
Re: [News] BBC BASIC Beta Testing - 2009/03/06 r720
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!
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!
-
- New Member
- Posts: 17
- Joined: Wed 10 Jun, 2009 9:58 pm
Re: [News] BBC BASIC Beta Testing - 2009/03/06 r720
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.
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.
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.
- 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
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".
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".
-
- New Member
- Posts: 17
- Joined: Wed 10 Jun, 2009 9:58 pm
Re: [News] BBC BASIC Beta Testing - 2009/03/06 r720
Yeah, the way i tested it was this. I made program RND
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%
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.
Code: Select all
Repeat
Print RND(7)
Wait50
Until False
Iteration1 (first digit RND(7) gives me):
1:100%
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.