@tommyettinger tommyettinger released this Sep 22, 2017 · 506 commits to master since this release

Assets 16

This release includes many changes since the last beta in February, probably too many to list here. Potentially of note are:

  • Better support for scrolling a camera to follow a character and center on that character in the text-based display.
  • New "sparse" rendering option for text-based display using SparseLayers, which is generally cleaner and requires fewer special cases than SquidPanel/SquidLayers; it doesn't use up any time trying to render cells that don't have anything in them (such as cells that have unknown contents)
    • This has excellent support for the aforementioned camera scroll
  • PanelEffect allows various "special effects" to be placed into either a SquidPanel or a SparseLayers, such as explosions
  • Various utilities for Simplex Noise and related types of coherent noise
  • World map generation algorithms that use the previously-mentioned noise to make landmasses and establish climate types for areas
    • Political maps can be generated as well
  • Dungeon map generators that produce better caves or unusual layouts for room-and-corridor maps
  • More assets in the accompanying .zip file, including the new font Iosevka (with several variants, including multiple slab-serif versions)
  • Distance field fonts are all rendered more cleanly now, and will resize to smaller sizes and look fine
  • Improved random number tools
    • ThrustRNG is a StatefulRandomness (meaning it can be given to StatefulRNG or RNG) that may become the default RandomnessSource at some point due to its high speed and optimal quality, while having rare features like skip()
    • CriticalRNG is an unusual subclass of RNG that can have a luck variable affect its results to be higher or lower than the normal limits for what a method is allowed to return; it may be useful for simulating some rare events that are affected by some "fortune" number
  • More serialization support, in and out of squidlib-extra
    • Many classes can be written to or read from Strings in squidlib-util, and more gain this ability in squidlib-extra
    • There is support for scrambling saved files in a reversible way to make it harder for players to tamper with save or read-only configuration files
  • StringKit supplies more ways to convert certain values to and from Strings, and also stores large Strings holding organized sections of the characters that can be reasonably used with the fonts in the display module
  • Many more languages in FakeLanguageGen, and more ways to manipulate them
  • Many more colors in SColor, including some that are named specially so they can be looked up conveniently
    • Documentation has also improved for all colors in SColor, with the hue, saturation, value, and RGB values all listed for each color
  • Improvements to SquidInput to allow remapping keyboard inputs to the inputs they should be handled as
  • GWT improvements; now that this uses libGDX 1.9.6 and GWT 2.8.0, much more of the JDK is available to use, and some code that can be optimized on GWT is given a special-case implementation using GWT's super-sourcing feature
    • NumberTools is the main example of this, and it takes advantage of JS Typed Arrays when on GWT to significantly speed up some conversions between double/float and int/long.

The main way of relying on this release should be either using SquidSetup (the JAR is in the downloads below) or via Maven Central. Existing Gradle, Maven, Leiningen, SBT, and other kinds of projects can depend on the releases on Maven Central with the instructions at that link. SquidSetup will handle creating a Gradle project and acts like the libGDX setup tool in that way, but includes SquidLib's assets and a sample project. If you want to manually manage your dependencies, JARs are provided below as well (this includes a dependency that all the other JARs need, RegExodus 0.1.9). regexodus is needed by squidlib-util (the core), which is needed by squidlib (the display module) and squidlib-extra (for serialization). Both squidlib and squidlib-extra depend on libGDX 1.9.6 .

I hope you find this release useful!

@tommyettinger tommyettinger released this Feb 23, 2017 · 841 commits to master since this release

Assets 18

This release has a lot of new features and some breaking changes relative to beta 6. It's recommended to upgrade if you used an older version; if you encounter bugs, please post an issue here on GitHub. Beta 7 had issues with a dependency that made it fail to compile on GWT, so now there's a new version of that dependency and a new version of SquidLib's beta. Otherwise, beta 8 is almost identical to beta 7, just with an additional bugfix in squidlib-extra and a small added class (LFSR, for generating random-seeming sequences that go through every number in their period except 0). So, the release notes aren't going to change either.

The biggest breaking change is probably the switch to our OrderedMap and OrderedSet classes instead of LinkedHashMap and LinkedHashSet, which allows some nice performance improvement on things like iteration, as well as constant-time lookup by index. That change can be adjusted in almost all cases by just doing a find/replace in your code from LinkedHash to Ordered and import squidpony.squidmath.OrderedMap; and/or import squidpony.squidmath.OrderedSet; as needed. Some methods have also been changed to be more lenient on what data structures they can take as parameters, so the change to OrderedSet sometimes isn't significant where code now takes a Set or Collection interface instead of a LinkedHashSet specifically. The second-biggest breaking change is that the default assets are no longer distributed inside the squidlib display module's jar, and you can download the assets separately if you want them (and since you only need the ones you use, the size of a distributed game should be smaller). The file assets.jar here and in the top-level directory of this repo has the full set of assets, and you can download files individually from the assets/ folder of this repo. The dependency on RegExodus is updated to 0.1.9, which has been fixed since 0.1.8's failure on GWT. The dependency on libGDX is 1.9.3, because 1.9.4 and 1.9.5 each have serious bugs that affect BitmapFonts and so affect our display a lot. LibGDX is not included in the dependencies here, but the current versions of RegExodus and BlazingChain (only needed for the optional squidlib-extra module) are provided here to avoid any hassle tracking them down.

For features, the squidlib-extra module is now available with serialization code that depends on libGDX but doesn't handle rendering, so it can be used in graphical games that use squidlib-util (or text-based ones that use squidlib) and want a good way to save and load certain data in a compact way (including on GWT). CustomDijkstraMap is an alternate way of handling pathfinding when the rules for adjacent cells are more complex than just (x,y) being next to (x+1,y), such as on some maps with thin walls, games with rotation within a cell, or possibly maps with elevation blocking movement between cells. A few demos are present to test it, for thin walls and rotation mainly. All of the pathfinding code has been seriously optimized. There's improvements to the text generation code. There's improvements to the text display code for variable-width fonts (thanks to @smelc and noticeable in Dungeon Mercenary). There's better color handling in the display module. The Zone interface helps bridge the gap between different ways of representing collections of points in a 2D area, with GreasedRegion implementing it and CoordPacker able to produce data that can be used with it. In general, most parts of the code have gotten some attention.

Feb 23, 2017
Finally, a new release: 3.0.0-b7

@tommyettinger tommyettinger released this May 30, 2016 · 1153 commits to master since this release

Assets 3

This is a small release that adds a few useful features, but is mainly being pushed out so close to b5 because it fixes a very annoying bug that affects the display module. If certain animations were started too close to each other in time, the counter for ongoing animations would get stuck above 0, and any game logic that waited for animations to finish would continue to wait forever (effectively freezing games that did that waiting behavior, including EverythingDemo in SquidLib itself). This is already uploaded to Maven Central, so games that don't need the new assets can simply change "3.0.0-b5" to "3.0.0-b6" in their dependencies.

New features include:

  • MimicFill, a port of the amazing ConvChain library in C# to Java that's integrated with SquidLib's conventions
  • GapShuffler, a nice way to shuffle mid-sized sequences without the same item appearing twice in a short span of the sequence. It's used by...
  • Thesaurus, which can be handy for procedurally generating varied passages of text, or thematic names of groups like "Glorious Blaçeglè Dynasty." It only needs a set of words it knows synonyms for, or special keywords that will get replaced by one of a list (shuffled by GapShuffler to ensure a word doesn't appear too often in a "clump").
  • Maker, a very simple class that provides convenience methods for constructing cumbersome classes from Java's standard lib with one method call. It can construct LinkedHashMap, ArrayList, and LinkedHashSet currently because those 3 showed up the most within SquidLib.
  • Various improvements to LinesPanel, including a general cleanup of the API, top-to-bottom and bottom-to-top modes of placement, and text wrapping.
  • Improvements to various color-related things, including ColoredStringList being added to -util and IColorCenter (plus its two implementations, one being SquidColorCenter in the display module) gaining methods to adjust saturation ("greify"-ing a color or making it more vivid) and interpolate between colors. SquidColorCenter also has a way to generate a very-non-linear gradient between two colors that can make many variations along the way, zigzagGradient().
  • Region, a simplified wrapper around the functionality of CoordPacker. It is usable now but should continue to gain features on an ongoing basis.
  • FOV can now mix FOV maps more easily, which can be useful if lighting a distant area using an FOV map. This is able to limit the visible area to the area inside one "LOS map" (just a very-high-radius FOV map) where someone like the player can actually see a distant light.
  • Various improvements to FakeLanguageGen, including better handling of modifiers (not all-or-nothing in each word anymore), changes to how Imitation Hindi is romanized, and the new Imitation Arabic (along with a recommended modifier that simplifies the generated Arabic so it is more pronounceable in general, though it probably changes some sounds from what would be more authentic).
  • Small additions to LanguageCipher so you can choose not to store different dictionaries if memory is a concern. It also won't duplicate existing words by default (though it needs to store a reverse dictionary), which allows the deciphering to be much more reliable.
  • All variants of RNG and RandomnessSource can be copied using copy(), with the expected behavior for all but ChaosRNG (which shouldn't allow copying to prevent possible prediction).
  • Icons from http://game-icons.net have been added to the assets directory here and to SquidSetup's default group of assets, with a distance field effect added that will make them usable and resizable in conjunction with the various "stretchable" fonts in DefaultResources. These are CC-BY licensed, so if you use them, you should respect the license supplied with them (either here or with SquidSetup's generated projects).
  • LibGDX and RegExodus versions updated to 1.9.3 and 0.1.5, respectively. If you need the jars for RegExodus, they're here .

So, I hope this comes in handy; there were other bugs fixed as well but only one was as serious as the one already mentioned (a long-standing problem where DijkstraMap would throw ArrayIndexOutOfBoundsExceptions with maps not sealed by walls all around).

@tommyettinger tommyettinger released this May 8, 2016 · 1180 commits to master since this release

Assets 5

SquidLib 3.0.0 beta 5 has many new features that were previously only available via a snapshot through JitPack. (It's the same as beta 4 but has a needed fix, so there's no need to provide a release for beta 4). The actual list of features is too much to reasonably post here, but the most important things to note are:

  • HTML works as a target.
  • There is now a small dependency on RegExodus to allow regular expressions to work on HTML without incurring compatibility problems.
  • There's a lot of dungeon generation features added. Just, a lot.
  • There's a good amount of math-related stuff added, including several more RandomnessSource implementations.
  • There's some nice improvements to display code, including support for variable-width fonts.

Attached are SquidSetup for this version and the standalone downloads of assets (you only might need one of the two assets archives) in case you are setting up without SquidSetup (possibly using a non-Java language). SquidSetup is still recommended here.

@tommyettinger tommyettinger released this Feb 5, 2016 · 540 commits to b5fe18c541e100b91349e7b2d48f995ff034ad17 since this release

Assets 3

The only download for this release is SquidSetup.jar, updated for the current version, because setting up the dependencies manually would be very difficult given that LibGDX doesn't actually provide jar downloads for recent versions on their site any more (encouraging the setup tool that SquidSetup is based on).

API CHANGES: Swing is no longer supported; this is not a change from beta 2. The squidlib module that previously referred to Swing display now refers to LibGDX display, though the API is very similar. Any references in 3.0.0-b1 to squidlib-gdx should be changed to squidlib; 3.0.0-b2 shouldn't have any major changes.

We now support HTML via GWT, though this is still pretty preliminary and large parts of the library haven't been tested for compatibility. Things that are known to be incompatible have an annotation that marks them as such, @GWTIncompatible.

There are some minor API changes, mainly related to GWT compatibility, but you should also expect anything relying on an RNG seed to produce different values. An RNG is able to get more random bits from a generator now if the generator can efficiently generate 64-bit random values instead of just 32-bit ones (the limit for java.util.Random), and this seems to position LightRNG (and due to a change in defaults, any RNG objects that don't specify a RandomnessSource) as roughly 20 times faster generating 64-bit long or double values when compared to java.util.Random . The zoomable fonts (20-something BitmapFonts at different zooms that may or may not have been in beta 2) are not present in this release, which makes the jar size smaller than versions that had them (they may have been added between beta 2 and 3, but they are obsolete now that we have distance field fonts that can scale extremely well).

Some code relates to values that have positions and can reason about the positions in ways that more general code can't. A few features relating to this positional code have been added, including:

RoomFinder uses the magic of CoordPacker internally to find thin areas (corridors), thicker areas (rooms), and connections between them. It returns all of this as char[][] data, so it should be fine to use even if you don't want to learn the ins and outs of CoordPacker.

SpatialMap provides a common data structure in games; a collection of values of a generic type that can be indexed by an identity key (also generic, so far this is just like a HashMap) or a Coord key, with either key referring to the same value, and additions or removals working on both keys and the value as one entry.

RegionMap provides a different, less common data structure; it allows you to take packed data from CoordPacker that refers to a region and use it as a key in a Map-like data structure (HashMap does not allow this by default). RegionMap is meant to be useful when there are overlapping regions and you want to take a point and find all the regions that contain that point, or all the values for which those regions are keys. It is used internally by RoomFinder.

Some big improvements to fonts are present; Inconsolata LGC is now available as a distance field font, including versions with narrow and square proportions, and should resize smoothly to many sizes, which helps Android file size immensely. It also supports a huge range of characters and looks good, usually (it may need a slight increment to TextCellFactory height to make vertical lines continuous; this is done in the example code produced by SquidSetup).

CoordPacker has had yet more useful additions and bugfixes, including counterparts to fringe and expand that get the inner edge (surface) or remove that edge (retract). There's a family of operations that expand from a region outward, including a floodfill that can be handy for finding contiguous regions up to a limit, semi-FOV-like radiating expansions from a series of points (useful for finding regions when an effect can't go around walls), and a method that finds all the cells that are reachable with a specific attack pattern from a group of starting cells.

There's more "fake language" text generation that appears to be something a character can't read and imitates an existing language. Now it can mix languages and has more to choose from for mixing, including English and romanized Japanese.

There's a MonsterGen class that can randomly generate monster descriptions, and should be easy enough to work with to assign abilities as your game understands them when specific Strings are generated. It, like FakeLanguageGen, can mix the things it generates.

There's some new LOS techniques, including some that are more useful as lines of something other than sight. OrthoLine draws lines using only North/South/East/West movement, and DDALine should be rather fast. There's also a LOS type that draws a wide line (using DDALine), useful for brush-like thick strokes.

DeckRNG is new, and may be handy in making a game seem less truly random. It "shuffles a deck" of 16 low to high values, randomly modifies them only slightly, and "draws" one random value at a time, "reshuffling" when all have been used. Thus, every total of 16 consecutive random values should add up to approximately the same number.

@smelc had a big hand in this release, adding a lot of classes to the display side that should help with compatibility for mobile and HTML targets, as well as just generally handy things like multicolored, justified, and/or wrapped text in IColoredString. ScreenSizeManager, IPanelBuilder, SquidApplicationAdapter, and more in the gdx package should help with mobile development or when screen sizes are not predictable. Some of these classes are still being updated to use distance field fonts as of this release, but they should be more capable of resizing fluidly with distance field fonts by 3.0.0 final. Splash, a simple alternative to the existing Spill class, is also a smelc creation. As if that isn't enough, HTML support is also pretty much all thanks to him, so go play Dungeon Mercenary! 😄

SquidSetup should download the latest SquidLib and libGDX (if you use it) the first time you configure a new project with the jar. Any issues you find (this is a beta, I'm sure there are issues) are 100% welcome on the Github Issues page.

@tommyettinger tommyettinger released this Dec 14, 2015 · 466 commits to 8265654f3b5425da901ed1ed0981d5b46d2f754e since this release

Assets 3

IMPORTANT: Starting with this release, this page will no longer host individual jars. It's too difficult for a user to download the dependencies of SquidLib and LibGDX by hand (in fact, LibGDX no longer provides links on their site to their most recent individual jars), but there is a convenient alternative! Try out SquidSetup, which is based on LibGDX's successful setup tool and creates a Gradle project (or a project meant for your choice of IDE) with all the dependency and multi-platform trickiness handled automatically. The one JAR posted on this release is the SquidSetup runnable JAR, tailored for this version. Instructions for how to use SquidSetup, if you need them, are available at SquidSetup's repo. If you still want the individual JARs, the Maven Central site offers jars at the bottom of each page for a version of a module (click 3.0.0-b2 for squidlib or squidlib-util to get the jars if you must, but then you would need to do the same for quite a few LibGDX JARs...).

API CHANGES: Swing support has been dropped from this version. The squidlib module that previously referred to Swing display now refers to LibGDX display, though the API is very similar. Any references in 3.0.0-b1 to squidlib-gdx should be changed to squidlib. There may be other minor API changes, post an issue if something breaks and I can update this list.

This release fixes a number of issues with beta 1, chief among them a Maven issue that caused builds targeting Android to still include the desktop-only LWJGL library, and a (probable) resource issue that made CoordPacker and anything that used it have very strange logic bugs, unpredictably and mainly encountered only on larger maps. Both issues have been fixed and will result in smaller distributable games (the problematic resources that CoordPacker previously loaded have been removed and a different technique accomplishes the same goal without bugs). If you are handling the dependencies yourself, the change to the dependency on LWJGL means that you should add additional dependencies based on what platform you target. Which dependencies? This is covered by the README.md on the front page of the repo or in the root directory. On top of those two fixes:

  • Lots of new dungeon generation features have been added, including:
    • Grass and boulders can be added in varying amounts with DungeonGenerator, and water has both shallow and deep variants; you can ensure a safe path across deep water if you want by telling the generator to place islands at fixed intervals using Poisson disk sampling internally.
    • MixedGenerator can make dungeon levels that include both caves and worked-stone rooms in the proportions you specify.
    • SerpentMapGenerator makes a long winding path that loops around on itself but typically requires the player to encounter many rooms as he/she seeks the next staircase or item, and makes use of MixedGenerator to lay out its rooms (which means you can make it use caves, worked rooms, or both).
    • SymmetryDungeonGenerator makes a random dungeon meant to be more fair for multi-player or other evenly-matched games, that carves out two identical, interlocking sections of dungeon in a sort of "yin-yang" pattern. It also uses MixedGenerator.
    • Multi-level dungeons made by SerpentDeepMapGenerator that guarantee connectivity between all rooms, if you move up and down stairs to get to some of them. It has most of the features of SerpentMapGenerator, such as the looping back on itself and use of MixedGenerator, plus additional quirks because of its multi-level nature.
  • In the squidai package, the newly-added ZOI (Zone Of Influence) and WaypointPathfinder classes each provide potentially handy tools for common tasks.
    • ZOI can be used to establish conflicting territory for groups of monsters or for some effect the player character(s) are responsible for, and in essence, it lets a creature know what territory it's in, and how to get to a specific kind of territory.
    • WaypointPathfinder promises a speedup on long paths throughout the dungeon to close approximations of goal areas (like guards rushing to investigate a distant explosion when the player's Fireball spell goes off). It works best with dungeons that weren't made by DungeonBoneGen (so any of the new map generators based on MixedGenerator).
  • In the GDX display code:
    • Color filters let you request one color and procedurally modify it, with effects like oversaturating or desaturating all colors, making all colors hue-rotate closer to certain "emphasized" colors, sepia-tone effects, or even a psychedelic effect that changes all colors every frame to a slightly different bright color.
    • Colored strings are a nice way to mix in highlights to strings that should logically have multiple colors, and without needing to be split up into multiple sections by the programmer.
    • Some improvements to fonts are present; Inconsolata LGC has been edited and used to generate LibGDX-friendly bitmap fonts that support Latin, Greek, Cyrillic, lots of symbols, and looks smooth to boot! It's available to all games that use the GDX module using DefaultResources.getSmoothFont() or DefaultResource.getLargeSmoothFont().
  • CoordPacker has had multiple useful additions and bugfixes that make it more practical to use, especially the randomPortion() and singleRandom() methods that have found uses all over the internals of SquidLib.
  • There's new "fake language" text generation that appears to be something a character can't read and imitates an existing language. From Lovecraft-esque ramblings like, "Cthush altikaikh hmulta!" to imitation Greek like, "Ψυιλασ αλορ; αιπεομαρτα λε λιασπα...", it can generate a lot by default and can be customized to fit your own needs.

So download SquidSetup and give it a try! Android in particular needs further user input, and any issues you find (this is a beta, I'm sure there are issues) are 100% welcome on the Github Issues page.

@tommyettinger tommyettinger released this Oct 20, 2015 · 1467 commits to master since this release

Assets 11

This is both the first beta release of the 3.0.0 series and the last release of SquidLib to support Swing. You should strongly prefer using Maven, Gradle, or whatever dependency manager you prefer to acquire SquidLib now (see the main page of this repo for instructions), since the release is no longer a monolithic .jar , and is split into various sub-components, some of which have their own dependencies. Use the squidlib-util jars on their own for games where you don't need a text-grid renderer, and probably are handling rendering in your own way. Use the squidlib jars to use the Swing renderer. You are advised to not use the squidlib-gdx jars from this page, and instead use a dependency manager to download them, but regardless of how you acquire that module, it will render with libGDX and should be faster to render and respond than Swing.
As for dependencies, each module has its own needs, and the simplest way to link to the jar, javadoc jar, and sources jar for non-SquidLib dependencies is to link to Maven Central, which has links to those files at the bottom of the page. So, squidlib-util depends on GSON 2.3.1, squidlib depends on squidlib-util (so you need to download that and GSON too), and squidlib-gdx depends on libGDX 1.7.0 (which has several dependencies, does not provide a release for 1.7.0 on their site, and their team very much encourages library users to use Gradle or Maven with libGDX) and squidlib-util (so again, you would need to download that and GSON). If you do use squidlib-gdx without a dependency manager, you need GDX Core, the GDX LWJGL Backend, and the GDX Platform Native Libraries, you specifically need gdx-platform-1.7.0-natives-desktop.jar. Those may have dependencies of their own, and no one developing SquidLib has tested building SquidLib's GDX renderer without Maven or Gradle, so PLEASE use Maven, Gradle, SBT, Leiningen, or some sort of tool to handle this without so much headache!

@tommyettinger tommyettinger released this Sep 6, 2015 · 1586 commits to master since this release

Assets 5

This small release fixes a number of annoying bugs present in 2.9.0, with significant help from those who posted issues and pull requests -- thank you! It should maintain backwards compatibility in all classes except SquidMouse, where a few return types changed to match the now-correct behavior of using floats for sizes.

@tommyettinger tommyettinger released this Aug 14, 2015 · 1609 commits to master since this release

Assets 5

SquidLib 2.9.0 is out! LibGDX is back as an optional dependency! In all honesty I have no idea how these JARs, which were generated by Maven, will treat LibGDX -- will they respect the Maven setting of LibGDX being optional, or will they require it to build? I am not sure, but if you have trouble using these I recommend at least trying to use the Maven dependency (which is similar in Gradle, SBT, or Leiningen). SquidAI is also new in this version, and constitutes the majority of the work put into this release.