Skip to content

Releases: Chris3606/GoRogue

v1.7.0

05 Jan 02:32
Compare
Choose a tag to compare

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
  • Added spatial map implementations (AdvancedSpatialMap, AdvancedMultiSpatialMap, etc.) that drop the requirement for type T to implement IHasID 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 in MapGeneration.QuickGenerators (see below).
    • COMPATIBILITY NOTE: Equivalent functions for the old Generate functions are now in the QuickGenerators class -- GenerateCellularAutomataMap for cellular automata, GenerateRandomRoomsMap for random rooms, and GenerateRectangleMap 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 the QuickGenerators 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 in MapGeneration.Generators.BasicRoomsGenerator
  • Updated version of priority queue library, which in some cases will result in better performance for pathing functions.

v1.6.2

10 Nov 18:42
Compare
Choose a tag to compare
  • Fixed bug with SpatialMaps that caused position values in arguments to ItemMoved event to be null.

v1.6.1

23 Oct 02:15
Compare
Choose a tag to compare
  • Modified ApplyOverlay to take the overlay as IMapView instead of ISettableMapView, since it does not set any values therein.

v1.6.0

23 Oct 00:16
Compare
Choose a tag to compare

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 as IMapView<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 to IMapView that return the item at a random position
  • Added RandomPosition overload specialized for HashSet, and an overload that takes arguments as params

Tweaks

  • Modified ISettableTranslationMap<T1, T2>.ApplyOverlay function to make it simply an ISettableMapView<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 have using GoRogue.MapViews (which is extremely unlikely given that any map views are also defined in that namespace), you will have to add that using statement to the file.
  • Modified radius parameter given to SenseSource instances and FOV.Calculate to be a double rather than an int,to properly support all Euclidean distances

v1.5.2

20 Oct 06:44
Compare
Choose a tag to compare
  • Add extension method for printing IMapView
  • Add proper ToString overloads to IMapView implementations

v1.5.1

20 Oct 00:30
Compare
Choose a tag to compare
  • Add Size() extension method to IMapView
  • Add additional methods of creating Rectangles (as per issue #45)

v1.5.0

01 Aug 00:09
Compare
Choose a tag to compare

New Features

  • Added an optimized FleeMap class, that can be attached to a GoalMap, 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 the GoalMap changes.
  • Added to AStar.ShortestPath an optional boolean parameter assumeEndpointsWalkable, defaulting to true. This will cause the algorithm to assume the start and end 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 the start and end points potentially being unwalkable, you will need to change your function call to specify false for this parameter.
  • Added read-only interfaces to many data structures in GoRogue, including FOV, SenseMap, MapArea, RadiusAreaProvider, and DisjointSet. 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 using RandomRoomsGenerator, you will likely need to change the order the parameters are specified in (not doing so will generate a compiler error).

v1.4.4

21 Jul 19:33
Compare
Choose a tag to compare

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

14 Jul 19:56
Compare
Choose a tag to compare
  • Refactored Rectangle to comply with discussion in issue #44 - see that issue for specific renames.

v1.4.2 - HOTFIX!

14 Jul 19:40
Compare
Choose a tag to compare
  • 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.