I have a solution for that, but I haven’t got to that part yet.
You don’t really have to do much.
As long as an Arduboy game obeys the rules of standard C++ then all you have to do is rename the .ino
to .cpp
and hook up the library and everything works automatically.
It took me a mere 8 commits (of which 1 was initialising the repo and 1 was uploading the original files) to get CastleBoy into a playable state, and half of that was commenting out stuff I haven’t got round to implementing.
If the library had been in a fully working state then I would have only had to make only one change:
renaming CastleBoy.ino
to CastleBoy.cpp
.
That’s what this library is going to be capable of when it’s finished.
The point of this library isn’t to make porting Arduboy2 games to the Pokitto easier,
it’s to make Arduboy2 games work for the Pokitto practically out of the box, no extra effort involved.
Unfortunately there will be cases where this won’t work because people have depended too much on the Arduino environment
(i.e. -fpermissive
, the behaviour of Arduino’s .ino
file processing and GCC’s compiler extensions),
but apart from those cases this library should make direct porting of Arduboy games take practically zero effort.
Like I said, that’s going to be difficult because scaling algorithms aren’t easy.
Scaling algorithms are the kind of thing computer science professors sit around writing really boring mathematical papers about.
Like I said earlier,
I think the best hope for scaling will be to use a x3 scaling algorithm and then downscale to x0.5,
but I’m not even going to think about that until I’ve fixed more of the unimplemented stuff.
If I fixed it tomorrow the games would look better,
but you’d still be left with no LED, no ‘flashlight mode’, no sound,
so you’d still have people saying they don’t want to play it.