Hello everyone hope you are doing well, i was busy these days i was having problem with the police in my country, they catch me smoking weed and now i got criminal record... but never mind that i hope will be better in the future. So i got in mind interesting game to make but i need a little help. How I could make an automatic random name generator, what would be the rules to build such an object? Also the names to sound & look natural. Not like (Egrttttr, Asdfgh, Kjutyytsas) :D. Give me some starting ideas how can i achive this?

3 Months
Discussion Span
Last Post by taersious

easiest way, build a list with firstnames, build a list with lastnames,pick one of each at random and combine them.

How is this a programming problem?


BTW i forgot to mention i need an unlimited number of First Names and i do not need the Last Name because every player will have its own AutoGenerated name.
So am searching the logic in creating unique name

Edited by Stefan_1


Use Faker or similar. Keep in mind, there aren't an unlimited number of first (or last) names so you'll have to create some random element and append it to avoid clashes.


Create list of name building blocks, like jol, tar, mid, ead, ak, ca, hov, khov, lum, ...
Name generatror can randomly combine 2, (or 3 or 4) into name, and get something like
Jolmid, Hovtar, Tarkhov, Lumead, Lumak, Caak, Camid, Eadtar, Eadjol, ...
You can make one separate list of those that name can begin with, and another of those that can't.
Then add every new name into history list and make sure next name is not already used.
It will take some work to make rich library of building blocks.

Edited by Sinisa_1


Personally I would use the database object solution, in which the library of possible name prefixes, suffixes, and so forth would come from a table. Obviously used names would be in a seperate table. When generating name at random, make sure potential new name is not already in existance. Good luck!

Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.