Thanks for the update, looking forward to seeing it completed
Progress on getting the text up:
It’s a little mind numbing doing all of the formatting and setup so I’ve been going kind of slow but it’s getting done!
WOW!!! thats amazing! thank you man!!!
Great!! Thanks!
Online reading showing error. “Failed to ungzip body:EOF”
When does this happen? I can’t seem to reproduce.
If it happens again please post a screenshot? I’ll report the issues to GitBook devs.
Hey @Pkeod i’m reading your book. there are amazing tips. But about the thread to translate it to others languages…
What is yout plan (strategy) to do it?
- The volunteer is free to create another gitBook account and translate? or
- or the gitBook offers support to multiple languages?
- or is there another way?
They appear to support multiple languages but I’ve not tested yet.
https://toolchain.gitbook.com/languages.html
What I’m going to do soon is add the gitbook project to a github repo which is automatically synced, and then I can add contributors to the github repo who can add translations. Then it should hopefully just work to have
https://read.bookofdefold.com/en/
https://read.bookofdefold.com/ru/
https://read.bookofdefold.com/de/
and so on. And other volunteers / defold team members who are added to the git as admins can accept pull requests for text corrections / additions over time.
Please wait until I setup the github repo before doing translation so you can work from the raw files. I still have more setup work to do that I’ve not had time to do yet.
OK i’m keep waiting your signal to start it
Pkeod - It seems that the book on github wasn’t updated in the last 7 months - do you have plans on finishing it? I really try to like Defold but there are some things that I really don’t like and a book on the engine might help me getting started (for example the rotation system using quaternions - why can’t I get a simple rotate() method? Also the message system which relies on strings…).
Off-topic but I’d like to comment anyway. Rotation using quaternions is almost a de-facto standard in game engines. Defold also provides support for euler angles, but you should try to get to terms with quaternions.
There’s a go.set_rotation():
-- rotate 45 degrees around the z-axis
go.set_rotation(vmath.quat_rotation_z(math.rad(45))
There’s also go.set(".", "euler.z")
and go.animate(".", "rotation.z", ...)
Not quite. It relies on hashed strings. There’s a difference (performance mainly). If you’re worried about typos and refactoring you can store all hashed message ids in a Lua module. Change in a single place instead of all over. And until we’re adding static code analysis to our internal editor you can use Atom with a Lua linter to get a warning if you’re mistyping a message id reference when you have them stored in a module.
Okay first of all - that was a fast reply. I’m officialy impressed.
With rotate() I mean: rotate x degree / rad from your current rotation. So rotate() is not the same as set_rotation() (which I’m aware of). For the very simple act of rotating a thing from its current rotation the following code is needed:
go.set_rotation(go.get_rotation() * vmath.quat_rotation_z(x_rad))
Which seems ridiculous to me. What I’d like to see is:
go.rotate(x_rad)
Done. That’s the way it’s handled in the Godot game engine.
I couldn’t get rotation using the euler propertie to work for rotations > 90 degree. The game object seemed to get stuck at this value.
Regarding the messaging system - it’s fine for most things, but why isn’t there a method acquire_input_focus()? From a user perspective it just seems so much easier.
But I’ll keep using the engine for the next week or so and see if I can get used to it because I really want this relationship to work out
Yes, that’s more cumbersome for sure. I’m not going to deny that. Even though it might be a candidate for an engine provided function there really is nothing stopping you from adding these kind of utility functions in a Lua module.
I agree. I don’t know why really. I usually use this Lua module when I need to deal with user input in Defold:
https://github.com/britzl/ludobits/blob/master/ludobits/m/input.lua
I’ve been on contract work most of this year but have less obligations now. Editor 2 seems close to release so it’s a good time to put the time in. Glad @britzl could help you!
what happened to this?
Gitbook changed their site to a new version with entirely different features, I’m moving the old text over and also updating it as I go, adding screenshots of new editor, redoing some examples. It is tedious and time consuming and I don’t have a ton of free time right now for how much time it needs so progress is slow.
There’s a lot which has not been seen before like https://www.bookofdefold.com/dive-into-defold/avoider/ but it will all get published eventually…
I see,
I’m slacking off with my self learning of Defold , I think your book could be really good for someone who does not want to be distracted by the Internet(such as me unfortunately).
I’m looking forward for this , thanks for the reply
Yes! Books are great. I spend so much time helping students who would prefer a book, but have been obliged to do online courses.
(Although I think it’s actually an online book)
@Pkeod I saw some cool shader effects in this thread like the blur or the sine wave distortion shaders. However, I cannot manage to find the sections about those concepts inside your book. I can’t find projects in the github repo of the book either. Could you give me link to those so I could take a look at your code ?
There are some blur examples here https://github.com/subsoap/deffx/tree/master/deffx/materials/rendertarget
Here is another blur shader made by someone else https://www.defold.com/community/projects/125545/
There are more materials here
FXAA Render Target example + FXAA
Keep in mind with all things material if things don’t work right check the builtin materials for breaking changes that are possible when using other stuff a few years old.
I still have work and plans left for the book and stuff beyond it but I’m focusing on gamedev right now. Will probably focus on this again after the next game is done later this year!