Questions and thoughts about Defold as a newbie

Hey everyone, this post is a little bit long so if you’re looking for a tl;dr I asked my primary questions at the bottom of my post.

I’m still relatively new to defold and how it works. I’ve done a few defold tutorials after recently learning lua and then love2d. Prior to this my only programming experience is from messing around with javascript and html5 to make math games.

My biggest gripe, being new to game engines and game development in general are the issues I am having trying to wrap my head around how everything is structured in Defold, or “how” I should structure things in Defold. While I’m sure it’s intuitive, I don’t really have a sense for how and why everything is structured where as with love2d, I had a greater sense of control and comprehension because I did much more from the ground up. I liked having the understanding I gained from working at a lower level because it helped things make sense to me. With Defold, it feels like the scope of my understanding is limited to only making games similar to the ones I made following tutorials.

If I wanted to make a similar game to what I’ve learned from the tutorials on Defold, sure, no problem, it would be way easier and more productive to do it in Defold, but now that I’m wanting to tackle an RPG project, I don’t really have an idea of how I’d want to go about it. With love, I’d sort of know where I would want to start and how I would want to go from there (though I think it would be way more work using a framework like love). I think one of the reasons for this is because as a framework, it felt like I had a lot more freedom, or flexibility at the expense of having to do a lot more of the work (in other words, at the expense of productivity).

Honestly, I’m ashamed to post this because I feel like I could be missing fairly simple or obvious concepts. I’m still doing tutorials, reading more of the documentation, etc so hopefully I’ll have more things figured out soon.

I want to know the thoughts and opinions of the more experienced users here who have a better understanding of Defold. More specifically, I had these three questions:
-How would you guys go about making an RPG on Defold?
-What do you think are pros or cons to the way things are structured in Defold, perhaps in contrast to Godot’s node based design, or just structuring things yourself using a framework or libraries?
-How might design and production differ or contrast making the same type of game in a different engine (use whatever as an example)?

2 Likes

Let me counter with another question: How would you make an RPG using Love? I’m pretty sure the difference isn’t going to be huge.

It’s also pretty hard to fully answer the question since we all have different ideas when we hear the acronym RPG. But if we disregard the presentation (ie top-down classic Ultima game, first person Bards Tale, turn based or real time etc) and only look at the data we need to keep track of then I’m almost 100% sure that you’ll be able to do much of that work in exactly the same way as you’d do it in Love.

An RPG is a lot about numbers and stats, quests, story, dungeons, world, monsters, weapons, character classes, skills and perhaps also procgen. Most of that stuff can be expressed in plain Lua right? You can stick that stuff into scripts, but a lot of it would probably work a lot better and be easier to work with and test if written in Lua modules. Defold and Love uses Lua modules in exactly the same way. You create *.lua files and require() these to include whatever you have in your modules in other modules (or scripts). You call functions to interact with the data and transform it in different ways (moving on the map, applying the logic in combat, the effects of spells, the xp gains, the progression of story and quests).

Now, in Defold you can’t create an entire game with Lua modules alone. You also need some scripts to act as the glue of your game. The scripts will do the interaction between the different objects/systems in your game and also interact with the engine and build the visual representation of your game. I guess this is the part that troubles you? And this is the part that is hardest to answer without knowing exactly which kind of game you want to create.

2 Likes

I should of been more specific, my apologies. I think a real time one would be relatively simple with what Ive learned so far. It just sort of all went beyond me when I wanted to make a much more menu heavy turn based rpg. To me, real time action games seem simple to make on defold. I make a level in a collection, game objects with all the required components like sprites, etc for the characters, monsters and such. Now, for some reason it feels like to me that something turn based with a lot of menus would be more work? Maybe its cause I havent any experience making any games of that variety yet. So far Ive just made action type games loosely following tutorials and guides.

Yeah, sure, adding a lot of UI obviously adds a bit of work, but that’s the case for any engine right? It’s not much harder to do using Defold than in any other engine. Sure, Defold GUIs are pretty basic, but with extensions such as Gooey it becomes really easy to create a fairly complex UI.

An example of a turn based RPG (actually roguelike) made in Defold is Rogues’ Redemption:

Forum link: Rogues' Redemption - roguelike with pixel graphics
Source code: Rogues' Redemption - roguelike with pixel graphics

1 Like

Also check out “Fates of Ort” (https://forum.defold.com/t/fates-of-ort-retro-fantasy-rpg). You can follow his development on twitch.

1 Like

Don’t be—thanks for your thorough post! Chances are great more people are thinking the exact same thing, who will be helped by this.

If we flip it, can you think of anything—better onboarding, more tutorials, anything else—which would help you as a fairly new user to Defold?

3 Likes

I’ll let you know once I’ve finished the rest of the tutorials and have gotten a better grasp of defold! Im also learning a few engines on the side for fun and maybe this will help me provide better insight. The more and more I get into the engines the more I’ve started to appreciate defold, so I would really love to see the engine gain more popularity or give back some how. The community here has been very helpful. Even just reading through other asked questions and made posts has helped me immensely.

A bit off topic, but I want say, after messing around with gideros and godot now, the packaging is way better in defold. Im surprised how small and complete defold is in comparison to the alternatives. For example, I needed to configure visual studio, python, scons and a few other things on godot before I could to compile to windows, on gideros to compile to android I had to configure jdk, android studio and learn how to build a project from a gradle based template export because gideros doesnt sign the apk for debugging for you like defold does. As someone who is completely unfamiliar to these things, it took a very a long time and a lot of hard drive space for various tools, sdks, and other things I had no Idea I would need. I couldnt even export my simple bunnymark script from gideros to html5 and gave up trying after messing around with the template. Im not sure why godot is advertized as being lightweight and small. It’s very misleading considering all the required dependencies needed to function and compile, all in all making it much larger and intrusive feeling with everything else you have to download (not to mention more things to configure). I’ve found with defold, all Ive needed is defold as it comes so far.

5 Likes

After a few months intense use of Defold I take with me a few things:

  • Learn the ins and outs of game objects, collections, messaging and how it all fits together. It’s a bit of work and mind bending to be done, but use tutorials etc so you really know how it works, since you (should) will base whatever idea you have around these concepts.
    RPG game? Your characters will likely be game objects. Know when to start using collections etc.

  • Extensions! Use Gooey. Use Monarch. Use Rendercam. And many more! Take the time to learn these as well as Defold itself. Without those I’d be so far behind in development compared to now. I would’ve saved even more time if I realized from the start, the importance of these.
    It’s easy to think that these might be third party and therefore not bear the quality seal of Defold itself, but it is not necessarily so. I can’t speak for all extensions obviously, but the ones I’ve started using do what they should very well, and there’s great talent behind them.

  • Realize that the default setup of a project is very moldable. Just look at all the freedom you have with rendering!
    You have to come up with your own custom approach, maybe think of it like twisting Defold into your own engine in a sense.

For my space shooter game I have a custom render script that combines Rendercam and the grading tutorial and some custom stuff on top of that to make the game scale correctly and translate input correctly depending on window size etc.
That’s just the janitorial stuff.

Then I have a custom timeline handler, enemy spawn handler and so on, that can read my json files that defines levels, enemy waves etc. Further on it’ll contain dialogue even. Oh and I’ve made a custom web based level editor (easy for me since I’m a web dev). That’s totally outside of the Defold scope, but yet it’s part of my game development. I know where Defold starts and ends in the equation though.
Lots of my game code is more “standard lua code” rather than Defold specific stuff.

Making an RPG game is in a sense a huge undertaking, yet one-man studios can pull it off. How do they do it? I guess you have to use the leverage that time saving approaches can give you. Sit down by the drawing board when you know you have to make something more efficient.
Make sure you find a solid way to design menus if you already know menu systems will be heavily focused. (use monarch, gooey)

7 Likes

Hi there, I am glad to see another Love2d user here in Defold forum. And i am also active in love2d forum, that you can see my id there. I had the same question when the first time i used Defold. But for now, both engines work for me without problem.
For some advices, you can use Defold only for render system or change the whole mind and construct a game around game objects.

  • render system: You can build all the game in love2d logic and leave the render parts for game objects and GUIs. Which means the things in your love.draw call, just replace them by factory created game objects holding the sprites. and voila, everything runs OK. So Defold will act as a special runtime for love2D :joy: but that is not recommanded.
  • Or you should accept some engine concept, for example Defold or Unity. That you should not take control for the core of the engine. just use what the engine provide(that will be more efficient). So that you can pay more attention to logic scripts in your game than creating yourself a basic game framework.
4 Likes

Hey Axel, I wanted to follow up on replying to your post.

Now that I am more used to the collection > object > component style system Defold makes a lot more sense to me. Now that I have also tried other engines I can see the recurring concepts, just different naming styles and schemes. I’ve come to really appreciate the documentation for defold after messing around with incomplete engines and much lower level frameworks that barely cover anything, making Defold start to feel very easy to use in comparison.

If you want to improve onboarding I think it will be important to focus on your intended target audience. For instance, you can’t really improve oboarding for users who are looking for something like Unreal or Gamemakerstudio (though users COMING from those engines would be a completely different story).

Here’s what I think about the tutorials. One, I dont think you need many, but having a good variety is a good idea to teach different methods and styles to build games. It isnt very helpful if all the tutorials show you how to do things all the same way. This way people will also make more variety of games, it would be pretty lame if everyone was making the same mario type games for example. I can’t say how you could improve your tutorials but I can share my experiences with them. I tried to follow the runner tutorial, but it felt like it was just showing me different parts of the engine as it told me what to do rather than explaining what things did, and the concepts behind it. I learned most of what I know about defold from a tutorial series by gamesfromscratch. Instead of focusing on completing a game, his tutorials focused on the different elements that make up a game. This segmented approach is very good because it’s modular design let’s you learn the things you want to, and skip the things you dont need, or build on previous concepts one segment at a time. It also felt much more meaningful to learn “how” to do things rather than “what” to do. The only people who will quickly grasp things from a “what to do” approach are people who have learned the concept else where in different application.

Personally the things I would like to see most is community growth, more popularity and the interest that follows. Only good things can come of that.

For the most part you guys have things really spot on. How well done everything is reflects both in engine design and all the things designed outside of the engine. I think this excellent web and forum design are testament to that!

I hope I was able to prove some sort of helpful feedback. If you had something more specific to ask let me know.

4 Likes

Yeah, it’s lacking in that respect. We are moving tutorials to inside the editor and are working on making new ones and revamping the ones we do have. Plus providing sample games. Please check them out. Here is what’s in there right now:


There is also a new beginner’s tutorial coming up today (I believe) and more are in the works, some of which are focused on working on certain aspects of a game or the engine.

And thanks for your kind words and feedback, it’s very helpful.

6 Likes

The current user learn experience is a bit fragmented too.

  • We suggest the runner tutorial the first thing we do.
  • We have tutorials on the site that are not in the editor selection.
  • We have tutorials in the editor that are not on the site.
  • And one or two exist in both places but are not 100% the same.

We are working on improving this.

5 Likes

And here it is:

11 Likes

Sorry, I’ve been a bit busy. I should have time to try it out today!