Jump to content
IGNORED

IntyBASIC - Random Data Retrieval?


First Spear

Recommended Posts

Can anyone show an example of how to pull random words from a Label in IntyBASIC?

 

If I have something like

 

MyLabel1:

Data 11 , 23 , 234 , 654 , 43

 

MyLabel2:

Data 546 , 2 , 3504 , 43 , 209

 

I would like to do make a Procedure call and get any one of those values assigned to MyLabel1 but nothing from MyLabel2.

 

How would that be possible?

 

 

Thanks.

Link to comment
Share on other sites

And very important reminder to note here in EVERY thread on random numbers.

 

Do something that actually makes your program "random" with external intervention - the "human factor". Like do something in timing, like when you press the disc, or when you start the game etc. Something that will be different almost every time to plant a "seed" for your program to work with and further transform.

 

Nanochess'es idea, in another thread, of including a title screen to "begin" the game was perfect for my game I'm putting together for this contest. This different "timing" is important, otherwise your program will give you the same random number(s) every running.

 

AFAIK, there are no "random numbers" from a computer. A computer does the same thing every time you ask it with the same instructions. They need YOUR help on this one.

  • Like 1
Link to comment
Share on other sites

AFAIK, there are no "random numbers" from a computer. A computer does the same thing every time you ask it with the same instructions. They need YOUR help on this one.

There is some entropy to be had with uninitialised RAM contents. The latest version of IntyBASIC uses this technique to generate its random number seed before handing control over to your game.

  • Like 2
Link to comment
Share on other sites

And very important reminder to note here in EVERY thread on random numbers.

 

Do something that actually makes your program "random" with external intervention - the "human factor". Like do something in timing, like when you press the disc, or when you start the game etc. Something that will be different almost every time to plant a "seed" for your program to work with and further transform.

 

Nanochess'es idea, in another thread, of including a title screen to "begin" the game was perfect for my game I'm putting together for this contest. This different "timing" is important, otherwise your program will give you the same random number(s) every running.

 

AFAIK, there are no "random numbers" from a computer. A computer does the same thing every time you ask it with the same instructions. They need YOUR help on this one.

 

You're right, there are really no random numbers, but pseudo-random even though all the tricks.

 

There is some entropy to be had with uninitialised RAM contents. The latest version of IntyBASIC uses this technique to generate its random number seed before handing control over to your game.

 

Yes, and thanks Mark for allowing me to use your code :) :thumbsup:

  • Like 2
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...