Modernizing Artsy

#retrocomputing #javascript #demoscene #learning #reverse-engineering

Written by Anders Marzi Tornblad

This is part 3 of the Artsy (and slightly insane) series. If you haven't read the first part, here it is: First part of Artsy, now in beta

It's been more than nine years since I made an attempt at recreating the iconic 1993 Amiga demo Arte demo by Sanity. Since then, there has been a lot of progress in browser APIs and the JavaScript language, with new editions of ECMAScript being published every year. In time for the 30th anniversary of the original Arte demo, and the 10th anniversary of my remake, my plans are to modernize the code, refactor what needs to be improved, and bringing it into the 2020s.

For now, I have refactored the first part of the demo, breaking out the demo framework parts of the code to its own file, and modernized everything a bit. I have moved from var to const and let everywhere, and I'm using arrow functions wherever possible. I have updated bits of code that are now obsolete. For example, I create custom events by calling new CustomEvent() instead of calling document.createEvent() and event.initEvent(), which are obsolete since the release of DOM Level 4 in 2015.

My plan is to move completely to modern JavaScript, using classes, ES6 imports, and modern browser APIs. I'll write more about this effort as I go along, and my deadline for completely redoing this is the end of 2023.

You can try this solution at atornblad.github.io/artsy. The latest version of the code is always available in the GitHub repository.

Articles in this series: