First, I want to thank you for taking the time to explain in detail. Thank you very much!
So
"d" is just
**kwargs ? Oh my god, this is such a simple explanation, but I would never have figured it out from the documentation.
Now everything immediately became clear after your words.
Code: Select all
d = {
'size' : (self.sizes),
'pos' : (self.x, self.y)
}
return Transform(self.path, **d)
Now it is clear why this option will not work:
Code: Select all
Transform(self.path, size=(self.sizes)) + pos(self.x, self.y)
Looking at this pattern
Code: Select all
Transform('images/' + name + '.png', size=(width, hight)) pos(pos)
# is the same as:
Transform('img_path', img_size=(couple)) pos(couple)
I didn't look at the
Transform() function as a whole with positioning.
Transform() is separately in its own brackets, pos() is also separate. I thought that these are separate functions and they cannot be linked together, and I did not think that I could pass something to
Transform () separated by commas, as you showed:
Code: Select all
return Transform(self.path, size=(self.sizes), pos=(self.x, self.y))
All I needed was a comma and "="... Oh my god... When someone explains it becomes so easy.
Thank you very much! Now I will apply this knowledge in solving other problems.
-------------------------
Yes, you are right, I was really very upset. For me, each task is a collision with insurmountable difficulties in solving this task.
Before creating a topic, I can search Google for answers for a couple of days and experiment. I get frustrated every time.
I know Python a little and I love it very much. Python is an amazing language, I love its syntax, concept and flexibility.
And renpai is a fairly simple game engine with a simple syntax.
It seems that the combination of python and Renpy should be very simple, and if you can write a neural network in python, then you can also write a simple output of the image
Renpy.image(...)
But very often the solution is not obvious. The solution needs some syntax that is not in the documentation. In my last question, the person told me that there are no examples in the documentation, and many things are simply not described there, so you just need to know them or come to an understanding on your own.
I didn't mean to be rude. Of course, I understand that both Renpy and the documentation are all provided free of charge to people and devs are under no obligation to make the best documentation on the web. But still, sometimes it seems that devs are not so much interested in people understanding their language.
I mentioned this because I have a simple idea - to improve the documentation a bit so that it becomes easier for all other people to understand Renpy. I think everyone will like it if the documentation is more meaningful and informative, and there are real examples in it.
Documentation is just html code. It is not difficult to add a few examples to the html page. I think you will agree with me that this is a fairly simple fix.
But I am nobody. I'm not good with Renpy. I don't even know how to contact the Renpy authors. But I am sure that there are other people who know how to influence the situation. They can ask the right people to expand the documentation. They can prepare the necessary code so that the devs simply update the contents of the documentation pages.
This is not only about me, but also about thousands or tens of thousands of people who will be able to read more meaningful documentation. It's not just about today and tomorrow, but about years and decades, during which all people will be able to read meaningful documentation.
If you do it right now, then everyone will be fine.
I think a lot of the daily questions in this and other forums are related to the fact that the documentation does not have the right example. But to solve this problem and help all people at once - you don't need to add something to the game engine, decompile / compile, or anything so complicated. It's enough just to change the html code with CTRL+C and CTRL+V. Well, update the content of the site.
I saw other documentation and there was a similar situation. Often the documentation is more like a reference book to remind you what the thing does. But the documentation does not decompose the essence of this thing into atoms, so that everyone who reads the documentation understands it so well that he does not have any questions left.
As a result, the bulk of knowledge is in the head of hundreds of people who share it with those who are looking for answers to their questions. But those answers might be in the documentation. I just don't understand why the documentation is the way it is, because it could be done better. This will save a lot of people a lot of time. I'm just wondering why it's like this:
1. devs want simplicity and minimalism? They do not want to load the code with unnecessary information?
2. devs are busy with the engine itself and hundreds of tasks and they have no time to deal with documentation?
3. devs think this information is enough?
4. some other options.
Why do many documentations look like a reference book, but not a textbook?
I just want to make it clear that I'm talking not only about myself and not about my tasks, but about the entire community. And I'm not talking about the here and now, but about decades of using Renpy. The richer the documentation, the more games there will be in the gaming industry that will give us all pleasure. The easier it is to understand Renpy, the more people will be able to master it. Some people drop out of studying because it seems difficult to them, but these people can be very talented writers and artists and they could make masterpieces for the gaming industry.
But perhaps their thinking is arranged differently and it is difficult for them to understand the "dry", official, "serious" language of documentation. There are different types of thinking, different levels of perception of information. There are humanitarian education and technical. It is easier for people with a technical background to read documentation.