ISAWHIM's Wishlist

In this forum we discuss the future of Ren'Py, both bug fixes and longer-term development. Pre-releases are announced and discussed here.
Message
Author
User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

ISAWHIM's Wishlist

#1 Post by ISAWHIM »

P.S. Wishlist item...
1: "Mobile mode" testing. (So we can adjust those values without having to load it into a mobile device.)
2: "Unused assets list" (Or checking), to see if we have items in our development folder that are not actually used in the game, so we are not distributing dead-weight. (Just has to run through the game files and see what items are not "default", or "called/loaded". Eg, old images, renamed items, missing items!)
3: Font Justify (Difficult, but highly possible without much demand, for a great short-term solution.)
4: {Space} before and after a \n being trimmed... Just one space, if it exists... Because it messes with spelling corrections and editing.

EG, "Hello it is now\night-time."

Hello it is now
ight-time.

(Can't find "ight" as a "whole word" to correct using search... would never see it as an error, it says \night, should say \nnight, which is an error for spell-checking, as is any word used after a \newline.)

If you trim the space... "This is some text \n this is your new line."

It would display this...

|This is some text|
|this is your new line.|

not this...

|This is some text | <- has dead space at end.
| this is your new line.| <- has unwanted one-space indent

Reason being, it is the end of a line, which spaces are essentially null, but, if present, can deform word-wrapping. While the "new line", should not have a leading space, unless additional spaces are added, for some reason. The single space trimmed, so it can be added, for spelling corrections and "human editing" and "searches" of words.
Last edited by ISAWHIM on Sun Feb 12, 2017 5:27 am, edited 1 time in total.

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Ren'Py 6.99.12 Released

#2 Post by Divona »

ISAWHIM wrote:P.S. Wishlist item...
1: "Mobile mode" testing. (So we can adjust those values without having to load it into a mobile device.)
Ren'Py Launcher -> Android -> Emulation -> Phone
ISAWHIM wrote:2: "Unused assets list" (Or checking), to see if we have items in our development folder that are not actually used in the game, so we are not distributing dead-weight. (Just has to run through the game files and see what items are not "default", or "called/loaded". Eg, old images, renamed items, missing items!)
Would be nice.
ISAWHIM wrote:3: Font Justify (Difficult, but highly possible without much demand, for a great short-term solution.)
justify - boolean
If true, additional whitespace is inserted between words so that the left and right margins of each line are even. This is not performed on the last line of a paragraph.
Completed:
Image

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2384
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Ren'Py 6.99.12 Released

#3 Post by Ocelot »

2: "Unused assets list" (Or checking), to see if we have items in our development folder that are not actually used in the game, so we are not distributing dead-weight. (Just has to run through the game files and see what items are not "default", or "called/loaded". Eg, old images, renamed items, missing items!)
Almost impossible in general case:

Code: Select all

init python:
    for (monster_name, images) in load_json('monster_data'):
        sprites[monster_name] = [Image(path) for path in images]
Even something like DynamicImage will break automatic recognition, potentially resulting in a number of false positives.
< < insert Rick Cook quote here > >

User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Re: Ren'Py 6.99.12 Released

#4 Post by ISAWHIM »

Ocelot wrote:
2: "Unused assets list" (Or checking), to see if we have items in our development folder that are not actually used in the game, so we are not distributing dead-weight. (Just has to run through the game files and see what items are not "default", or "called/loaded". Eg, old images, renamed items, missing items!)
Almost impossible in general case:

Code: Select all

init python:
    for (monster_name, images) in load_json('monster_data'):
        sprites[monster_name] = [Image(path) for path in images]
Even something like DynamicImage will break automatic recognition, potentially resulting in a number of false positives.
No, it would just take longer to do... When it compiles, it looks for each image/file that exists. That is why I said a list. If you know they are somehow reffed outside of the scope of the project, you can ignore those. However, it would just load that data, as the program is going to, and find each "monster_data" image name. Dynamic is the same... it is only dynamic in code, to you. To the program it is just image#1232423, which is bob_shoe_happy, made of append_shoe append_happy, in code.

Nothing false if you ask it to load an image that doesn't exist... It is not like it has to play the game to see what images/files are needed. (However, if you have dead code to an image that the code is never called, that too should be reported. Functions without entrance-points to them, or jumps over code that never enters an area, shouldn't even be compiled, and would also alert you of an issue, if you find it says an image isn't used, that you know it is... or should be.)

Like I said, a wish list...

Oh, one more...

5: Folder-assumption, for images... "bob happy", looking in folder "bob" for "happy", not looking in folder "bob" for "bob happy", or folder "bob happy" for file "bob happy". Tried that with a few images, and ended-up resorting to just throwing all images in the root folder, because I didn't want to have to keep typing each folder-name and that damn slash and quotes, when quick-loading images with "show bob happy". :P

User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Re: Ren'Py 6.99.12 Released

#5 Post by ISAWHIM »

Divona wrote:
ISAWHIM wrote:3: Font Justify (Difficult, but highly possible without much demand, for a great short-term solution.)
justify - boolean
If true, additional whitespace is inserted between words so that the left and right margins of each line are even. This is not performed on the last line of a paragraph.
Doesn't work...
T = character(what_justify=true)
ERROR: Name 'true' is not defined

Does work...
T = character(what_italic=True)
T = character(what_bold=True)
T = character(what_size=10)

User avatar
Divona
Miko-Class Veteran
Posts: 678
Joined: Sun Jun 05, 2016 8:29 pm
Completed: The Falconers: Moonlight
Organization: Bionic Penguin
itch: bionicpenguin
Contact:

Re: Ren'Py 6.99.12 Released

#6 Post by Divona »

ISAWHIM wrote: Doesn't work...
T = character(what_justify=true)
ERROR: Name 'true' is not defined)
"True" with capital "T".

Code: Select all

T = Character(what_justify=True)
Completed:
Image

User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Re: Ren'Py 6.99.12 Released

#7 Post by ISAWHIM »

Divona wrote:
ISAWHIM wrote: Doesn't work...
T = character(what_justify=true)
ERROR: Name 'true' is not defined)
"True" with capital "T".

Code: Select all

T = Character(what_justify=True)
Seriously... xD
Why is that case sensitive? (And why Ucase for that, but everything-else is Lcase? Nevermind... don't want to know... I am sure it's a unix thing. :P)

P.S. Thanks, that made my day... I wish it just said {True/False} (case sensitive) instead of "boolean"... boolean is 0 or 1, or true/false, or yes/no, in any case. Must have done the same thing the first time I tried it, and it didn't work there. Figured it only worked in other places... Just wasn't sure where. Took me forever to figure-out that I had to add "what_" to those things, to get them to work in the "say_" window. I am still thinking javascript... I keep wanting to type say.what.font.align=justify

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2384
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Ren'Py 6.99.12 Released

#8 Post by Ocelot »

No, it would just take longer to do...
I think, you are underestimating the problem. To make sure that image file is loaded anywhere (in image definitions, screens, somewhere else, which can happen outside init blocks) you will need to test every single path code can take, with every possible value of all variables. This is askin to perform complete statical code analysis, which is simply not possible.

An example: you have images 1.png, 2.png, 3.png and 4.png. And DynamicImage('[some_variable].png')
Now you have the code:

Code: Select all

def generate_value():
    # This will generate 1-3 values
    while True:
        if ...: #a convouted expression relying on many variables outside of scope of function
            break
        yield renpy.random_number(1, 3)
    # Unless previous loop terminates, in which case it will always generate 4
    while True:
        yield 4

def this_is_run_every_interaction():
    store.some_variable = value.next()
this_is_run_every_interaction.value = generate_value()
To detect, whether 4.png is actually used or not, you need to solve halting problem. Which is unsolvable. The end.

This is actually why many games contains unused/cut/etc. data in them: because it is not possible to detect if it actually used automatically and to do it manually is too much work.
boolean is 0 or 1, or true/false, or yes/no
Why is that case sensitive?
It is true/false formatted according to Python guidelines (Singleton names use UpperCamelCase)
< < insert Rick Cook quote here > >

User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Re: Ren'Py 6.99.12 Released

#9 Post by ISAWHIM »

Ocelot wrote:
boolean is 0 or 1, or true/false, or yes/no
Why is that case sensitive?
It is true/false formatted according to Python guidelines (Singleton names use UpperCamelCase)
We aren't using python, we are using RenPy... it should be formatting it to frogger format, or whatever oddball must-have-but-doesn't-actually-matter format for geek-pride, that it needs...

Can "true" be anything-else, and not conflict... possibly, but who would do that? No-one, because it is expected that "true" is a boolean value, not a "word", when directly followed by a specific demanded item that expects a boolean as a value. (Actually it isn't a function, a class, a modifier, or anything-else, so demanding that it is CamelCase, for a single word, is not only stupid, but redundant... it's only one word! There is no "second hump". But what python needs is irrelevant to what we feed RenPy as code. RenPy should be feeding it the correct hump, at compile-time. Just like it feeds it something-else when we type renpy.somethingelse, which is not python-code.)

In any event, thank-you... But this is the oddball stuff I am talking about, that doesn't have to be so oddball... it just is, just because... Great, they want everyone to wear suits and ties, but they are just making everyone have tons of needless type-o's that are not type-o's but actually just 1337 geek BS connotations of nothings.

Hey Bob, why did 10,000 airplanes crash from our code... I forgot my camel-humping on a boolean!

User avatar
Ocelot
Lemma-Class Veteran
Posts: 2384
Joined: Tue Aug 23, 2016 10:35 am
Github: MiiNiPaa
Discord: MiiNiPaa#4384
Contact:

Re: Ren'Py 6.99.12 Released

#10 Post by Ocelot »

We aren't using python, we are using RenPy
Which is built on top of Python, uses Pyton-like syntax, allows embedding of Python code and explicitely defers to python-expression in every second RenPy statement definition.
Rule of thumb: if you see braces anywhere, what inside of them is going to be parsed as Python code. Whatever is between for/while/if and a semicolon? Python code. After = in define/default statements? Python code.

You cannot suit everyone. I personally prefer parameters to be from_where, to_where and not other way around. But majority disagrees with me and uses Intel assembly syntax. I am an oddball with AT&T. C++ uses my prefered scheme, C does not. C++ also allows use of C standard library, so you need knowledge where particular function came from to use it correctly.

What is important is internal consistency in language, so there are no things which will defy its internal logic. In Python True/False are not keywords but singletones, so their names are formatted as singleton names. Same thing with None.
Beats PHP, where there are things which looks like functions, used as functions, documented as functions, but are not functions and do not work with function related stuff. And where standard library cannot decide on order of arguments and naming scheme.

You can add following code if you prefer lowercase names:

Code: Select all

init -999 python:
    true = True
    false = False
< < insert Rick Cook quote here > >

User avatar
ISAWHIM
Veteran
Posts: 318
Joined: Sun Nov 06, 2016 5:34 pm
Contact:

Re: Ren'Py 6.99.12 Released

#11 Post by ISAWHIM »

Ocelot wrote: You can add following code if you prefer lowercase names:

Code: Select all

init -999 python:
    true = True
    false = False
Slick... What about the new replace function that I thought I saw RenPy has?
Didn't catch how to use it, but I think it said it does a "replacement", prior to compile, of all text? (Wasn't sure if that meant only in "Quotes", as "text".)

That was just a rant, by the way. I have to deal with that inconsistent stuff in javascript at times too... getElementById[]. My compiler changes most things to the correct case, when I compile the code. I no-longer use notepad, due to stuff like this dragging me down and slowing development looking for type-o's and malformed 1337 text. But it should not demand that for "values", since, as I said, booleans are not True and False, but 0 or 1, and the compiler turns the "word" into the value. It's just another annoying thing that coders did, which didn't have to be done, and probably cost them more compile-time and programming time to force that oddity, rather than to just accept the "word" as the "word". (Does 0 and 1 even work?)

This is also why I think RenPy really needs an actual development platform. So if "True" or "False" is the only accepted possible thing after "something =", then that is all you can type... Hit T and it spit-out "true", hit F and it spits-out "false"... If something expects three tuples, it indicates what they are, or limits you to entering only what is valid, if that is known. (Still, that specific thing should just accept "True" or "TRUE" or "true" or "1" and even "Yes" as a possible value. Otherwise, it is essentially just a predefined constant. Which, it is... in reality.)

Okay, done with the wish-list and general rant. :P

Still think this is the best build so far!

User avatar
gas
Miko-Class Veteran
Posts: 842
Joined: Mon Jan 26, 2009 7:21 pm
Contact:

Re: ISAWHIM's Wishlist

#12 Post by gas »

As for booleans, you have to satisfy math people that want to use exact conventions, so in Boole logic False is False, not 0 (while 0 and 1 are used in some context as arbitrary REPRESENTATIONS of those elements). That is done in python to avoid conflict with math operators.
And False - False in logic IS different than 0-0 in math.
Python can manage Boole logic, if not you had to recreate it with conditionals and fake operators (your mathematical 0 and 1).

As a rule of thumb, if something was done by 2 generations of north european engineers, is done for a smart reason. Layered above years of smart development.
Even the lacking of a "development platform" have a sense.
If you want to debate on a reply I gave to your posts, please QUOTE ME or i'll not be notified about. << now red so probably you'll see it.

10 ? "RENPY"
20 GOTO 10

RUN

Apa
Regular
Posts: 103
Joined: Fri Dec 23, 2016 2:26 am
Location: NYC
Contact:

Re: Ren'Py 6.99.12 Released

#13 Post by Apa »

Divona wrote:
ISAWHIM wrote:1: "Mobile mode" testing. (So we can adjust those values without having to load it into a mobile device.)
Ren'Py Launcher -> Android -> Emulation -> Phone
It has nothing to do with "Mobile mode" testing, unfortunately. Game can work just fine in RenPy Android Emulators and won’t work as expected on pretty much any real Android device. Most of Android questions are about these behavior differences.
AFAIR, PyTom wrote few times already - he won’t touch any Android stuff until v7 is out and tested thoroughly. :(

User avatar
xavimat
Eileen-Class Veteran
Posts: 1460
Joined: Sat Feb 25, 2012 8:45 pm
Completed: Yeshua, Jesus Life, Cops&Robbers
Projects: Fear&Love, unknown
Organization: Pilgrim Creations
Github: xavi-mat
itch: pilgrimcreations
Location: Spain
Contact:

Re: Ren'Py 6.99.12 Released

#14 Post by xavimat »

ISAWHIM wrote:We aren't using python, we are using RenPy...
Another (humble) point of view from a non-expert in coding.
In Ren'Py, python code can be added with a simple $, so, in specific lines, to set a variable we are not using Ren'Py, but python.
If Ren'Py accepted "true" but Python didn't, we could have this code:

Code: Select all

if a == true: # <-- Ren'Py code
    $ b = True  # <-- Python code
This would be very confusing for non professionals like me. In my amateur experience, is way better to be told: "use case-sensitive True, because Python is case-sensitive. Period."

I also find very useful some conventions like defining classes with capitalized words, variables in lowcase, and constants in uppercase.
(But this is only my experience)
Comunidad Ren'Py en español: ¡Únete a nuestro Discord!
Rhaier Kingdom A Ren'Py Multiplayer Adventure Visual Novel.
Cops&Robbers A two-player experiment | Fear&Love Why can't we say I love you?
Honest Critique (Avatar made with Chibi Maker by ~gen8)

Human Bolt Diary
Regular
Posts: 111
Joined: Fri Oct 11, 2013 12:46 am
Contact:

Re: Ren'Py 6.99.12 Released

#15 Post by Human Bolt Diary »

ISAWHIM wrote:
Ocelot wrote: You can add following code if you prefer lowercase names:

Code: Select all

init -999 python:
    true = True
    false = False
Slick... What about the new replace function that I thought I saw RenPy has?
Didn't catch how to use it, but I think it said it does a "replacement", prior to compile, of all text? (Wasn't sure if that meant only in "Quotes", as "text".)

That was just a rant, by the way. I have to deal with that inconsistent stuff in javascript at times too... getElementById[]. My compiler changes most things to the correct case, when I compile the code. I no-longer use notepad, due to stuff like this dragging me down and slowing development looking for type-o's and malformed 1337 text. But it should not demand that for "values", since, as I said, booleans are not True and False, but 0 or 1, and the compiler turns the "word" into the value. It's just another annoying thing that coders did, which didn't have to be done, and probably cost them more compile-time and programming time to force that oddity, rather than to just accept the "word" as the "word". (Does 0 and 1 even work?)

This is also why I think RenPy really needs an actual development platform. So if "True" or "False" is the only accepted possible thing after "something =", then that is all you can type... Hit T and it spit-out "true", hit F and it spits-out "false"... If something expects three tuples, it indicates what they are, or limits you to entering only what is valid, if that is known. (Still, that specific thing should just accept "True" or "TRUE" or "true" or "1" and even "Yes" as a possible value. Otherwise, it is essentially just a predefined constant. Which, it is... in reality.)

Okay, done with the wish-list and general rant. :P

Still think this is the best build so far!
Frankly, you're just wrong. Do not, under any circumstances, use that above code. Do not alias True/False. Ever. I'm serious. It's a bad idea of biblical proportions. I cannot stress this enough. You could technically use 1 and 0 instead of True/False in some situations but you should also never do this. You're going to have a bad time. Python is built on the concept of there being one and only one correct way to solve a problem. Holding yourself to the accepted standards for the language makes your code easier to read and maintain. You eliminate unpredictability and make IDEs not scream and cry and wet themselves miserably when looking at your code. Python has so many elegant tools and patterns that it's really a waste of your time to dig your heels in and go "functions are camelCase in Java and I know Java so I'm going to write my Python like Java. yolo!" Congratulations... you're the guy everyone hates to work with.

Get an IDE. There's Ren'py plugins for many of them. Hire a small ugly man to poke you with a cattle prod whenever you try to write code in a vanilla text editor.
Learn Python. Just do it. It's easy if you try. Stop thinking to yourself "I wish it worked like JavaScript/PHP/Ruby/C++/etc". Banish those thoughts. Create a mental environment where thinking that is the equivalent of asking a pious Jew why he can't just, like, eat a pork chop once in a while.
Learn the language Ren'Py uses and makes available to you. Stop blaming the tools; blame yourself for not having the skill to use them.
No more excuses. Sit down, write Python. Write good Python. Write Python that can be pointed to as a shining example.

Is this harsh? You're damn right it is, but a house can't be built out of straw or sticks. You need brick. We need good code and we need programmers able to write it. Be the brick.

Post Reply

Who is online

Users browsing this forum: No registered users