Learning Defold

Hello there, Defolders.
I’ve been using Defold over a year or so (months of using “for real”) and is really awesome! Building prototypes are so fast and there’s a lot of good assets created by this incredible community that makes even faster. Super stable. Really enjoying all the process of making games with it.

But I got a problem: I’m a “lazy” (or confused) learner. I don’t know how to “learn”, what topic should I go next. So far I’m learning things when I need them (through API) but I think I missing so much. Is this a common thing? What do you guys recommend after the tutorial and examples section? There’s a roadmap of learning? Even using it for so long I think I don’t know 50% of the game engine.

Please send help! I hope this thread helps newcomers.
Thank you!

If you have not done so you should read the API documentation from start to finish. Multiple times and taking notes as you go.

API reference (buffer)

Offline docs apps like Zeal can make this more convenient.

After that start making example projects to explore features you have never used before. Until there are no longer features you have not at least tested. This first hand experience will help you know what’s there for when you need it and remember how to use it.

2 Likes

If you have not done so you should read the API documentation from start to finish. Multiple times and taking notes as you go.

This is not a great way to learn for three reasons:

  1. You do not use the information you read, making it more difficult to remember

  2. API documentation is a reference, not a learning guide. A lot of the information requires a lot of prior knowledge and the basic concepts are not those which are listed first. I have made several games, for example, without learning what a buffer is, and that’s first thing in the manual.

  3. Many examples are provided without context or examples which makes learning very difficult.

My advice would be that you decide a simple game (look at itch.io for examples of what you’d like to make) and try and make it from scratch. you’ll need to spend a lot of time looking at the API documentation of course, and asking for help, but it’s a good “next step” after reading the docs.

The best idea would be a game that you already know (more or less) how to make. making it from nothing - and then building on it - is the best way of improving.

3 Likes

@Dat_Indie is not a newbie, is already experienced, and is looking for mastery. Fully consuming the reference material multiple times without skipping anything and working toward knowing all of it and how it works is important for those who want to get good and fill in the gaps. I recommend reading it all multiple times because of reinforcement and how second time + through people can make the connection of related features. Making examples based on features is how the memorization and understanding strengthens.

3 Likes

Okay!

Alex mentioned doing the tutorials, and that they had only been using defold for a year or so, and that they hope the thread helps newcomers, so I wasn’t sure if they were new or not. I’ve been using defold for several years and still don’t know half of it.

I actually think Alex is likely to be just overcoming the dunning Kruger effect: realising that there is so much to be learnt, and feeling that they are still not good enough. This happens to language learners after B2 level (in my experience). It probably is a good time to start going through the documentation then.

With that said, I do think there’s a huge leap between “made a few games and learning stuff from the API” and “read all the documentation from A - Z”. Whilst most users who have finished at least one project will understand the go.() section, there are other sections (like buffer) which have 0 relevance and shared skills

2 Likes

Even newcomers benefit from reading over the API in its entirety once to get a broad view of what the features are even if they do not memorize them right away (full memorization is not necessary, just knowing the features exist is very good). But it is certainly something everyone should do eventually. Reading over the Lua + Defold documentation should not take longer than a day.

Your advice for making a small game is good. Make lots of small games! Still with filling in the gaps, it helps to intentionally use the features in projects that have never been used before rather than to only use features which a specific game design calls for. The volume of practice (and doing many of the same things over and over and over again) in both exploring game designs + deliberately practicing new features will help anyone toward mastery.

4 Likes

That’s like saying that those who are just beginning to learn a language would benefit from reading the dictionary multiple times :sweat_smile::sweat_smile::sweat_smile:

I have been working as a teacher for nearly 10 years and one of the greatest pieces of advice I ever got was to try and remember what it’s like for your students who are just beginning to learn. Concepts like the subjunctive in Spanish or word order in English become second nature, so it’s impossible to believe how complicated they first seemed.

And really… reading the whole of lua and defold documentation will only take a day if you don’t need to understand any of the words, you have infinite patience, and a photographic memory (even for concepts that can’t be photographed) :sweat_smile:

I understand that nobody is paid to help learners and I think defold is f****** fantastic. But at the same time… it wasn’t my first experience of coding, nor game creation, nor a CRM. I spent years learning Stencyl before I transitioned to Defold, and I remember how long it took to make my first very simple (and now I realise, very inefficient) game. People don’t know what the Update function means and it takes months to fully understand. People don’t know that action.pressed exists. People have to learn the difference between == and =. We don’t know the names of these things, so we can’t always search for them. People don’t realise they can create functions and call them ourselves. We don’t get what local variables are, or that “self.speed” is not a universal concept. GO child/parent structures, scale, euler takes MONTHS to learn and fully understand. Attaching a script to an object, knowing the difference between a collection and an object, making a factory object in the folders on the left compared with creating it within a collection… these are the basics, and they take years.

9 Likes

You’re absolutely right. The way I learned Defold was piece by piece by going through the manuals (not the ref docs). I would try to understand a concept from the narrative manuals, then read the refdocs for that module to understand what’s possible and what’s not. But understanding the concept always came before reading the refdoc. Or, at least, if I’m reading API docs for a new concept I don’t fully understand yet, I will refer to the manuals or to some examples before continuing.

But!

  1. I already knew Lua in and out (which I learned a long while back in a similar way, by reading http://www.lua.org/pil/contents.html, which I really recommend, then reading the refdocs)
  2. I was already familiar with how computers and programming languages work, since I was coming from a web/iOS developer past life. If you are already a dev before Defold, don’t take it for granted. For most people getting started with Defold and game dev this will be their first programming environment and your learning experience will be vastly different to theirs. Remember how it felt when you first learned your first programming language.
  3. I wrote a ton of JS, so I worked with poorly documented APIs all my life. I’m really used to learning from API refs. A newcomer might not be.
  4. I made a game engine in high school (which also embedded Lua), so I already had some familiarity with game engine / graphics programming concepts, which most newscomers might not have. I instinctively knew my way around atlases, shaders, render scripts, vector math, etc, which I think was a big “cheat” towards understanding Defold.
  5. Even so, it still took me a while to understand how Defold’s scene graph and URL addressing worked

So, to summarize:
To learn Defold, you need to be aware of:

  • General programming
  • Lua
  • Graphics programming
  • The Defold API
    (and many others)

I was lucky to only have to learn the latter. I don’t know @Pkeod’s experience, but I assume you also didn’t start fresh.

For someone starting from scratch, I can see how this will be a daunting and long process and focusing on only a limited amount of information that you currently need or that you currently want to learn can help with the learning process.

4 Likes

A whirlwind tour of anything is useful, it’s about building a mental image of what is there, a visual library of the practical concepts. It may be a hard ask to get someone to read the API but I still feel it is worth trying to do.

Memorizing the important parts takes practice, knowledge of the existence of a feature is valuable even if it’s not memorized. Knowing how to use it effectively / elegantly can take more time with study and practice. I don’t expect people to learn Lua/Defold overnight, but I do hope that people who are serious about learning Defold are willing to do some reading and practice in a systematic way.

these are the basics, and they take years

I do not believe it should take so long but there is still a lack of structured educational materials available. Video tutorials may be helpful, such as visually presenting all of the features in a concise way that the knowledge of what is there becomes more accessible to people. Going over all of the features you mentioned and attempting to explain them in ways where understanding can come quickly, we should all try to remember which things gave us the most trouble and try to make it easier for those who will come next. I mean like short videos, under a minute that explain a feature in a way that clicks for 90% of people.

Let’s all work together to make more and better educational materials that both inspire people to make cool things and help them learn all of the concepts that are important sooner that may otherwise take much longer if done in a more random way.

3 Likes

This is good advice. It’s part of the ”manual” of the product, and you do read the manual for the things you buy, don’t you? :wink:

Not to sound harsh, but many of the questions on the forum are directly related to either not reading the api at all, or not realising what capabilities the api provide.
I do think reading the api too will be a net win for the person learning to program.

4 Likes

Really great discussions in this thread! Mastering a game engine or some other non trivial thing takes a lot of time, and while I do believe our manuals are fairly comprehensive I’m almost certain that they aren’t very beginner friendly.

The question is what can be done to help newcomers get started with Defold? We have talked about creating short video tutorials (max 5mins) focusing on a single topic at a time, but I’m not sure how much that helps? Do you have other ideas?

3 Likes

I’m really not a fan of video tutorials. They’re hard to skim, hard to search and hard to reference. But a really detailed “let’s make a game from scratch” written tutorial that you can follow step by step and have different features introduced progressively would be great.

Here’s a great example that I absolutely love and always refer people to from the React team: Tutorial: Tic-Tac-Toe – React

5 Likes

I’m reading all the replies and taking notes. Really helpfull! Thank you!
About the tutorials: I think Defold has a excelent written learn section but it needs more videos. I have a few ideas for short videos showing the basics of the engine and the most commonly useds assets. I think I’ll learn a lot studing and making them (something like @Pkeod did with the Book of Defold).

EDIT: the idea for the videos (for anyone interested to give feedback or try something alike) is to replicate (common) mechanics from known games. For example how to make a hp bar like pokemon or something like that.

2 Likes

The kind of video tutorials I think would be useful are in this style

https://www.youtube.com/watch?v=f-ATczxlyJI&list=PLv8HciXoFYX-uyp7iIg3vu4_dWVdcO5sY

Mostly less than a minute, quickly show something off or explain something useful to know.

4 Likes

I understand that you can be annoyed and sometimes tired by these silly questions asked by “lazy” newcomers (I’m one of them) and I’m sorry for that, but on the other hand, I believe this forum is an amazing long-term asset.

From a “beginner++ who’s already hooked by Defold” 's perspective (not sure an absolute beginner would feel the same), I’d say this forum is a great alternative source of information based on experiences and exchanges between developers of various levels (from beginners++ to experts… but obviously beginners benefit the most from it, before becoming advanced users themselves and be able to help the others).

For example, I’ve been asking for help too many times in the last 3-4 days, maybe sometimes I shouldn’t have… but if the “search” tool of the forum and aaaall the issues already encountered in the past hadn’t existed, the learning process would have been way more painful. Plus, seeing other people struggling (months/years earlier) with the same issues is somehow recomforting and reading the comments/tips/keywords (+specific references to the official documentation) in understandable and contextualized terms means the world to someone who can not make the most of technical documentation yet (but will someday!)

All in all, this forum is really cool (top UX/design, great community/admins) and you can see it as an organically growing database, complementary to the official manuals (without replacing them, of course).

5 Likes

I think we as a forum could do a lot to improve the way we answer questions from those who are just beginning. If a player is having trouble with changing scenes, for example, they need to know how to load and unload a collection. Don’t tell them about monarch, it’s not going to help right now :sweat_smile: There are many examples of newbies asking obvious questions and getting replies with answers that are WAY too complicated.

Secondly, very simple downloadable examples with commented code which is easy to understand (even if it’s not the most efficient code, that’s fine).

Third, videos! I don’t use videos very often (for the reasons mentioned above by dapetcu) and also because I mostly know what I need to do, even if I need to check the API. But videos are really REALLY helpful for newbies cause you can just copy.

Some parts of the documentation are much better than others for learners, etc. Modules, for example, doesn’t have particularly practical examples and it has some generic looking code (the word Foo can be confusing for beginners, whereas “self.playerhealth” is easier to understand). However, I do think that API documentation doesn’t necessarily have to be for learners. An approach where learners get an intro and experts get a “more info” section would be useful.

So:

  1. Speak to newcomers on their level
  2. Simple examples which are commented and easy to understand (even if they are not the most efficiently coded)
  3. Video content
  4. Newbie-friendly documentation
4 Likes