Okay, so I wanted to make a cool program that generates random names for, like, video game characters or something. I had this idea for a while, but I finally decided to just do it. Here’s how it went down.
Brainstorming and Setup
First, I needed to figure out how I wanted this thing to work. I decided I wanted to combine different parts of names to make unique ones. I thought of having, like, a “prefix” list and a “suffix” list. You know, stuff like “Shadow” and “Fang”, so you could get combinations like “ShadowFang”.
I use Python because Its pretty easy . So, I fired up my code editor and created a new Python file.
Making the Lists
This was the fun part, I spent a good chunk of time just coming up with cool-sounding name parts. I made two lists:
Prefixes: This was stuff like “Storm”, “Night”, “Ice”, “Fire”, “Silent”, “Quick”, etc. I just kept adding to it whenever I thought of something cool.
Suffixes: This was stuff like “blade”, “runner”, “weaver”, “heart”, “fist”, “wind”, etc. Same deal as the prefixes.
I Put these lists into my code. And Added some basic Python lists like this:
prefixes = ["Storm", "Night", "Ice", "Fire"]
suffixes = ["blade", "runner", "weaver", "heart"]
Putting it Together
Next, I needed the code to actually do something. I wanted it to randomly pick a prefix and a suffix and stick them together. So, I did this:
Imported the random module. I do this so i can get random things.
Used to pick a random prefix from my prefixes list.
Used again to pick a random suffix from my suffixes list.
Then, I just added the two strings together, and bam, I had a fighter name!
import random
random_prefix = *(prefixes)
random_suffix = *(suffixes)
fighter_name = random_prefix + random_suffix
print(fighter_name)
Running and Tweaking
I ran the code, and it worked! The first name it gave me was something like “Iceweaver”. Pretty cool, right? I ran it a bunch more times, and I got a whole bunch of different names. Some were awesome, some were kinda weird, but that’s the fun of random stuff.
I realized I could make it even cooler by adding more prefixes and suffixes. So I spent some more time brainstorming and added a ton more words to my lists. The more words, the more combinations, the more unique names I could get!
That’s pretty much it! It’s a simple little program, but it’s fun to play with. I might add some more features later, like maybe letting the user choose how many parts the name should have, or maybe even adding a middle name or something. But for now, it’s a cool little name generator, and I’m happy with it.