Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
GUID stands for Globally Unique IDentifier, and may also be referred to as a UUID. It is a specially generated reference number used by many software companies, websites and applications to assign unique identifiers to objects and data. GUIDs are hexadecimal values following an 8-4-4-4-12 digit structure (for example
76c24f16-a260-46c2-b83f-eb6fd871a338). Due to the complex structure of a GUID, there exists roughly 2^122 or 5.3×10^36 variations.
There are several different algorithms used to generate GUIDs, but most of them include elements of uniqueness that help ensure that the chances of a GUID conflict are negligible. For example, they usually include a timestamp or MAC addresses in the algorithms which make the chances of a conflict even less likely.
How does this apply to OCTGN?
OCTGN uses the GUID standard in the game definitions to assign unique ID values to every game, set, card, booster package, and marker that exists in the game. This allows OCTGN to compile all of this data into a consistent database that uses GUIDs as index keys. It also allows OCTGN to locate card images that have been installed for the games.
Because of the indexing nature, it is VITALLY IMPORTANT that the GUIDs used are unique. A conflict between two or more GUIDs in the database could create unexpected results, ranging from images and card data from one game showing up in the next, to game crashes and unfixable game loading errors or a corrupt database.
The average OCTGN user could have upwards of 40,000 GUIDs in the game database at any one time.
There are many resources online that will generate GUIDs for you. Many of them include the proper algorithms that help ensure uniqueness, even when dealing with hundreds of GUIDs at a time. Microsoft has developed a standard practice and algorithm for GUID generating which is very useful if you know how to work with it. Many programming-based applications also have GUID generating features built-in.
- www.guidgenerator.com is a preferred website for many game developers as it can create many IDs at once.
- http://docs.oracle.com/javase/1.5.0/docs/api/java/util/UUID.html Allows you to generate proper GUIDs through Java
- http://en.wikipedia.org/wiki/GUID A handy wikipedia article explaining GUIDs