• I created a Diablo 2 style item system and generator in Unity for a class project
  • This project was accepted into the AAU 2024 Spring Show

Demonstrates:

  • Familiarity with performance optimization in game development
  • Strong 3D math and algebra skills as they relate to game programming
  • Ability to build, refine, and customize tools to facilitate content creation
  • Ability to foresee future problems and make adjustments ahead of time
certificate Here are some screenshots that you can scroll through
normal_item superior_item magic_item rare_item unique_item set_item set_armor rare_amulet1 rare_amulet2 rare_belt unique_ring

These are the custom editor windows used to input data for the system to use

Scroll through these screenshots to see them. The first two are the left and right half of the item editor
item_editor_left item_editor_right affixes_editor
This is my poster for the presentation poster This is my video for the presentation

Weighted Randoms:

  • This project heavily utilizes weighted randoms throughout the project
  • Weighted randoms allow you to modify the chance that each element has of occurring for a more specific distribution
  • For most systems, each subsequent element has a 50% lower chance than the previous element
    • For example:
      • 3 is given a weight of 1 and has the highest chance of occurring
      • 2 is given a weight of 0.5 and has the next highest chance of occurring
      • 1 is given a weight of 0.25 and has the lowest chance of occurring

Items:

  • Each item has a chance to become a random quality based on what possibilities that base item has.
  • Some items have additional data to become a Unique or Set item
  • Superior Items have a 50/50 chance for one or two affixes:
    • Weapons:
      • First Affix: Enhanced Damage
      • Second Affix: 50% chance for Attack Rating or Enhanced Durability
    • Armor:
      • First Affix: Enhanced Defense
      • Second Affix: Enhanced Durability
  • Magic Items have a 50/50 chance for one or both affixes:
    • First Affix: Only a Prefix
    • Second Affix: Only a Suffix
  • Rare Items have:
    • Random amount of affixes between 2 and 6
    • Each affix has 50% chance to be a prefix or suffix
    • No more than 3 prefix or suffixes
  • Unique Items have:
    • Predetermined list of affixes
    • Each affix has a set value or randomizes within a range
  • Set Items have:
    • Affixes like Unique items
    • Additional affixes from the set piece for number of set pieces equipped
    • Additional affixes from the item set for number of set pieces equipped

Affixes:

Affixes are broken down like so: Affix Entries contain Affix Packages, which contain Affix Ranges

  • Each Affix Entry contains
    • Primary Affix
    • Secondary Affix
    • List of Affix Packages
  • Each Affix Package contains
    • Level Requirement of the package
    • Weight of the package
    • Affix Range of values for the primary and possible secondary affix
    • List of base items it can appear on (e.g. belt, bow, armor, or weapon)

Choosing Affixes for an Item:

  • Only 1 Affix Package per Affix Entry can be chosen when creating an item
  • The level requirement of the Affix Package must be less than or equal to the item level to be chosen

Primary and Secondary Affixes:

  • Affix Packages with a range are maintained as primary and secondary:
    • Minimum Damage and Maximum Damage
    • Fire Damage Minimum and Fire Damage Maximum
  • Affix packages with different primary and secondary are separated:
    • Attack Rating vs. Demons and Damage vs. Demons
    • Light Radius and Attack Rating
  • Affix packages with no secondary are added as-is

Adding Affixes to the Item:

  • Affix packages that are chosen to be added to the item are added to existing affixes of the same affix type before being added as new affixes
  • Once an item has been given its affixes, those affixes are sorted to be displayed properly
  • Affix architecture is set up to allow and number of item types, not just prefixes or suffixes

Data-Driven:

  • A major focus of this project was converting Items and Affixes to be entirely data-driven
  • This allowed for the data to be easily editable, but also necessitated creating custom editor windows
  • Data-driven elements:
    • Item list containing all data for all items
    • Affix list containing all data for all affixes
    • Item type map - detects item types and subtypes:
      • A Throwing Axe is a Thrown Weapon, but is also considered a Ranged Weapon and a Weapon
      • A Belt is its own type, but is also considered Armor
    • First and second names generated for rare items:
      • Fiend Branch
      • Cruel Cry
      • Wraith Band