Some History... and a Question

Hello everyone, before going on with the question, let me “add” to the little introduction I wrote in the Introduce yourself section: my name is Luca, I live in Italy, my dream has been to create games since I was a little kid, but, of course, living in a “video games are a waste of time” kind of family meant that could never be a thing.

Some years back, after finding myself jobless and incapable of finding a new job, I had to decide if spending my days doing absolutely nothing, or dedicate myself to something I was passionate about, so I decided to start studying how to make games so… here I amn.

It took a long time of super small projects, mainly because I’m one of those people who refuse to just use pre-made assets and want to create everything original.. so I had to learn pixel art, animation, music composition, music production, basically from scratch.

The first engine I learned to use was Unity. Then that whole thing about them changing their terms of service happened and I just kinda threw that engine into oblivion.

Looking for another one, I found myself interested in Godot and started learning it. Very nice engine for small projects and tutorials.. but now that I am finally working on my first, real, full game… the experience brought me to realize that Godot is kind of a “fake” thing.

When I say “fake” I mean that you look at it from outside.. and it seem like a sparkling diamond… then you take it in your hand, you look at it.. and it’s nice, and seem polished… but the very first time it “nump” into something.. it breaks in a million pieces and you realize that what you were dealing with was not a diamond, but a very fragile glass objects… with the worst part being that a big part of that fragility was created, as godot developer LOVE to say, “by design, and they are espected”.

Just to make a couple of examples… you have an audio mixer that only works in the editor… so basically designed to only work in a situation when it’s 90% of the time useless. You have a 2D element created on purpose to “share” shader effects with contained elements… which can’t be used for 2D games cause it breaks Y sorting entirely… and most of these things were signaled like… 6-8 years ago and never looked at.

As I became more and more frustrated with this, I decided to start looking for another engine and stumbled upon Defold, which seems to be what I’m looking for.

If I understand this correctly, this has a component-centric development cycle which is “somehow similar” to Unity, so I think I can get to learn it pretty fast… and if my research is correct, the developers here concentrate a lot more on guaranteeing that the engine is stable, bug-free, without broken functionalities… than just adding 10.000 new, only half-working functionalities while never adjusting older ones.

Perhaps this comes with fewer “out of the box” things, but honestly, after my recent Godot experience.. I’d rather know that I have to create something entirely on my own from scratch in a solid engine than waste 7 days swearing because something that is supposed to work in a certain way doesn’t work that way… only to later find out that it was “designed” not to work and there is nothing you can do about it cause “they expected it not to work that way, deal with it”.

So, I’m not planning to port the game I’m working on right now to Defold currently, as I already found ways to adjust most of the issues I had, but my will is definitly set on switching to Defold for the next one as soon as I am done with this.

So, in my spare time, I started studying some LUA, and I’m looking for material to actually learn the engine itself.

And HERE is where I have my question: I have looked in the Defold video section, and searched on youtube… and there seem to be a pretty annoying “pattern” there for study material.

You can either study LUA, in an environment completly detached from Defold, or you can udnerstand how Defold work… but the “LUA” part mainly os the teacher copy and pasting in already made code, basically without explanation… which gets pretty confusing.

So here’s my question: is there any course, playlist or whatever… a VIDEO one (cause my eyesight is pretty bad, it’s hard for me to read long text), where someone actually explains LUA –INSIDE– Defold, so that I can start understanding the API and how things actually work in the engine code-wise?

Thanks everyone for reading and eventually replying :slight_smile:

Luca

2 Likes

I have this playlist aimed towards beginners and I explain my code and do the coding in real time: https://youtube.com/playlist?list=PLkdj9mBu4LRbDraRO8anTeBTihpVcpIH6&si=SxU_prPLFVgCZ0tu
While it is not directly a Lua tutorial, I explain the core of it while explaining the game development

2 Likes

Hey there! I had found your 6 hours course in the Defold - Videos - Beginner section.

I kinda gave up on it cause in the comments it had stuff like this:

  • Great tutorial, also make a Lua Defold-specific one if you can
  • Please do make a Lua tutorial for use in Defold since I think it will help a lot to get better at coding.

so I just kinda assumed it was the “usual” approach where LUA usage in Defold was not explained and didn’t even look at the playlist with the serie.

I’ll just try to give it a real go. ty

3 Likes

Correct :white_check_mark:

So, we are very eager to start a new video series on Defold YT explaining everything and I’m preparing it since I joined Defold team a year ago, but there’s always something to do here and I never managed to finish. We focused first on written materials - manuals, updated tutorials, and adding new samples/start kits for users.

Before, I joined Defold foundation I was doing videos on my channel and there is a playlist for beginners. In most of the tutorials I write with the audience the code line by line and explain it, let me know if this is a good fit: :wink:

As Lua is a language commonly used also in other engines and more, we don’t really focus on teaching Lua, as there are a lot of resources on it that are good. We have one manual that explains Lua, it’s basic syntax, best practices and which version is used in Defold here:

2 Likes

Thank you! Definitely will check it out.

That said, I am, of course, learning LUA for now in a separate environment, just getting the basic concepts into my head: local, tables, the usage of end, and so on.

And you’re definitely right in saying that many things use LUA, even outside of Defold. BUT, I’m willing to bet that Defold, and those other programs, have their own set of commands and functions that you have to learn alongside the basic LUA language.

One example that I came across (and still don’t really understand) is go.whatever. There is no mention of go in basic LUA courses, so my guess is that go is something specific to Defold. I would assume it stands for “Game Object” or something like that.

The point I’m trying to make is that, even if the language itself is universal, every program that uses it will have its own peculiarities that people need to learn. And as such, only teaching the basic language without explaining how it’s actually applied within the program makes it SO MUCH MORE DIFFICULT to get things done.

Hope I managed to explain what I mean! I’m doing my best with English, but of course… it’s not perfect ^^

1 Like

Lua is super simple. I don’t necessarily mean easy, but the fundamental concepts are so limited in number that you can learn the basics really quickly. Mastery comes from practice and experience.

Do this, then just move on to Defold specific tutorials.

In my opinion you are overcomplicating this. You will be fine with the tutorial series suggested! Good luck.

4 Likes

As I started on Defold on this year mysefl, I understand what you mean by “learn the lua language in the context of the game engine”
I already knew javascript, python, java and c++ (but along time ago), so it was rather easy to learn Lua language at first (even if some OOP in lua can be a bit hard at first to get used to).
And I LOVE this language now, there so little concepts into it, but you can do whatever you want really easily. For me it is the perfect kid between javascript and python :sweat_smile:

However, I struggled too at first to be productive or just do things in Defold, because I didnt know how lua was meant tot be used in the context of Defold API and engine. What are the patterns? What is a good idea and not a good idea? What CAN i do with the API? etc.

My recommandation:

  • read and keep the Defold manual there is invaluable information and examples
  • always keep the API reference (Overview) | Defold 1.13.2 (Stable) open! Start reading the API, you’ll gain a better understanding of which modules come from Defold, which one from core lua, what you can do with which module etc. This will help you to envision HOW you can solve a problem, where to start.
  • work subject by subjects:
    • for example, how does the camera work? Read the manual, read the API. Then see an example in the Defold Example page. Then try to build your own script using it.
    • then take another subject: shaders, physics movements, factories etc..
  • the Defold Examples and templates projects are really usefull. You’ll have a small but complet projet that do 1 thing, and you’ll understand how you can organize things in a true project. I always learn many many things by retroenginering these examples (like the new 3d plateformer or the many open sources projects given by the community).
  • start with a mini game you want to build, with a small scope. do it from scratch, and with all components of Defold (multiple gui screens, factories, message broadcasting, camera, shaders, postprocessing, mesh, models, physics)
  • dont overthink things: just write your code how ever it comes to you, if it works, it works. You’ll learn fast enough what works in the end and what not. You will do bad things, but that’s how humans learn.
  • start everything 2d. Dont start with 3D now, this adds a lot lot more difficulties. But you can still add some 3d model and create mesh for a 2d project, this is a good start.
  • search the forum when you are in trouble, there is already a lot and lot of information in the forum. Sometimes informations that should really be in the manual :sweat_smile:
4 Likes

No worries about the 3D part: I am ALL about 2D :slight_smile:

This said: I appreciate the sentiment AND the suggestions. THe thing is that I have a degenerative sickness to me eyes which would require prettu expensive surgery to cure… and I can’t afford it right now. This also make it so that in order to have specific support, like glasses, for my special condition… the process is once again pretty complex and expensive, so can’t afford it right now.

Anyway, due to this, it’s very hard for me to read long texts… and that’s why I was hoping there were VIDEO courses to learn the LUA language in the context of the engine instead of having to constantly refer to the written documentation ^^’

1 Like