I solved a huge bug that I have been trying to solve for months, and that moves me much closer to getting ready to put out a pre-alpha version of L5. It relates to what I've been calling the "double setup problem."
Basically, I was calling a user's setup() function twice even though it's only supposed to run once. I did it once to grab sizing defaults, for example from the size() function or fullscreen. Then again inside the love.draw() once in order to draw graphics the first time.
By default, the underlying love2d framework only allows drawing in love.draw() but I am attempting to clone Processing's ability to display graphics in setup as well as in events like mousePressed and keyPressed. Basically what I had to do was majorly modify the love.run() underlying love2d, as well as love.load() and love.draw() and some other things. Finally, I have a solution, by handling canvas states at the correct place and buffer recreation.
Okay, then I found another bug. I could not get fullscreen() to correctly draw graphics to the screen any longer as a result of those changes to the underlying way that love2d functions.It's a testament to its incredible documentation that it didn't dawn on me til now that I should have perhaps studied Love2d's underlying functions for setting the mode because I was getting really stuck on why graphics rendering no longer worked. It turns out that I needed not just to declare setFullscreen but also setMode, so I needed to write this:
love.window.setFullscreen(true, "desktop")
local w, h = love.graphics.getDimensions(display)
love.window.setMode(w, h, {fullscreen = true, fullscreentype = "desktop"})
This to me looks bizarre, like I'm redoing the same thing multiple times, and it's likely a result of my monkeying with the underlying love.run but in any case, all 3 of these lines are needed to be able to draw graphics in setup with fullscreen on. Anyway...
I also made a change from p5.js style implementation of fullscreen(true) to Processing's cleaner/easier: fullscreen() or fullscreen(display_number) which will send to whichever specified monitor (by number of display).
lastly, i tried to figure out a way to allow a user to write code without a setup function but i couldn't figure out how to do that. Beyond this, I think I just want to finish the basic documentation reference site and get it up and then start doing a pre-alpha test with friends. Hopefully can wrap this in the next week or two. Maybe 2 - 10 hours more effort? (though by saying that, it guarantees i'll need double that time!)