Firstly to answer your actual question:
So yep, long question short: aside C++, are there any other development alternatives for Arduboy?
You can sort of use C if you want to
I’m not aware of any Atmega assemblers, but I suspect they exist, so if you are somewhat insane or masochistic you could use assembly. (I’ve written the odd function using C++'s inline assembly capability, I don’t recommend trying to write whole programs in it though.)
There is aparently a sort of microScheme that can compile for Arduino, but I’ve got no idea how well it works and I don’t know if it could use the Arduboy2 library. (Also please excuse the person’s somewhat rude “this is clearly a student project” comment. It was a student project, but that does not make it somehow inferior.)
If you can use C# to any decent capacity, C++ isn’t too much of a leap for basic things.
There are some more complicated rules involved in more advanced things, and a some basic stuff has different semantics.
Firstly, regular variables have what C# would call ‘value semantics’ in that assignments copy the entire object rather than just making a new reference to an object. That might sound expensive, but it depends how it’s used. For example, functions returning objects can use what’s called RVO (Return Value Optimisation) to make returning objects cheaper. You can also reference objects through pointers or the aptly-named references.
Secondly, there is no garbage collector. Objects are destroyed when they fall out of scope. For example:
class Object {};
void Function()
{
Object objectA; // Default constructor is implicitly called
{ // Forced local scope
Object objectB;
} // End of local scope, objectB is destroyed
} // End of function scope, objectA is destroyed
Object Function()
{
Object objectA;
return objectA; // A copy of objectA is returned
}
C++ does support operator overloading, and if you’ve everwritten a C# indexer, the C++ equivalent is overloading the []
operator.
If you’ve used C#'s generics, templates are somewhat similar, but have slightly different rules and behave differently. As long as you remember that each instantiation of a template is essentially its own class you’ll probably be fine.
Oh, and if you’re used to using the wonderful rich library of C# (e.g. List<T>
, IEnumerable<T>
, StreamWriter
et cetera), I’m sorry to say that Arduino doesn’t support the C++ stdlib and even if it did the Arduboy only has a limited pool of memory so only half the library would be of any use anyway. But that doesn’t mean you can’t make games or come up with workarounds. For example, in the past I’ve made a list class that has a limited maximum capacity but still supports Add, Remove, indexing etc.
There’s a lot more differences than just those, but those are good starting points. Most of the syntax is similar, e.g. declaring variables, namespaces, for
, while
, if
, switch
and writing functions are mostly the same, but there are differences so you’ll still want to read some tutorials, although you should find it easier than if it was your first language.