jnickg / dungen-core

.NET Core implementation of DunGen
GNU General Public License v2.0
0 stars 0 forks source link

Support animated GIFs for sample dungeons #48

Closed jnickg closed 3 years ago

jnickg commented 3 years ago

Overview

Fixes #47. Support animated GIFs for sample dungeons.

This PR merges changes to DunGen as well as DunGen.Site. The first, to improve how callbacks are used. The second, to grab images via callback, and create a GIF from step-by-step images.

Considerations & Notes

Commit Summary

* Use Magick.NET to generated animated GIFs of step-by-step dungeon
  generation
  * This _will_ require a change to the Dockerfile, because the alpine
    container we use doesn't contain `glibc` by default and that's
    needed by Magick.NET.
    See: https://github.com/dlemstra/Magick.NET/blob/master/docs/CrossPlatform.md
* Update algorithms to make better use of attached callbacks. Composite
  and Strategy-pattern algorithms were not attaching their callbacks to
  their constituent algorithms. Some algorithms used boolean masks and
  applied all changes at once (not ideal for callback purposes)
* Update favicon to be an interim icon. Draconic script for "DG"!
* Embed Google font "Rock Salt" and use that for header
jnickg commented 3 years ago

Confirming that Dockerfile needs to change. From Heroku deployment logs:

2020-09-17T06:44:41.126413+00:00 app[web.1]:       An unhandled exception has occurred while executing the request.
2020-09-17T06:44:41.126503+00:00 app[web.1]: System.TypeInitializationException: The type initializer for 'NativeMagickImageCollection' threw an exception.
2020-09-17T06:44:41.126526+00:00 app[web.1]:  ---> System.DllNotFoundException: Unable to load shared library 'Magick.Native-Q8-x64.dll' or one of its dependencies. In order to help diagnose loading problems, consider setting the LD_DEBUG environment variable: Error loading shared library libMagick.Native-Q8-x64.dll: No such file or directory
jnickg commented 3 years ago

Dockerfile builds and glibc appears present, but same crash as before. Other missing dependencies?

jnickg commented 3 years ago

@quixoticdicker Can you give the changes to the DLA algorithm a once-over and let me know if there are other spots I should run callbacks? The callbacks are what's being used to generate step-by-step animated dungeons, so it makes sense to run callbacks after a chunk of logical progress in creating a dungeon. I think I hit all the spots, but just wanted to be sure.

jnickg commented 3 years ago

Waiting for clarification in dlemstra/Magick.NET/discussions/735