I will now carefully tug at the wizard's sleeve, hoping for some attention.

Discuss how to use the Ren'Py engine to create visual novels and story-based games. New releases are announced in this section.
Forum rules
This is the right place for Ren'Py help. Please ask one question per thread, use a descriptive subject like 'NotFound error in option.rpy' , and include all the relevant information - especially any relevant code and traceback messages. Use the code tag to format scripts.
Post Reply
Message
Author
User avatar
Bill_Ames
Newbie
Posts: 20
Joined: Sat Apr 13, 2019 2:00 pm
Contact:

I will now carefully tug at the wizard's sleeve, hoping for some attention.

#1 Post by Bill_Ames »

I am looking for a sample script that contains only good programming style. It should be profusely commented for the benefit of a newbie or to show for a pro that proper documentation makes code maintenance much easier.

It should use as many of the optional code that can help a newbie programmer to understand what they "can do," it may be things a pro would not bother with. I refer to some of the code in the options.rpy file.

It should also show how code should look. While I am not a programmer, I had programmed in the Wintask language when I needed to provide tests for a mass spectrometer.

I also know that there are things that a programmer can do that is not obvious in the code or covered adequately by user documentation. Use of such code must be well documented in the script.

If you want to use someone else's code that is fine, but it should come with comments. If it does not, and you can not comment it properly because you do not know what it is doing you should not use it. Documenting your code will make it more desirable for others to use.

I am very new to Ren'Py so let me ask, is this a totally script driven language, no wizards, no drop and drag building?
Bill Ames -
Permutations of issues and discerning detail with skill

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3785
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: I will now carefully tug at the wizard's sleeve, hoping for some attention.

#2 Post by Imperf3kt »

Yes, Ren'Py is almost entirely scripted.

PyTom did create the interactive director which can help you create your game a bit more wysiwyg style, but it isn't quite the same as a drag and drop system.

One user here has created Xen'Py, a visual editor for Ren'Py.
I have no experience with either.


I myself am making (or rather it is on my to do list) a script editor with Ren'Py itself that should allow one to drag and drop elements and get their coordinates, place it in the script for them, customise the GUI, etc.

Preliminary experiments are promising, but it is a very, very long way from complete.

The documentation, though a bit confusing at first, slowly becomes more and more dependable as you familiarise yourself with Ren'Py. The cookbook section of the forum contains some examples and free code to help speed you along as well.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
Bill_Ames
Newbie
Posts: 20
Joined: Sat Apr 13, 2019 2:00 pm
Contact:

Re: I will now carefully tug at the wizard's sleeve, hoping for some attention.

#3 Post by Bill_Ames »

I am a strong proponent of doing things with a script and having a quick way of previewing your errors. There is wonderful satisfaction learning what to do, doing it, have it work AND pass a code review. Are their people to do code reviews here? Just because it works does not make it good code, but I know you know that.

Doing code that works for me requires a rough design specification, are there any templates available for that?

Documentation that is not the best hurts the newbie most. When I started using Wintask I discovered it had poor documentation and less quality in the examples. Is there a list of functions available? Thank you for your time.
Bill Ames -
Permutations of issues and discerning detail with skill

User avatar
Imperf3kt
Lemma-Class Veteran
Posts: 3785
Joined: Mon Dec 14, 2015 5:05 am
itch: Imperf3kt
Location: Your monitor
Contact:

Re: I will now carefully tug at the wizard's sleeve, hoping for some attention.

#4 Post by Imperf3kt »

Most Python (2..7) functions work or can be imported, so that gives way for anything you can think of and make with Python.

For Ren'Py specific functions, the general index is comprehensive of all available functions and pythonic code used by / in Ren'Py

https://www.renpy.org/doc/html/index.html#indices

For code review, there is no dedicated subforum for it, but many peers will look it over freely and notify you of anything they think you might improve, if you post and ask for it.
We have several very skilled users here who are generally very helpful.

PyTom, Ren'Py's creator / maintainer, is an active member here and occasionally responds directly to any requests for help or advice. He also has a Patreon where he posts many useful features and explanations of Ren'Py and its use and inner workings.
Warning: May contain trace amounts of gratuitous plot.
pro·gram·mer (noun) An organism capable of converting caffeine into code.

Current project: GGD Mentor

Twitter

User avatar
Bill_Ames
Newbie
Posts: 20
Joined: Sat Apr 13, 2019 2:00 pm
Contact:

Re: I will now carefully tug at the wizard's sleeve, hoping for some attention.

#5 Post by Bill_Ames »

Thank you, my quest has been achieved.
Bill Ames -
Permutations of issues and discerning detail with skill

Post Reply

Who is online

Users browsing this forum: No registered users