![]() |
Nickname Generator 1.2.1
Gamer-style nickname generation for C++23
|
Requires C++23 (e.g.,
-std=c++23for GCC/Clang,/std:c++latestfor MSVC).
API Reference · Usage Guide · Releases
The library currently supports the following:
get_nickname(name, seed) for reproducible results, generator-level seed() / unseed() for deterministic sequences, and nickname::seed() for replaying a previous generation.has_wordlists() lets you verify resources loaded before generating.nng instances with their own word lists and random engine — ideal for embedding inside other generators. The classic instance() singleton is still available for convenience.nicknamegen.hpp is the single required file released here. You need to add
to the files you want to generate nicknames and set the necessary switches to enable C++23 (e.g., -std=c++23 for GCC and Clang).
Additionally you must supply the nickname generator with the resources folder also available in the release.
It's important to note that due to the necessity of supporting multiple cultures characters and the way std::string works on windows, this library uses std::wstring to return the generated nicknames.
When requesting a nickname for the first time the library will attempt to load the resource files containing each word list (the default path is ./resources). It's important to manually load the resources folder if it's present in a different location. The library will recursively iterate through all entries in the loading directory, so only a single call to the root folder containing the word lists is necessary.
For the complete feature guide — transforms, word lists, thread safety, and more — see the Usage Guide.
| Library | Description |
|---|---|
| name-generator | Culturally appropriate full names |
| birth-generator | Demographically plausible birthdays |
| biodata-generator | Procedural human physical characteristics |
| city-generator | Weighted city selection by population |
| country-generator | Weighted country selection by population |
| entity-generator | ECS-based entity generation |