Introducing the Open Unit Interval (OI) Number Library

Hi everyone,

I’m excited to share a new tool I’ve been working on: the Open Unit Interval (OI) Mathematics Library. At its core, this library is just a wrapper for some proven concepts around bounded numbers and gradual progression, but the implications of applying these concepts could be quite powerful. It’s designed for use in both Unreal Engine (C++) and Unity (C#), providing a consistent way to represent and manipulate values strictly within the open interval (0, 1) . The goal is to model properties such as growth, skill levels, or resource availability in a balanced, naturally constrained way.

What Does the OI Mathematics Library Do?

The OI Mathematics Library provides simple tools to help developers manage values that evolve realistically without going out of control. By combining these tools with procedural techniques, such as using dynamic fields as inputs for distribution, you can create rich, evolving properties that feel both organic and consistent, all while staying within the bounds of (0, 1) . It includes functions for scaling, growth, decay, and inversion, all while keeping values within the safe bounds of (0, 1) .

Key Features

  • Bounded Growth and Decay: Functions like Grow and Decay ensure that values are always evolving within realistic limits, avoiding runaway effects or overpowered outcomes.
  • Quantum Distribution Function: A weighted random generator that incorporates expectations, confidence levels, and scale to generate probabilistic OI values. This is especially useful for simulating randomness in a controlled, non-linear fashion.
  • Procedural Content Support: The library provides a consistent framework to model attributes used in procedural generation. Whether you’re working on crafting quality, skill progression, or environmental effects, the OI Mathematics Library provides predictable, stable evolution without crossing boundaries.

Why Use OI Numbers?

Traditional systems often suffer from arbitrary scaling and unbounded growth, which can lead to imbalance and unrealistic values. OI Mathematics addresses these problems by:

  • Keeping all values within the open interval (0, 1) , ensuring they remain balanced and stable.
  • Promoting emergent behaviors that evolve organically, without relying on hard-coded limits or extreme values.
  • Providing a flexible framework for probabilistic outcomes and procedural content that remains realistic and consistent.

Example Use Cases

  • Game Development: Model skill progression, crafting quality, or resource availability in a way that feels natural and evolves without reaching unrealistic extremes.
  • Simulations: Represent population dynamics, environmental changes, or resource management in a stable and naturally bounded manner.

Get Started

The OI Mathematics Library is available on GitHub under the MIT License. It includes full guides and examples for both Unreal (C++) and Unity (C#).

Feel free to share your feedback or questions. If this resonates with your needs or you’d like to explore the library further, I’d love to hear from you!

Thanks for your time, and happy coding!

1 Like