Iron Arachne

Updates and news about Iron Arachne

Data Core's alpha is online and I'm very pleased with it so far. Once it's ready for use, I'll publish the link here so curious folks can check it out.

As I've been developing it, I've noticed a few things that using it will allow me to change in the World API. For example, it will let me set up a faster search system, as well as a way to set up relationships between tags that's both performant and useful.

A Dedicated Database

The databases for Data Core, Iron Arachne, and the Iron Arachne Blog are all now hosted on a dedicated database server provided by Digital Ocean. That means my monthly cost to run IA has increased by $30, but the speed boost and the ease of management is well worth it.

At some point I might consider setting up paid memberships with additional features to help defray that cost, but for the time being I'm happy to continue paying it myself.

There are several updates in the works for Iron Arachne. The most important one is that I'm writing a new application I'm calling Data Core that will allow me to modify the data used for generation in real time. At the moment, all data used by the world API is stored in JSON files and baked into each release. Data Core will provide a data API that the world API server will reference instead. It will also let me add things like new plants or animals much faster.

After Data Core is launched, I plan on working on new options for the heraldry generator. You will be able to search for charges by tag, and possibly also specify the division of the field and the tinctures used. It should be possible to have more control over what's generated, while still allowing for completely random coats of arms.

A user from Turkey reported that his creations (specifically, heraldry) were missing. I checked into it, and turns out the last server reset revealed a bug in how I was handling caching.

That bug is now squashed. Heraldry, regions, and cultures that seemed to be missing are now back.

There are still some other bugs that cause errors in region and culture generation. If you see a server error page, that's probably why. Just try again for now.

For the first time in years, a new quick generator has been released. The Cyberpunk Chop Shop generator is meant to give a little narrative boost to the creative process in setting up a back alley cybernetics clinic. I created it as part of the April 2020 Cyberpunk Challenge for the r/rpg_generators subreddit.

Unlike the other quick generators, it uses pure JavaScript, with no calls to backend services. I may write more of these in the future.

Previously, most subsystems of the World API that powers the Iron Arachne website used a “climate” subsystem as a foundation. If you generated a culture, for example, the first thing the API would do is generate a “climate” and then proceed to build the culture's traits based on that.

There were a few problems with this approach. First, I was conflating climate, biome, and geography into a single concept. Second, it meant that anything that relied on a piece of the climate had to rely on the entire climate subsystem.

Now, that subsystem has been removed and replaced with four separate subsystems: geography, climate, biome, and seasons. Geography refers to the physical traits of a particular location – distance from the equator, distance and direction to the nearest mountains, distance and direction to the nearest ocean, altitude, temperature, and humidity. Once a geography is generated, it's used to generate a climate. A climate refers to the cloud cover, wind speed, and wind direction for an area. Once a climate is generated, then a biome is generated from both it and the geography. A biome determines what fauna and flora live in a particular area, and has a name like “temperate deciduous forest” or “tropical rainforest.” Seasons are generated last based on the climate and geography, and round out the set.

Once all of that is generated, then it's collected into a “geographic region” and animals and vegetation are generated. The geographic region is what is now used to generate a culture or a region.

This work is important conceptually and lays the foundation for generating a full world. However, you won't see much difference in the Iron Arachne website at first.

Side Effect #1: Music Style

The first side effect of this change was that the music subsystem broke. Musical instruments were the primary output of this system, and they relied on climate in a way that was old and “smelled bad” from a programming perspective. So, I threw it out and rewrote it from scratch. Instead of generating instruments, it generates a style of music. I did some basic research on musical theory and culture variations in music in order to build this system. I learned in the process that there is way more to musical theory than I ever suspected, and it delves into areas of science as well as art.

Side Effect #2: Food and Drink

Food and drink styles for cultures also broke. This was a more insidious problem, though, as it revealed inadequacies in how plants and animals were populated for a region. I fixed the issues with food and drink so that the site would function again, but I really need to add a lot more plants and animals to the database used to generate regions. There just aren't enough in the system yet. This is a data entry problem and just requires time.

Next Steps

I'm working on adding more plants and animals to the database. This is a bit tedious, but it also includes doing research on various species, which is turning out to be fascinating.

After that, I will be working on something much more visible to users: the map system. I have a hard time wrapping my head around the math required to generate decent-looking maps, but it's time to slay this ogre.

Yes, you read that right. There are now 192 possible charges in the heraldry generator. Also, I added a system on the back end for finding charges by tag, so in the future there's going to be the possibility to specify not just shield shape but also a general category of charge that you want to have for your heraldry.

Here are some coats of arms that have been generated with the new charges:

Per bend sable and purpure, a merman Or

Per bend sable and purpure, a merman Or

Quarterly azure and gules, three pestals argent

Quarterly azure and gules, three pestals argent

Purpure, a unicorn argent

Purpure, a unicorn argent

Server upgrade

In addition, I doubled the CPU and RAM for the server powering this site. This will help alleviate some of the random crashes you may have seen while generating things.

After a ton of work, the User Account update is live on the site!

You can now register an account for Iron Arachne. When you're logged in, any cultures, regions, or heraldry you generate will be linked to your account. You don't have to be logged in to use the site, though.

The most recent creations are listed on each subsection. Also, if you have an account, you can see all of your creations on a personal dashboard.

In addition, this blog's content now appears on the front page of the Iron Arachne website, so you no longer need to go to a separate site to see it.

More content-oriented updates are on the horizon now that this feature rollout is complete!

2019 has been an interesting year for Iron Arachne. It saw a major rewrite of the heraldry generator, a TON of updates to the culture and climate generators, and a lot of fleshing out of details. Since the world repository was created in April of this year, it's seen just under 97,000 lines of code added, 61,000 lines of code deleted, and about 250 commits. Four people other than myself contributed code during Hacktoberfest.

The biggest milestone for the site this year was the incorporation of the heraldry generator into Azgaar's Fantasy Map Generator, which significantly boosted traffic to the site. Having such a big injection of traffic exposed several problems with the site that I've been steadily working to fix. Some of these problems are trickier than others, such as a memory leak that I have yet to track down.

2020 is going to see some major changes to Iron Arachne. I'm working on adding user accounts to the site so that people can save results permanently. At the moment, the only saving that happens is the writing of image files and the caching of data. That data cache is wiped out every time I need to restart the server hosting the site.

I'm also going to rewrite the front end website in Crystal. I'm curious about Crystal and excited about the advantages it would bring over PHP. A new design for the site is also in the works. That should launch sometime in the middle of the year next year, unless something changes.

That's it for now. See you in the new decade!

Several generous souls are working on updates to the world project as part of the Hacktoberfest coding event.

I’m holding off on several major updates while they complete their efforts. They’ll be adding several new weapon templates, refactoring the animal package, and adding diversity to ages of members in organizations.

The big updates that I’ll be working on in November and December are huge. The biggest change is the addition of the ability to save and edit all generated results. This will require a ton of work, since there is no authentication or database right now. I hope this will be done by the end of the year, but with holidays coming up, it’s going to be difficult.

The second big update is to culture generation. I’m going to be adding a lot of new detail to cultures, as well as swapping out specific items (like in the musical instrument list) with general styles.

I’ll also be updating this blog more frequently to improve communication of changes. Stay tuned!

Over the past two months, I've been working on rewriting the heraldry generator completely from scratch. I discarded all of the original code, including all of the SVG charge definitions, and started over.

I applied two years' worth of learning how to write better Go code and how to write better generators. I also converted the entire world project to use the new Go 1.13 error wrapping pattern, but I won't go into that here. Let's look at the changes in the generator's function and output.

Fewer Restrictions

The new heraldry generator doesn't have the restrictions of the original one. In the original, furs – that is, patterns like erminois that could take the place of colors or metals in fields – would only be used for the first part of a field, and never the second. No one ever noticed this, as far as I'm aware, but it was a problem nonetheless. Also, the original generator could only handle one iteration. It would never be capable of marshaling, which is when one coat of arms is included in another as a component. The new one is, though it doesn't currently generate marshaled arms. Also, there were a few technical headaches with the old one – like passing image data – that are no longer present in the new one.

New Charges

The new generator also makes it significantly easier to add new charges. At its peak, the original generator had 73 charges. The new one currently has 68, but the source I'm using for new charges – Heraldic Clip Art – has over 3,000 potential ones I can import.

Per bend azure and Or, two tigers passant argent

The above is an example of one of the new charges.

New Shield Shapes

Also, the new generator has four possible shield shapes instead of the original one, and it's possible to tell the generator which one you want. Here are the new shapes:

Per fess purpure and Or, an ape Or

Engrailed

Per bend azure and vert, three unicorns rampant argent

Banner

Per bend sinister purpure and sable, an ape argent

Wedge

PNG Output and Permanent Image URLs

Finally, the new generator no longer returns SVG as a string, expecting some other system to cache that for awhile. Now, it generates a PNG image of the heraldry, and saves it to Digital Ocean Spaces, where it will remain forever as a real file. If you bookmark that image URL, it will always be present. You can also save the image, and many more things like PNGs than they do SVGs.

Previously, it was possible for the caching system Redis to forget your heraldry, at which point it was unrecoverable and the URL to it would no longer work.

Release and Future Work

The new generator is currently on the Iron Arachne dev site. It will be live on the normal site at the end of September.

In the immediate future, I'll be adding more charges to the generator. I hope to have somewhere around 300 in the system before the end of 2019. I also want to make use of the new tagging system that's in place to allow people to generate heraldry by searching for keywords. For example, if you wanted heraldry appropriate for a coastal city, you could in the future search for “navy” or “ocean” and get only charges that fit that. In addition, I want to change the generator web site so that it has more options, like shield shape, charge tags, preferred tinctures, and so on. That last part will take longer to implement and may end up releasing in 2020.