Releases: Chris3606/GoRogue
Releases · Chris3606/GoRogue
v1.7.0
New Features
- Implemented
LayeredSpatialMap
, simplifying the process of creating maps that have multiple layers of objects, and getting/masking operations by layer. - Implemented GameFramework namespace, containing a
GameObject
->Map
system that can act as a basis of a map structure, or an example for how to use GoRogue features in some other environment - Added Dungeon-Maze generation system (designed by Thraka in SadConsole) to GoRogue map generation.
- Added overloads for Get/Set functions in
TranslationMap
and variants that allow a user to have the context of the position corresponding to the type being translated. Functions taking only the type being translated (like were present previously), also exist, so this does NOT break backwards compatibility. - Added
GetDirectionOfMinValue
to goal-map variants that allows automatically retrieving the direction of the lowest neighbor of a position - Added the option to angle-restrict
SenseSource
instances (to create directional lights or sense sources)
Tweaks
- Modified the default RNG to account for current RNG bug by generating 3 values at creation.
- Modified spatial map implementations to allow non-unique IDs, since they are only used for hashing anyway and many non-unique implementations may be sufficient for this purpose.
- COMPATIBILITY NOTE: This has the side-effect of forcing type
T
for these to be reference types. If value-types are necessary, see advanced variations discussed below
- COMPATIBILITY NOTE: This has the side-effect of forcing type
- Added spatial map implementations (
AdvancedSpatialMap
,AdvancedMultiSpatialMap
, etc.) that drop the requirement for typeT
to implementIHasID
entirely, instead allowing you to specify your own hashing function. This variation also allows value-types. - Refactored map generation classes.
- COMPATIBILITY NOTE: While the changes seem extensive, in 90% of cases, it should be a simple matter of changing a call to a
Generate
function to a call to a function inMapGeneration.QuickGenerators
(see below). - COMPATIBILITY NOTE: Equivalent functions for the old
Generate
functions are now in theQuickGenerators
class --GenerateCellularAutomataMap
for cellular automata,GenerateRandomRoomsMap
for random rooms, andGenerateRectangleMap
for rectangle map- These functions do NOT have the
connectUsingDefault
flag. If something other than the default connection algorithm is required, see the source code for theQuickGenerators
function -- the area generation methods are now pulled into their own classes (see below) - Pulled out area generation from existing generators to their own class -- area gen from cellular automata is
MapGeneration.Generators.CellularAutomataAreaGenerator
, random rooms generation is inMapGeneration.Generators.BasicRoomsGenerator
- These functions do NOT have the
- COMPATIBILITY NOTE: While the changes seem extensive, in 90% of cases, it should be a simple matter of changing a call to a
- Updated version of priority queue library, which in some cases will result in better performance for pathing functions.
v1.6.2
v1.6.1
v1.6.0
New Features
- Implemented directional FOV for FOV class (sort of)
- Technically, this was already partially in thanks to a version control mistake, however the implementation was not complete previously
- FOV can take an angle and a span, and calculate FOV as a cone meeting the specified parameters.
- Added an additional parameter to FOV to take its
MapView
asIMapView<bool>
, to simplify the 90% of cases where the map is created with each cell either blocking FOV or not- Added BooleanFOV property to FOV to expose the result similarly as booleans (either visible or not)
- Added
RandomItem
extension methods toIMapView
that return the item at a random position - Added
RandomPosition
overload specialized forHashSet
, and an overload that takes arguments asparams
Tweaks
- Modified
ISettableTranslationMap<T1, T2>.ApplyOverlay
function to make it simply anISettableMapView<T>
extension.- Since the signature is the same, this should not cause backwards compatibility issues, however IF you are using
ApplyOverlay
currently in a .cs file that does not haveusing GoRogue.MapViews
(which is extremely unlikely given that any map views are also defined in that namespace), you will have to add thatusing
statement to the file.
- Since the signature is the same, this should not cause backwards compatibility issues, however IF you are using
- Modified
radius
parameter given toSenseSource
instances andFOV.Calculate
to be adouble
rather than anint
,to properly support all Euclidean distances
v1.5.2
v1.5.1
v1.5.0
New Features
- Added an optimized
FleeMap
class, that can be attached to aGoalMap
, and used to model "safety maps", as described by the roguebasin article on Dijkstra Maps (original FleeMap code courtesy of GitHub contributor masonwheeler).- Tweaked GoalMap interface to expose publicly the base map it is using.
- Added Updated event to
GoalMap
that fires each time theGoalMap
changes.
- Added to
AStar.ShortestPath
an optional boolean parameterassumeEndpointsWalkable
, defaulting totrue
. This will cause the algorithm to assume thestart
andend
points specified are walkable, regardless of what the walkability map actually reports- This can be very useful for pathing around objects that block (perhaps other monsters or some such), however may require a small tweak to calls of
AStar.ShortestPath
. Compatibility Fix If you have code that depends on thestart
andend
points potentially being unwalkable, you will need to change your function call to specifyfalse
for this parameter.
- This can be very useful for pathing around objects that block (perhaps other monsters or some such), however may require a small tweak to calls of
- Added read-only interfaces to many data structures in GoRogue, including
FOV
,SenseMap
,MapArea
,RadiusAreaProvider
, andDisjointSet
. This allows more easily safely exposing these types from a class, without risk of accidental modification.
Tweaks
- Modified order of parameters of
RandomRoomsGenerator
to take the (optional) custom RNG as the second parameter, rather than the last, to establish consistency across algorithms. Compatibility Fix If you have existing code usingRandomRoomsGenerator
, you will likely need to change the order the parameters are specified in (not doing so will generate a compiler error).
v1.4.4
Bugfix release pertaining to Rectangle:
- Rectangle constructor taking center and horizontal/vertical radius now constructs correct width/height
- Rectangle.SetSize now properly sets the height.
- Rectangle.Contains(Rectangle other) now returns proper values
- Documentation for Rectangle.Center now properly reflects rounding policy.
v1.4.3
v1.4.2 - HOTFIX!
- Hotfix for broken bounds checking in bounded rectangle -- bounds checking should now work on all edges, and with rectangles that do not start at 0,0.