‘hs’ != ‘js’

While waiting for the exam to come online (and waiting … and waiting …) I decided to put the time to good use and see what broken bits of Maxwell’s Demon could be fixed. The failure to load spritesheet.js was the most mysterious, so I pursued that first.

Turns out it was not much of a mystery. I simply mistyped ‘spritesheet.js’ as ‘spritesheet.hs’ (the ‘H’ key being right next to the ‘J’ key on my keyboard). Because ‘.hs’ was not a recognized file extension, the asset loader could not load it. I cannot tell you how many times I looked at that file name and did not notice that the file extension was not ‘.js’.

Unfortunately, because of the unknown file type and the way the asset loader was written, the asset loader was¬†waiting for one more file than it was ever going to load — not the ideal behavior. A better behavior would be to notify the¬†person trying to load the unknown file type in an alert and offer the option of aborting the program or ignoring the missing file and continuing on. Something else for when I have more time.

Now back to waiting ….

Leave a Reply

Your email address will not be published. Required fields are marked *