0% found this document useful (0 votes)
27 views3 pages

Eeess

The document discusses ways to randomly generate words from a large list in GameBuilder Studio without reading from an external file. It suggests using switch statements or grouping words into categories and scenes to work around limits.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
27 views3 pages

Eeess

The document discusses ways to randomly generate words from a large list in GameBuilder Studio without reading from an external file. It suggests using switch statements or grouping words into categories and scenes to work around limits.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as RTF, PDF, TXT or read online on Scribd
You are on page 1/ 3

Short answer no, it can’t read from a file.

The best you can do is make a huge switch statement with all the possibles you want. Each
word would be assigned a number, then use a random number generator to pick a number
within the switch’s range. In each option have it call a global script to populate each character
of the word into separate global values.

Two things that might make it easier:


1. GB studio projects are in a format call JSON. It will be trivial to make a external
program generate the json for the select statement <- I’ve done this before
2. You could build a plug-in event, there written in TypeScript by the looks of it, and you
probably hardcore an array into the plug-in.
Things to consider:
1. Switch statements are slow
2. Switch statements have a max number of options
3. The deeper the value, the slower it is to call that code

Short answer no, it can’t read from a file.

The best you can do is make a huge switch statement with all the possibles you want. Each
word would be assigned a number, then use a random number generator to pick a number
within the switch’s range. In each option have it call a global script to populate each character
of the word into separate global values.

Two things that might make it easier:


1. GB studio projects are in a format call JSON. It will be trivial to make a external
program generate the json for the select statement <- I’ve done this before
2. You could build a plug-in event, there written in TypeScript by the looks of it, and you
probably hardcore an array into the plug-in.
Things to consider:
1. Switch statements are slow
2. Switch statements have a max number of options
3. The deeper the value, the slower it is to call that code
4. Global scripts can only take about 6 parameters
5. Having tons of switch and global script calls bloats your rom <- video on YouTube
about pushing the limits of a the GBS
So how I’d work around the switch limits:
1. Group the words categories, then sub category, sub-sub category, etc
2. Each group gets its own scene
3. On group scene Init, randomly choice a number of the sub category and change
scene to the sub category scene
Example

1000 word list


1. Top level grouping is word group into batches of 100
2. 100 word batches then grouped into inner batches of 10
4. Global scripts can only take about 6 parameters
5. Having tons of switch and global script calls bloats your rom <- video on YouTube
about pushing the limits of a the GBS
So how I’d work around the switch limits:
1. Group the words categories, then sub category, sub-sub category, etc
2. Each group gets its own scene
3. On group scene Init, randomly choice a number of the sub category and change
scene to the sub category scene
Example

1000 word list


1. Top level grouping is word group into batches of 100
2. 100 word batches then grouped into inner batches of 10

Short answer no, it can’t read from a file.

The best you can do is make a huge switch statement with all the possibles you want. Each
word would be assigned a number, then use a random number generator to pick a number
within the switch’s range. In each option have it call a global script to populate each character
of the word into separate global values.

Two things that might make it easier:


1. GB studio projects are in a format call JSON. It will be trivial to make a external
program generate the json for the select statement <- I’ve done this before
2. You could build a plug-in event, there written in TypeScript by the looks of it, and you
probably hardcore an array into the plug-in.
Things to consider:
1. Switch statements are slow
2. Switch statements have a max number of options
3. The deeper the value, the slower it is to call that code
4. Global scripts can only take about 6 parameters
5. Having tons of switch and global script calls bloats your rom <- video on YouTube
about pushing the limits of a the GBS
So how I’d work around the switch limits:
1. Group the words categories, then sub category, sub-sub category, etc
2. Each group gets its own scene
3. On group scene Init, randomly choice a number of the sub category and change
scene to the sub category scene
Example

1000 word list


1. Top level grouping is word group into batches of 100
2. 100 word batches then grouped into inner batches of 10
Short answer no, it can’t read from a file.

The best you can do is make a huge switch statement with all the possibles you want. Each
word would be assigned a number, then use a random number generator to pick a number
within the switch’s range. In each option have it call a global script to populate each character
of the word into separate global values.

Two things that might make it easier:


1. GB studio projects are in a format call JSON. It will be trivial to make a external
program generate the json for the select statement <- I’ve done this before
2. You could build a plug-in event, there written in TypeScript by the looks of it, and you
probably hardcore an array into the plug-in.
Things to consider:
1. Switch statements are slow
2. Switch statements have a max number of options
3. The deeper the value, the slower it is to call that code
4. Global scripts can only take about 6 parameters
5. Having tons of switch and global script calls bloats your rom <- video on YouTube
about pushing the limits of a the GBS
So how I’d work around the switch limits:
1. Group the words categories, then sub category, sub-sub category, etc
2. Each group gets its own scene
3. On group scene Init, randomly choice a number of the sub category and change
scene to the sub category scene
Example

1000 word list


1. Top level grouping is word group into batches of 100
2. 100 word batches then grouped into inner batches of 10

You might also like