Developers! Do you lack creativity or are you just too lazy to come up with names for people and places for your games?! With this program you won't have to.
The program generates random names. While developing my RPG I couldn't think of a name for my character so I wrote this program to help my lack of creativity. It has no media so the code can be copied and run right in DBpro.
First, it asks if you would like to use "y" as a vowel as well as a constant because some people like use y as a vowel and some people don't. Next it asks how many letters you want the name to be. The program generates a random constant first, then a random vowel, and repeats until it reaches the amount of letters the user wants.
The above paragraph repeats and repeats until the user enters 0 for the amount of letters, then the program exits. At any time where the words have reached the bottom of the screen and you can't see what you're typing anymore, just type "cls", "clear", "clear screen", "clearscreen", "clear the screen", or "clearthescreen", and the screen will clear.
Here is the code.
letters=1
repeat
input "Do you want y as a vowel? y/n ", yesorno$
if yesorno$ = "y" or yesorno$ = "n"
input "How many letters? ", letters
dim letter(letters)
dim letter$(letters)
word$ = ""
for x = 1 to letters
for y = 1 to letters step 2
letter(y) = rnd(21)
if letter(y) = 1 then letter$(y) = "b"
if letter(y) = 2 then letter$(y) = "c"
if letter(y) = 3 then letter$(y) = "d"
if letter(y) = 4 then letter$(y) = "f"
if letter(y) = 5 then letter$(y) = "g"
if letter(y) = 6 then letter$(y) = "h"
if letter(y) = 7 then letter$(y) = "j"
if letter(y) = 8 then letter$(y) = "k"
if letter(y) = 9 then letter$(y) = "l"
if letter(y) = 10 then letter$(y) = "m"
if letter(y) = 11 then letter$(y) = "n"
if letter(y) = 12 then letter$(y) = "p"
if letter(y) = 13 then letter$(y) = "q"
if letter(y) = 14 then letter$(y) = "r"
if letter(y) = 15 then letter$(y) = "s"
if letter(y) = 16 then letter$(y) = "t"
if letter(y) = 17 then letter$(y) = "v"
if letter(y) = 18 then letter$(y) = "w"
if letter(y) = 19 then letter$(y) = "x"
if letter(y) = 20 then letter$(y) = "y"
if letter(y) = 21 then letter$(y) = "z"
next y
for y = 2 to letters step 2
if yesorno$ = "y" then letter(y) = rnd(6)
if yesorno$ = "n" then letter(y) = rnd(5)
if yesorno$ <> "y" and yesorno$ <> "n" then letter(y) = rnd(6)
if letter(y) = 1 then letter$(y) = "a"
if letter(y) = 2 then letter$(y) = "e"
if letter(y) = 3 then letter$(y) = "i"
if letter(y) = 4 then letter$(y) = "o"
if letter(y) = 5 then letter$(y) = "u"
if letter(y) = 6 then letter$(y) = "y"
next y
next x
for x = 1 to letters
word$ = word$ + letter$(x)
next x
print word$
wait key
endif
if yesorno$ = "cls" or yesorno$ = "clear" or yesorno$ = "clear screen" or yesorno$ = "clearscreen" or yesorno$ = "clear the screen" or yesorno$ = "clearthescreen" then cls
until letters = 0
Don't take life too seriously... no one gets out alive.