Thing is not only that Lua and Defold are new for me. I really do think tutorial is a little bit soggy.
I’m currently on the Step 5, and (boy!) it’s hard.
Like, I create ground.collection and move it to main.collection, and then all out of sudden I have to move it out of the main.collection to the level.collection.
Then I have to put script, that means literally nothing to me -
go.property(“speed”, 6)
function init(self)
msg.post(“ground/controller#script”, “set_speed”, { speed = self.speed })
end
Since I know how it’s important to understand relationships between objects/classes/methods/instances/whatever, I’m really trying to understand what’s going on in this part. But I can’t.
The tutorial really missing explanation, and have some inaccurate steps, like in Step 4 it’s missing “rename new folder to a “hero””
Create a new folder by right-clicking in the Project Explorer and selecting New ▸ Folder. Make sure to not select a folder before clicking or the new folder will be created inside the marked one.
Create a new atlas file by right-clicking the “hero” folder and selecting New ▸ Atlas File. Name the file “hero.atlas”.
Besides that - I think it’s really better to start with a top-down shooter type of game, for a 2D engine. It starts slowly, and brings solid understanding on why and what you’re doing -
- Import character sprite
- Assign sprite to new object
- Make it move on X and Y coords (basic input, variables)
- Make it rotate, in order to follow movement direction (modifying sprite’s values)
- Make a wall (collisions)
- Make a pickable (swap image, increment some value, destroy instance)
- Add a gun, and make it shoot a bullet (create new instance, message data to it)
- Add simple enemies to shoot (modifying collision script so it will be universal/incapsulated, and will work for character+wall collisions, bullet+enemy, bullet+wall, enemy+wall, etc.)
- Add simple AI for enemies (state machine)
- … whatever. Every possible algorithm and function can be used, it’s easy to control the learning curve.
PS. Sorry if my post looks aggressive - it’s hot and stuffy as hell in the room, and I’m little bit annoyed because of it