Releases: CoCoSol007/hexing
Hexing 0.3.0
📦 Release v0.3.0 - Layout Feature & More!
I am excited to announce the release of version 0.3.0 of the hexing library! This update introduces advanced features for managing hexagonal grids with our new Layout module. Designed for game developers and applications requiring complex hexagonal grids, this version brings several enhancements. Here's a summary of what’s new:
🚀 New Features
🌍 Layout Feature
The new Layout module provides sophisticated management of hexagonal grids using a HashMap structure. It facilitates the creation, manipulation, and storage of elements within hexagonal grids, optimizing data management in video game maps.
Key Features of HexLayout:
- Field of View (FOV): Determine which positions are visible from a given point, considering obstacles and range limitations.
- Pathfinding: Compute the shortest path between two positions using algorithms tailored for hexagonal grids.
- Movement Fields: Calculate which positions are reachable within a specified range from a starting position.
- Noise Maps: Generate and manipulate noise-based data for procedural content or simulations.
- Logical Operations: Perform logical operations on multiple hexagonal grids, such as AND, OR, and NOT operations.
🔥 Video Game Map Layouts
The layout allows for efficient organization of elements within video game maps, with specific examples for:
- Walls (or Obstacles): Optimized management for pathfinding, FOV, and Field of Movement (FOM) calculations.
- Biomes: Use
f64values to handle terrain variations generated by procedural noise for diverse and dynamic environments. - Players: Store specific information such as position, health, and inventory, facilitating player interaction and progression tracking.
🎓 Usage Examples
Detailed examples are provided to help you get started with HexLayout, covering basic functionalities as well as advanced features like FOV, pathfinding, and noise integration.
🛠️ Additional Utility Functions
- Bounding: A utility function for calculating the bounding box of a hexagonal grid.
📈 Compatibility with noise
We have added support for the noise crate, allowing for noise-based hexagonal maps for more dynamic and varied terrain. Check our documentation to see how to enable and use this feature.
🛠️ Update / Installation
To update your existing project:
cargo updateFor a new installation:
cargo add hexingHexing 0.2.0
Release Notes - hexing 0.2.0
Introduction
I am excited to announce the release of hexing version 0.2.0! This update brings significant improvements to the documentation and bug fixes. While this may be the last version we release, we are open to collaboration and welcome contributions from the community.
What's New in 0.2.0
Enhanced Documentation
- Comprehensive and detailed examples added to showcase the capabilities of the library.
- Clearer explanations of the main types and their usage.
- Additional comments and explanations for better understanding and ease of use.
Bug Fixe
Removed support for floating-point types in the Number trait. This prevents the creation of HexPosition instances with floating-point coordinates (e.g., HexPosition(1.9, 2.8)), which improves type conversion reliability and avoids absurd results in comparisons or calculations.
Current Features
- Hexagonal Coordinate Manipulation: Represent and manipulate positions in a hexagonal grid using axial coordinates.
- Distance Calculations: Compute the distance between two hexagonal positions.
- Pixel Coordinate Conversion: Convert hexagonal positions to pixel coordinates for graphical use.
- Reflection and Rotation: Apply reflection and rotation to hexagonal positions.
- Ring and Spiral Iterators: Obtain positions in a ring or spiral around a central position.
- Line Iterators: Obtain positions along a line between two hexagonal positions.
Known Limitations
While this version includes many improvements, I was not able to add pathfinding or field of view (FOV) functionality due to time constraints. These features are highly requested, and we encourage the community to contribute to their development.
Collaboration and Contribution
Although we may not continue to actively develop new features, I am open to collaboration. If you have ideas, improvements, or wish to implement pathfinding or FOV, please feel free to contribute. You can fork the repository, submit pull requests, or open issues to discuss new features and improvements.
Installation
To start using hexing, add it to your Cargo.toml:
[dependencies]
hexing = "0.2.0"Happy coding!


