MaxCoderz

for your 1 bit pleasure!

All times are UTC




Post new topic Reply to topic  [ 159 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11
Author Message
PostPosted: Thu 11 Jun, 2009 2:07 pm 
Offline
New Member

Joined: Wed 10 Jun, 2009 9:58 pm
Posts: 17
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


Top
 Profile  
Reply with quote  
PostPosted: Thu 11 Jun, 2009 10:18 pm 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
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).
Quote:
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.


Top
 Profile  
Reply with quote  
PostPosted: Fri 12 Jun, 2009 3:49 am 
Offline
New Member

Joined: Wed 10 Jun, 2009 9:58 pm
Posts: 17
Well in that case... :)


Top
 Profile  
Reply with quote  
PostPosted: Tue 16 Jun, 2009 12:02 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 4094
Location: I cant seem to get out of this cryogenic chamber!
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


Top
 Profile  
Reply with quote  
PostPosted: Tue 16 Jun, 2009 1:18 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
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!


Top
 Profile  
Reply with quote  
PostPosted: Tue 16 Jun, 2009 4:29 pm 
Offline
New Member

Joined: Wed 10 Jun, 2009 9:58 pm
Posts: 17
: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!


Top
 Profile  
Reply with quote  
PostPosted: Wed 23 Sep, 2009 10:43 pm 
Offline
New Member

Joined: Wed 10 Jun, 2009 9:58 pm
Posts: 17
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.


Top
 Profile  
Reply with quote  
PostPosted: Thu 24 Sep, 2009 2:15 am 
Offline
Maxcoderz Staff
User avatar

Joined: Thu 16 Dec, 2004 10:06 pm
Posts: 3064
Location: Croydon, England
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".


Top
 Profile  
Reply with quote  
PostPosted: Thu 24 Sep, 2009 4:24 am 
Offline
New Member

Joined: Wed 10 Jun, 2009 9:58 pm
Posts: 17
Yeah, the way i tested it was this. I made program RND

Code:
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.


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 159 posts ]  Go to page Previous  1 ... 7, 8, 9, 10, 11

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB ® Forum Software © phpBB Group | DVGFX2 by: Matt