Page 1 of 1

Differences between actual Python and Ren'Py coding

Posted: Sat Oct 25, 2014 2:49 pm
by Nathan
So I'm starting to learn the Python language so I can actually do more manipulations on a Ren'Py code(like adding GUI elements, etc...) and I wanted to know what are the differences, if any?

Like will all the basic functions from Python work on Ren'Py or does Ren'Py needs a specific coding method? I'm pretty clueless on that so any help would be welcome. Thanks and sorry if it's in the wrong forum.

Re: Differences between actual Python and Ren'Py coding

Posted: Sat Oct 25, 2014 3:50 pm
by SundownKid
Ren'py does need a specific coding method... I don't think people who learn Python will know Ren'py code that much or vice versa. I think it's possible to insert pure python code in there though.

There's basically 3 types of code in it, Ren'py code (simple, used to make the base game), Screen Language (more complex, used to make the UI) and ATL (simple, used to do animations).

Re: Differences between actual Python and Ren'Py coding

Posted: Sat Oct 25, 2014 5:56 pm
by meiri
Although Python has its similarities, I don't think it can be used in Ren'Py unless you use a python or init python block. If you're also legitimately finding you want to use Python coding in your game, it may be worthwhile to take a look at Pygame and how it can be used with Ren'Py (if it is still supported, I'm not sure.)
Anyway, like SundownKid said, Screen Language (SL) is used to make GUI. Screen language might be complex enough to support what you're trying to do, as well as maybe classes or CDDs (creator defined displayables.)

Re: Differences between actual Python and Ren'Py coding

Posted: Sat Oct 25, 2014 6:41 pm
by Nathan
meiri wrote:Although Python has its similarities, I don't think it can be used in Ren'Py unless you use a python or init python block. If you're also legitimately finding you want to use Python coding in your game, it may be worthwhile to take a look at Pygame and how it can be used with Ren'Py (if it is still supported, I'm not sure.)
Anyway, like SundownKid said, Screen Language (SL) is used to make GUI. Screen language might be complex enough to support what you're trying to do, as well as maybe classes or CDDs (creator defined displayables.)
So if I really understand, Ren'Py has it's own coding language? Where do I learn that?

Re: Differences between actual Python and Ren'Py coding

Posted: Sat Oct 25, 2014 7:16 pm
by Mithrilda
Nathan wrote:
meiri wrote:Although Python has its similarities, I don't think it can be used in Ren'Py unless you use a python or init python block. If you're also legitimately finding you want to use Python coding in your game, it may be worthwhile to take a look at Pygame and how it can be used with Ren'Py (if it is still supported, I'm not sure.)
Anyway, like SundownKid said, Screen Language (SL) is used to make GUI. Screen language might be complex enough to support what you're trying to do, as well as maybe classes or CDDs (creator defined displayables.)
So if I really understand, Ren'Py has it's own coding language? Where do I learn that?
Download it and look at the Tutorial that comes with it. Then take a look at the FAQ (http://www.renpy.org/wiki/renpy/doc/FAQ ... _Questions) and the cookbook (http://www.renpy.org/wiki/renpy/doc/cookbook/Cookbook).

Re: Differences between actual Python and Ren'Py coding

Posted: Sat Oct 25, 2014 7:39 pm
by Nathan
Mithrilda wrote:
Nathan wrote:
meiri wrote:Although Python has its similarities, I don't think it can be used in Ren'Py unless you use a python or init python block. If you're also legitimately finding you want to use Python coding in your game, it may be worthwhile to take a look at Pygame and how it can be used with Ren'Py (if it is still supported, I'm not sure.)
Anyway, like SundownKid said, Screen Language (SL) is used to make GUI. Screen language might be complex enough to support what you're trying to do, as well as maybe classes or CDDs (creator defined displayables.)
So if I really understand, Ren'Py has it's own coding language? Where do I learn that?
Download it and look at the Tutorial that comes with it. Then take a look at the FAQ (http://www.renpy.org/wiki/renpy/doc/FAQ ... _Questions) and the cookbook (http://www.renpy.org/wiki/renpy/doc/cookbook/Cookbook).
Thanks a lot! Gonna take some studying but I'll def learn it!

Re: Differences between actual Python and Ren'Py coding

Posted: Sun Oct 26, 2014 12:26 pm
by meiri
I wouldn't suggest looking at the wiki-- it's very very outdated. Rather, when you download Ren'Py, first look at the quickstart in the Ren'Py documentation to understand the basic Ren'Py coding. When you're done with the quickstart, launch the Tutorial in the Ren'Py launcher and go through it. By then you should have a pretty good understanding of Ren'Py but in case you don't, consult the documentation, not the wiki. :)

Re: Differences between actual Python and Ren'Py coding

Posted: Sun Oct 26, 2014 1:24 pm
by nyaatrap
As far as I'm understanding, Ren'py engine translates ren'py scripts into python scripts and executes them as python. Therefore, You can code all most anything in python instead of in ren'py.
(Even there are some functions which are specified to ren'py,) I think the main difference is efficiency. For example, if you want to move sprites, you have to tackle long time to get a precise result in python. But in ren'py ATL, it's a few minutes work.

Personally, I'm learning ren'py language as a python module.