Permalink
Commits on Aug 23, 2017
  1. Add PanelEffect.ProjectileEffect, use in demo

    EverythingDemo now shows that monsters notice you by sending a red '!'
    from them to you as a basic projectile, limited to grid squares.
    tommyettinger committed Aug 23, 2017
  2. Add options for cone-like sectors in PanelEffect

    Also, GibberishEffect has methods to set the colors to purple-gray
    sparks or to fire-then-smoke, the docs have been improved, and the
    construction of the color float array is a little cleaner and more
    efficient.
    tommyettinger committed Aug 23, 2017
Commits on Aug 22, 2017
  1. Add variant on demo's biome code to -util

    The biome-gradient code should be useful in more places than just a
    demo. It may be a good next step to predefine the same colors the demo
    uses as named colors in SColor (in part because they're good natural
    colors, but mostly for use with world maps), and organize them in a
    palette that this can be used with.
    tommyettinger committed Aug 22, 2017
Commits on Aug 21, 2017
  1. Use custom approach for 4D WhirlingNoise

    No longer based on the shape used for 3D, now WhirlingNoise uses random
    unit vectors (possibly not uniformly distributed, but the results look
    good for seamless noise), pre-computed and stored in an array of 256
    4-element arrays for the vectors. This helps resolve some issues
    WhirlingNoise had in 4D but didn't in 3D.
    tommyettinger committed Aug 21, 2017
Commits on Aug 20, 2017
  1. Add FakeLanguageGen.ALIEN_I

    This one is maybe less "alien" than the others. It may be fitting for
    alternate-evolution-path humanoids, not completely-far-out-there aliens?
    It sometimes looks vaguely like Vietnamese mixed with Hebrew, but really
    favoring "l" and "r" sounds.
    tommyettinger committed Aug 20, 2017
  2. Adjust WhirlingNoise to use better gradients

    This has only been tested for 3D so far, in DetailedWorldMap(Writer and
    Demo), but 4D is affected as well. This seems to have somewhat better
    behavior regarding artificial-seeming straight lines in world maps,
    though it wasn't especially bad before, and has a cleaner (maybe also
    faster) implementation because the shape used has 32 vertices (a power
    of 2) instead of 92. The shapes tend to look more curvy and less regular
    here, so that's the main goal I was trying to obtain.
    tommyettinger committed Aug 20, 2017
Commits on Aug 19, 2017
  1. Add FakeLanguageGen.ALIEN_E

    This alien language works for alien species that lack lips (they may
    have beaks), since it avoids 'p', 'b', and 'm' sounds, but uses many
    kinds of click noises to make up for the missing phonological
    repertoire.  The idea here is to eventually have an ALIEN_ variant for
    A, E, I, O, and U, where the letter is the dominant vowel used more than
    any other.
    tommyettinger committed Aug 19, 2017
Commits on Aug 18, 2017
  1. Simple method of cave generation with CA

    This isn't the standard means of cellular automata cave gen, where the
    original state is made simply of randomly scattered walls, but instead
    it uses a room-and-corridor map from DungeonBoneGen and the other
    TilesetType code. This produces some rather complex layouts thanks to
    the TilesetType behavior, but should look very cave-like or organic.
    tommyettinger committed Aug 18, 2017
  2. Opts and fixes to Zone, GreasedRegion

    GreasedRegion.toArray() with no arguments would return an
    incorrectly-empty Object array every time; now it delegates to
    asCoords(). On the other hand, toArray with a T array argument wasn't
    assigning to the contents of the argument, and that's fixed now. There
    is now an overload of asCoords() that takes an existing Coord array; it
    will fill as much of it as it can and stop short if the array is too
    small. The existing asCoords() method now delegates to the new one,
    giving it a correctly-sized array for the full contents. There's some
    bounds checking in nth(). More (most?) Zone methods are implemented in
    GreasedRegion, with some simply being able to call existing methods, and
    some benefiting from more involved code (such as x(), which can avoid
    iterating over all points by taking advantage of the internal structure
    of the GreasedRegion). Zone.Skeleton now marks width and height as
    protected, not private, so they can potentially be used by subclasses
    (GreasedRegion may have a use for them, and can access them by
    super.width or super.height). Lots of docs added to Zone, specifying the
    8-way adjacency that some methods use (this is also in DungeonUtility
    for its border() method).
    
    Splash had an odd spelling mistake in two method names, one of which was
    protected and the other private. If you extend Splash and override
    "drunkinize", you should change it to "inebriate", which also means
    "become drunk." I'd prefer using "inebriate" because it doesn't make it
    look like the name refers to something the programmer is doing when they
    implement "drunkinize".
    tommyettinger committed Aug 18, 2017
  3. Merge pull request #183 from smelc/master

    Added the following methods to Zone: translate(Coord), translate(int,int), extend(), and getExternalBorder(). API change: replace use of Rectange.Impl::expand8Way by Zone::extend()
    tommyettinger committed on GitHub Aug 18, 2017
  4. Cave/dungeon mix with CellularAutomaton

    Just in a test, GreasedRegionTest, for now while I figure out how to
    make it available as lib code. It looks like
    https://gist.github.com/tommyettinger/0084da8a5adaa466508fd0fdf01b44ff
    in one example run.
    tommyettinger committed Aug 18, 2017
Commits on Aug 17, 2017
  1. Added the following methods to Zone: translate(Coord), translate(int,…

    … int), extend(), and getExternalBorder(). API change: replace use of Rectange.Impl::expand8Way by Zone::extend()
    smelc committed Aug 17, 2017
Commits on Aug 15, 2017
  1. Minor updates to make SparseLayers better

    Its glyphs weren't usable from outside, and probably should be for
    special rendering cases. There's a new method in SparseTextMap to render
    it with all one char, temporarily disregarding what was originally set,
    so alternate views can be used (solid blocks instead of letters being a
    simple example).
    tommyettinger committed Aug 15, 2017
Commits on Aug 14, 2017
  1. Tinkering with CosmicNumbering.

    Somewhat more-continuous results from it now, much less chaotic than
    before.
    tommyettinger committed Aug 14, 2017
Commits on Aug 13, 2017
  1. Improve SColor docs, close #182

    More than just the DB and CW colors were lacking consistent `@`
    colorization; there were cases like that in most parts of SColor. A new
    block of code in ColorTest generates docstrings that contain the name,
    RGB color code, hue, saturation, and value of each color, on top of
    fixing the issue with colorization and an unreported bug that may only
    affect IDEA, where the second row didn't appear because <p> isn't the
    same as <br>. The docstring writer is potentially extensible to produce
    more info if we need it, like giving red/green/blue as floats.
    tommyettinger committed Aug 13, 2017
Commits on Aug 12, 2017
  1. Fix some issues that happened on GWT

    All were related to reflection or other usage of .class , and only the
    most-recently-introduced ones happened in any code that would be
    expected to run (in SparseLayers, related to weird constructors in
    libGDX's Array and SnapshotArray that it needs to have the correct type
    for items -- or we can just use ArrayList and save the hassle and
    reflection cache junk).
    tommyettinger committed Aug 12, 2017
Commits on Aug 11, 2017
  1. Bunch of convenient methods in SparseLayers

    A bug was fixed in SparseLayers (width and height confusion in an
    infrequently-used section of put(char[][], Color[][]) ). Documentation
    is also better in SparseLayers, though it was good before. Also an
    addition to SquidColorCenter.rainbow() so it can set the opacity on the
    colors it makes (this isn't used currently, but was earlier in the
    development of this commit). SparseDemo has some other small
    improvements.
    tommyettinger committed Aug 11, 2017
Commits on Aug 10, 2017
  1. Improve SparseDemo by showing viewports and langs

    The big block of FakeLanguageGen.SentenceForm objcts is gone, replaced
    with a less verbose example using NaturalLanguageCipher and randomly
    selected languages from FakeLanguageGen (earlier added to BasicDemo2).
    The translations start with a passage from Sun Tzu's The Art of War, and
    translate it to various fake languages, showing the current text in a
    separate viewport below the main map.
    
    This also adds a method to SparseLayers that can clear a single
    foreground layer, and checks if the TextCellFactory the constructor is
    given has already been initialized (useful when two SparseLayers share a
    TextCellFactory and one has already initialized it).
    tommyettinger committed Aug 10, 2017
  2. Improve BasicDemo2, fix some bugs

    BasicDemo2 now uses a smaller block of code that's more
    technically-impressive (and educational) for the language stuff it does;
    now it shows 6 lines from Sun Tzu's The Art of War, then ciphers them
    using NaturalLanguageCipher into various randomly-selected fake
    languages.
    
    Bugs fixed: OrderedSet.toArray(), when passed a zero-length array, would
    not and (probably?) cannot resize the array on GWT, where GWT would use
    an internal section of code to accomplish the resize on its emulated JDK
    collections. So even though a zero-length array is faster on desktop and
    for JDK collections like ArrayList, we need to use a correctly-sized
    array with OrderedSet. There was a bug in StringKit.wrap() when passed
    non-ASCII words, such as text in the Greek alphabet; this stems from a
    bug in RegExodus but can be easily worked around in this case (I needed
    to change `(?=\\S)` to `(?!\\s)`, how much clearer could it get...
    grumble...).
    
    NaturalLanguageCipher now has an easier way to reset the whole cipher if
    the language or shift (used for dialects) needs to change. A small
    possible bug was fixed in its internal StatefulRandomness used to
    less-randomly generate words from similar initial words, with similarity
    gauged by a phonetic hash.
    tommyettinger committed Aug 10, 2017
Commits on Aug 9, 2017
  1. Add word wrap methods to StringKit.

    These use a very complex regex to work, but they seem to handle even
    very unusual text just fine (see StringKitTest). FakeLanguageGen now
    allows access to an array containing all FakeLanguageGen objects that
    were registered as "official," or at least hand-made in the code,
    versions. BasicDemo2 is being updated and improved.
    tommyettinger committed Aug 9, 2017
Commits on Aug 7, 2017
  1. Add wider Iosevka to assets; adjust distance field

    The new distance field fonts added are all Iosevka with 15% wider
    characters at the same consistent stroke weight, but come in slab-serif
    and sans-serif variants as well as light and regular-weight variants.
    They are all available in DefaultResources with "StretchableWide" in the
    name of the method. All distance field fonts (except MSDF) now have the
    shader take into consideration the vertical and horizontal stretch of
    the font when determining how much to sharpen or smooth the font's
    appearance; before they only considered horizontal stretch, which could
    cause the font to be blurry if it was mainly stretched vertically. The
    assets zip file has been updated.
    tommyettinger committed Aug 7, 2017
Commits on Aug 6, 2017
  1. Minor improvements to DungeonBoneGen, GreasedRegion

    DungeonBoneGen now produces less garbage in the form of temporary
    GreasedRegions. GreasedRegion now has some better checks for
    non-multiple-of-64-height regions in some constructors and refill()
    methods where it sometimes didn't truncate data beyond the max height.
    GreasedRegion also has a refill() method that reduces the need to use a
    constructor for temp data in some cases, as in DungeonBoneGen just now.
    tommyettinger committed Aug 6, 2017
  2. New features in GreasedRegion, docs in TilesetType

    CellularAutomaton also has its smoothing method fixed so it doesn't
    alternate off and on. DungeonBoneGen now allows access to the
    GreasedRegion that it uses internally, and will reuse this GreasedRegion
    between calls instead of trashing the old one each time generate() is
    called.
    tommyettinger committed Aug 6, 2017
Commits on Aug 5, 2017
  1. Fix in Radius. PanelEffect works on SparseLayers

    PanelEffect should still work without changes on SquidPanel as well,
    since it's been made to operate on a common interface,
    IPackedColorPanel, that both SquidPanel and SparseLayers implement.
    Radius had a bug on some distances where diagonally-adjacent cells
    weren't included in a large circular area; this should be fixed now.
    tommyettinger committed Aug 5, 2017
  2. Fix issue with WhirlingNoise in 3D/4D, demo Cosmic

    WhirlingNoise wasn't always producing numbers in-range for -1.0 to 1.0
    in 3D and possibly 4D, and this was probably the result of the shape it
    uses for its pseudo-random vectors being slightly larger than I
    expected; it's been shrunk down and the artifacts from too-high-or-low
    numbers are gone. CosmicNumbering is demonstrated as a noise function in
    HashVisualizer, though it isn't really a noise function in the
    traditional sense and doesn't act too well as one.
    tommyettinger committed Aug 5, 2017
Commits on Aug 4, 2017
  1. Add an alien language to FakeLangugeGen

    This commit also builds the docs for the first time in a while, so
    almost all of this commit will appear as changes in the documentation.
    tommyettinger committed Aug 4, 2017
Commits on Aug 3, 2017
  1. SparseLayers implements ISquidPanel; DOCS!

    Also, SparseDemo is very different from EverythingDemo, but SparseDemo
    also runs at roughly 1000 FPS on this laptop as opposed to about 50-60
    on EverythingDemo. So, I think the SparseLayers stuff is an improvement.
    tommyettinger committed Aug 3, 2017
Commits on Aug 2, 2017
  1. Tricky fixes to conical FOV

    This affects the previous commit, which didn't work on some angles, and
    also the earlier FOV method that used an angle and span. Both would
    sometimes consider no cells as seen when the angle was too close to
    certain values, like 0, for odd reasons probably related to math
    mistakes. They've both been tested on quite a lot of angles now, and
    seem to be correct. It's possible there are still bugs with span, but
    they would need to be brand-new, since span was fine before.
    tommyettinger committed Aug 2, 2017
Commits on Aug 1, 2017
  1. Various tweaks to get explosions round

    This involved a change that affects radius.pointsInside() when used with
    a CIRCLE or SPHERE value only, and should allow that method to produce a
    more round circle more of the time. PanelEffect.ExplosionEffect wasn't
    calculating the most distant cells of the explosion accurately, so parts
    were just getting truncated; now the FOV call it uses just has a larger
    radius by a half-cell.
    tommyettinger committed Aug 1, 2017