Collected Documentation Issues

Over the course of development, I've written down all of my issues. While the bugs I ran into have been resolved (well, the first item here might be a bug...), documentation issues get less reported it seems. Rather than post these one-by-one, here's a hopefully helpful list of documentation issues:

'Inside Playdate' (With Lua):

  • Under 6.20 Graphics / Image / Image effects (6th item):
    The 'image:setInverted' only seems to affect, 'image:draw', but not 'image:drawScaled', 'image:drawRotated' (possibly more).
    This one may also be a bug? It's strange how an image drawn 'with a scale of 1.0' behaves differently than 'not scaled' here. Happens on both the device and in the simulator. I'm on Linux.

'Inside Playdate With C':

  • Under 7.2 Audio / 'int playdate->sound->removeSource(SoundSource* source)':
    The link coupled to the word 'SoundSource' doesn't work, should probably be ' Inside Playdate with C ' instead.

  • Under 7.2 Audio / SoundSequence (3rd item):
    The function 'loadMIDIFile' should be 'loadMidiFile' -- note the case. (There may be other instances, such as getMIDIControllerNumber, that are also affected.)

  • Under 7.10 JSON / Decoding (1st item):
    'Equivalent to playdate.graphics.decode() in the Lua API.', should be ' playdate.json.decode() ' instead.

In general. (This one is more of a suggestion, and less pointing out an error.)

  • For the 'fillPolygon' function: While 'the last point should be the same as the first' is a reasonable choice, and one often made, it's not universal. -- If you know the function always handles closed polygons, an equally reasonable choice is to assume that last always has an extra line connecting to the first. -- Even though it's simple to try out for yourself which is meant, I think it should be documented that this is how polygons should be closed.
1 Like

Thank you! I've got these filed and I'm working on getting this and all the other reported doc errors in the next release.

loadMidiFile() is such a dumb oversight, I'm kicking myself for letting that through. There's playMIDINote() and getMIDIControllerNumber() the right thing to do is make that loadMIDIFile(), though that will cause an error when games using the function are recompiled after the rename. (Compiled code will continue to work because it's already converted the name to an offset into the function list, unlike in Lua where everything's resolved at run time.) I tried to #define a workaround, but it looks like the compiler is smarter than that. :confused: I don't love it but I think it's better than having inconsistent naming.

Great point about fillPolygon(). You could assume it's closed since the functions only refer to vertices and not edges, but it's better to make it clear. I've also added clarification for drawPolygon() in Lua, which is closed when you give it coordinates but can be drawn open if you're using a playdate.geometry.polygon which isn't closed.

1 Like

Oh and about setInverted() I'm not at all surprised if there's a bug there. I'll check it out!

1 Like