How to make a random name generator?

For questions about using Classic.

Post » Thu Dec 02, 2010 5:32 am

Anyone have any ideas for making a random name generator? Not sure how I'd do it. I don't mind if the names sound stupid, as long as they're readable (not something like "Dfftbm").
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190

Post » Thu Dec 02, 2010 7:37 am

I'd create several arrays with :
- consonant and vowels for the first letter
- consonant only
- vowels only
- several consonants to follow other consonants (h, etc.)
- several vowels to follow other vowels (to get "ae" etc.)

Then i'd use a random iteration value between 5 and 10 (rnd(6) +5 with floor) to count the letters and use it as the number of iterations of a loop. Then you generate random numbers that pick a letter each time in one of your arrays and check if the last generated letter is a consonant or a vowel. Dunno if it's the best way but with some exceptions you might be able to get cool names.
B
72
S
15
G
4
Posts: 311
Reputation: 11,609

Post » Thu Dec 02, 2010 5:57 pm

You could do something like a title. Just have a database of names, and a database of adjectives.
Something like:
John the brave
Mike the flatulent
Joe the weird
Image Image
B
161
S
48
G
90
Posts: 7,356
Reputation: 66,767

Post » Fri Dec 03, 2010 6:26 am

Thanks for the ideas!
B
134
S
65
G
16
Posts: 1,766
Reputation: 19,190


Return to Help & Support using Construct Classic

Who is online

Users browsing this forum: No registered users and 4 guests