@Radnen:
Re fade.init - I purposefully didn't add much checking (if any) to the tutorial's code for simplicity; my actual personal version has almost every check I can think of, including the basic version of the || trick. I could've also modified the alpha value of the modified fade() function during the declaration of the
c variable instead of modifying its alpha after, but again people aren't going to know to do that immediately, and the tutorial's fade code doesn't type-check
fade.color so theoretically any object that has red, green, blue, and alpha properties would work. Your || recommendation is probably better JS practice anyways, so I'll use it, but I also chose to show the 4 parameter CreateColor because I want readers to notice that the alpha value of the tint is being set.
Re easing - I want to put a better description, but I was pressed for time; a later edit will expand it. Regarding the long version of easing function prototypes, for simplicity I simply pass the
t value (0.0 to 1.0, inclusive) since the
effect function only passes a t value to whatever easing function it's given. If it won't add needless complexity to the tutorial a later edit will add a section explaining using proper easing functions.
Re explanations - This is exactly why I want at least two pairs of eyes on every tutorial, so that we can make sure they're as readable as possible. If there are any suggestions, like reorder the pieces or be more/less detailed in X section or reword a thing I'm all ears!
@Rahkiin - That is a good idea, as the file format docs that come with Sphere may be a bit outdated (especially the map and spriteset ones). If they're not documented on the forums for some reason, ask Radnen and Flying Jester for their findings on parsing Sphere formats (especially version inconsistencies) since they've worked with them more recently than I have. Lord English may also have a couple of notes after making some edits to Radnen's Sphere Studio. alpha123's worked with the most recent version of vanilla Sphere, but that may have been quite some time ago. The
Web Sphere Utilities repo has my code for parsing the formats but it's all in web-compatible JavaScript. Pick your poison