Learn Lua or C as a Beginner?


I hope this isn't a common question so as not to be repetitive, but I'm a beginner when it comes to the Playdate SDK and I'm curious about which language I should learn. I'm pretty well-versed in java and from what I'm aware there are a few similarities between C and java. I've also heard that C has some inherent performance benefits, but it seems there's significantly less documentation for it. I'm leaning towards C. Are there any other pros or cons to either of the two languages? Suggestions about which to pick are very welcome! Thanks!

C is faster, but requires more setup such as changes to building for simulator/architecture/device

Lua is run anywhere and not as fast for some stuff. I find it performant enough, though!

You can also combine the two.

Check out the SDK examples of each, make some changes and build them, and see which you find more inviting?

Thanks for the advice! I'll try that out!

I found Lua pretty weird (coming mainly from JavaScript) but I got used to it fast and came to appreciate the power of its tables etc. I like it!

I decided if I'm only ready to learn one new language for now, keep it simple and go with Lua, which gives you a no-hassle build process in Nova. I wouldn't call it slow, just not AS fast. Depends how much performance your concept needs. Optimizing my Lua code gave me HUGE speed boosts, so I never needed to consider C.

Thanks for your input! Being a novice when it comes to game development I doubt I will be making many games that require the highest performance and from what you said about optimizing Lua I think you've just changed my mind. Thanks!

1 Like

I'm using C.
The documentation of the C-API is quite spartan.
If you've done lots of java, I don't think you'll have much of an issue. But give it a go, and see if you like it. There's a few examples of the C-API in the SDK package.

1 Like