I want to love the Defold engine, but it seems to hold me back somehow

Hello dear community,

I usually don’t write posts like this, but as the title says, I want to love the Defold engine. I truly appreciate the concept of byte-sized games and its super performance, yet every time I pick it up, I end up “giving up.” This is probably the fifth time I’ve encountered this in three years! :laughing:

I’ve tried to read and watch as many tutorials as possible, even though they are quite rare. Every time I write some code, it feels like a workaround. I understand that Defold comes with a relatively small toolset that can be expanded through the asset portal, but setting up plugins still challenges me, and I feel overwhelmed… almost as if I’m working with a framework. :frowning:

I’m really impressed by how polished the export settings and ad API are, yet I’m baffled by how difficult it is to get a kinematic body to walk. (Maybe I’m too spoiled by Godot.)

How did you all manage to learn? Am I missing something? Is this engine perhaps more programmer-focused and not made for small indie devs?

I hope nobody gets offended by this post and still want to thank the Defold team for the hard work :slight_smile:

7 Likes

Every game engine has its strengths and weaknesses. Defold excels at creating 2D games and simple 3D games with extremely small bundle sizes that run on web or mobile devices. I would like to use Defold to create games for Poki, but it is almost impossible to use defold to create 3D games for Steam because there are better options in this field, such as Unity, Unreal, and Godot.

Choose a game engine based on the game you want to make, rather than choosing a game engine first and then making the game. Because no game engine is omnipotent.

If you always give up or feel pain, it may indicate that the game you want to make is not suitable for Defold, and switching to a different game engine may be a better choice.

I would never use Defold to make AAA games, it’s something Unreal excels at.

Defold sacrificed a lot of things for the extremely small bundle size. If you don’t need it, using Unity, Godot, and Unreal would be a better choice.

If you feel that Defold is limiting you, it’s normal because a very small bundle size means there are very few tools available.

Defold is more suitable for making web games because web games often require extremely fast loading speed and extremely small bundle size.

4 Likes

I understand. I dont want even a 3d game. Just simple 2d small games.. But then somehow I try something and i realize I work in a 3d environment and my approach does not work.

The pain i feel right now is not because the engine is not suitable.. its just everything feels so hardcoded and sometimes not right. Then i got the feeling to do things wrong again..

To keep the engine small is the reason why I want to change from Godot. But on the other side, I miss some standard functions. (In Godot language it would be for example “move_and_slide()“)

Many users here say, that they love the engine. In my current state its a love / hate relationship

I try to be patient and learn more. If im battle ready I will join a defold jam.. If there will be no game from me.. I probably quit :joy:

I WILL PROBABLY DELETE THE WHOL POST IN FUTURE, WHEN I HAVE MY ANSWERS. DONT WANT OTHERS FEEL DEMOTIVATED

1 Like

I think keeping this post is better because it can help others judge whether they are suitable for Defold. :grinning_face:

2 Likes

If I didn’t make web games for Poki, I probably wouldn’t use Defold because Defold is too hardcore and too streamlined :joy: .

2 Likes

Alright. I keep this post. Thank you very much for your answers. Maybe Im better prepared for the engine , when I expect it to be more streamlined :rofl:

I keep an eye on Defold and have to enhance my skills..

1 Like

Like the player character in a 2d platformer?

1 Like

Yes. But I actually mean the collision. Imagine like a topdown 2d game. You can walk in four directions. When Hit a wall, the player cannot move anymore, because the physics Engine tells that there is a wall. In Defold I have to set all this by myself like: is_grounded, is_on_wall, is_on_ceiling , compensation etc..

I tried the platypus plugin and after i figured out how to set it up, I‘d still needed to examine the Config file in the script. I only copy pasted it because it was the easiest was for me and the change the variables.

The chance is pretty high, that I use the Plugin wrong. :laughing:

Maybe im looking for a way to make it a little more accessible.

2 Likes

I understand what you are saying, but resolving level geometry collisions in a top down game is literally only a few lines of code:

There really is no need to use a plugin to get the basics up and running.

1 Like

How could I not see that.. :sweat_smile: I will try it later. But I think that is, what i was looking for.

Another thing I couldnt fix was to correct the camera with a look at function, when the camera is moving with player. I used the official “look at “ sample:

function init(self)

– make sure the script will receive user input
msg.post(“.”, “acquire_input_focus”)
end

local function look_at(target_position)
– own positon
local my_position = go.get_position()

*-- calculate the angle that this object has to rotate to look at the given point*
**local** angle **=** math.atan2(my_position.x **-** target_position.x, target_position.y **-** my_position.y)
*-- set rotation as a quaternion*
go.set_rotation(vmath.quat_rotation_z(angle))

end

function on_input(self, action_id, action)
– mouse/finger movement has action_id set to nil
if not action_id then
– the position to look at (mouse/finger)
local target_position = vmath.vector3(action.x, action.y, 0)
– rotate this object to look at the target position
look_at(target_position)
end
end

As it sounds, it seems to me that

  1. your skills at pure coding maybe a bit lacking (no offense), as complaining there is a missing function you have to code… So what is your background in programming? Maybe we can help..but yes Defold is code oriented maybe more than other engines where you have a lot of premade “click and configure” tools.
  2. The task you are trying to achieve is, for now, too complicated for you to reach. Programming a kinematic player in plateform game with many move is actually a difficult and complex task! I started on gamemaker, which should be “easier” then defold, but you can just follow this series of 9 videos (!) to have semi-solid moving plateforms https://youtu.be/w8T_mWTpw38?si=HjV8tiLfgzbFFj4V and you’ll agree it IS difficult, in any engine.

So you said platypus was difficult to use, but it solve some of your problems, but the only other solution is to understand what you want to do, decompose thing, draw vectors on paper, understand the physic or algorithm, then write a code that works, then rethink, then write a code that works and that is reusable…then write a lot of other code…then rethink, then rewrite all of youe code in a well designed way, because you are better than in the begining.

I started gamedev (as a hobby) a year ago, and even I am a proficient coder, I strugle at first on many things (there is a lot to learn actually). I started trying to do “my big metroidvania dream game” but after a few month I realize the task was just off limit for me (for now!). I struggle too to “escape” the tutorial phase, because I though I didnt know how to do it “the good way”.
But in fact after I tried to solve more things by myself with my way to do it, I realised it was Ok!

Just dont be too hard on yourself. It is ok to write spaghetti code. If it works, it works.

set reachable and precise goals , like a mini game of some sort, take your time to just “make it work”, even if it is spaghetti code.
Then rethink and refactor: how can you configure things instead of hard code them?
Which part should be reusable in a module? If so, whats the API? How should you merge your 12 similar gameobjects into one type of game object and a controller object?

From game to game, you’ll just improve and wont do the same errors twice.

I really love this engine and how it is just a clean API, that let you do whatever you want and dont stay in the way. Things are not bloated, you have to do many things by yourself but you have all the tools to do it.
And I love to see what incredible things other people can do with a simple tool!

Even if it miss, you are right, some quality of life features, I find out that the monthly releases and the great community extensions / game sharing just erase theses as time pass (I mean extensions like defold-event, defold-input, druid, panthera, imgui etc. are just so great should be builtins!)

4 Likes

I dont have a specific programming background except some GDscript and that is veery Godot specific. :rofl: You are totally right, I need to work on my programming skills. I´m glad that there are guys like you, who are willing to help. @britzl That was exactly what I was looking for :see_no_evil_monkey: ,

Should have start with a small game and see how it goes. :slight_smile:

3 Likes

Can you explain a bit more what you were trying to achieve and what did not work?

1 Like

yes. while using look_at without any camera in the game it works totally fine. But when i put a camera on the player it only rotates half around the player.. I assume it has something to do with the world coordinates.. This is my code :

function init(self)
self.speed = 20
msg.post(“.”, “acquire_input_focus”)
–msg.post(“#camera”, “disable”)
self.velocity = vmath.vector3()
end

function update(self, dt)
go.set_position(go.get_position(id) + self.velocity)
self.velocity = vmath.vector3()
end

function on_message(self, message_id, message, sender)

end

local function look_at(target_position)
– own positon
local my_position = go.get_position()

-- calculate the angle that this object has to rotate to look at the given point
local angle = math.atan2(my_position.x - target_position.x, target_position.y - my_position.y)
-- set rotation as a quaternion
go.set_rotation(vmath.quat_rotation_z(angle))

end

function on_input(self, action_id, action)
if action_id == hash(“left”) then
self.velocity.x = -self.speed
print(“left”)
elseif action_id == hash(“right”) then
self.velocity.x = self.speed
print(“right”)
elseif action_id == hash(“up”) then
self.velocity.y = self.speed
print(“down”)
end

if not action_id then
	-- the position to look at (mouse/finger)
	local target_position = vmath.vector3(action.x, action.y, 0)
	-- rotate this object to look at the target position
	look_at(target_position)
end

end

1 Like

It looks like you’ve added the camera component to the player game object. This means that you rotate both the camera and the player sprite at the same time, so it makes it seem like the player is not rotating(because relative to the camera it’s actually not rotating).

2 Likes

Thats right. I put the Camera inside the player go. Will later try to seperate the camera and see the results. :slight_smile:

1 Like

You could simply add a GO to your main collection and make it follow player. This is what I use mostly and I have a 5 min tutorial on it if interested: Smooth Camera Follow Tutorial
It does not use the built-in function but works well in my case.

5 Likes

Thank you very much. Will try it, asap

2 Likes

My opinion as a relatively new Defold user:

Personally, I like Defold more than Godot especially because there are no high level functions like move_and_slide().
This keeps the engine smaller and easier to understand.
This keeps the documentation smaller and easier to search through.
Also, because you don’t have too many options you avoid analysis paralysis.
Of course, this could be a disatvantage for some people, based on their personality traits.

Because you have to code your own functionalities, like move_and_slide(), they could seem improvised.
I don’t think there’s need to second guess your implementation, the important stuff happens in the engine and it seems to be enough room for experimentation in the game logic.

4 Likes

You are Right. I am too corfortable with Godot :see_no_evil_monkey::rofl: I will study and Transfer my games into Defold (Defold is totally capable of this games) @Asatte couldt solve the problem with a single go that holds the camera. Will study your tutorial

2 Likes