Filename case sensitivity

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
RedSlash
Veteran
Posts: 351
Joined: Sun Oct 31, 2004 12:48 am
Location: Canada
Contact:

Filename case sensitivity

#1 Post by RedSlash »

I'm not sure if this has been addresed before, but I know that ren'py is supposed to be multi-platform, but there is something that breaks this platform portability and I think that maybe people should be notified about this and this issue is filename case-sensitivity.

I noted this problem when I tried to download BCS's CC game here:
http://lemmasoft.renai.us/forums/viewto ... 2&start=15
and found out that it crashed out on me. It tried to load a file called 'titlescreen1.JPG', and when I looked in the game directory, I found a file called 'titlescreen1.jpg'. Only problem is that on windows, this loads fine b/c windows does not care about the case in filenames, but on case-sensitive OS's like Linux, it crashes because the two filenames are different.

I was thinking itd be a good idea to include a note about this in the new documentation or tutorial.

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#2 Post by PyTom »

Lint checks for this. It's a common enough sort of mistake, however, that I'm debating if I should simply make the system case-insensitive in 5.6. I haven't decided yet.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Jake
Support Hero
Posts: 3826
Joined: Sat Jun 17, 2006 7:28 pm
Contact:

#3 Post by Jake »

PyTom wrote:I'm debating if I should simply make the system case-insensitive in 5.6. I haven't decided yet.
Along the same lines, I've not tried this, but does Ren'Py raise an error when someone tries to load a graphic that has two potential sources discriminated only by case? If I [carelessly] wrote a script on Linux that uses three totally different backgrounds called bg.PNG, BG.png and Bg.png then it presumably would work how I expect, but those files would overwrite each other on an Windows/NTFS system...
Making the whole thing platform-independently case-insensitive may or may not at least highlight the problem on a non-Windows machine, I guess, depending on how you go about it.
Server error: user 'Jake' not found

shaja
Regular
Posts: 73
Joined: Sun Oct 16, 2005 8:34 am
Contact:

#4 Post by shaja »

Jake wrote:I expect, but those files would overwrite each other on an Windows/NTFS system...
Making the whole thing platform-independently case-insensitive may or may not at least highlight the problem on a non-Windows machine, I guess, depending on how you go about it.
HFS+, the default filesystem for OS X, is also case-insensitive.

It seems like a pretty edge case that someone would actually give their files names differing only in case, even on filesystems that support it.

So, making Ren'Py case-insensitive sounds like a good idea to me.

Watercolorheart
Eileen-Class Veteran
Posts: 1314
Joined: Mon Sep 19, 2005 2:15 am
Completed: Controlled Chaos / Sum of the Parts / "that" Midna game with ZONEsama
Projects: Sparse Series/Oddments Shop original cartoon in Pevrea; Cybernetic Duels (fighting game); Good Vibin'
Organization: Watercolorheart Studios
IRC Nick: BCS
Tumblr: adminwatercolor
Deviantart: itsmywatercolorheart
Github: Watercolordevdev
Skype: heartnotes
Soundcloud: Watercollider
itch: watercolorheart
Location: Florida
Contact:

#5 Post by Watercolorheart »

Oy, I didn't even know this. I'll fix it before the next release, when I finish writing Chapter Three. I'm sure with the implementation of a limited set of sprites, I missed more errors somewhere in there ...

User avatar
PyTom
Ren'Py Creator
Posts: 16096
Joined: Mon Feb 02, 2004 10:58 am
Completed: Moonlight Walks
Projects: Ren'Py
IRC Nick: renpytom
Github: renpytom
itch: renpytom
Location: Kings Park, NY
Contact:

#6 Post by PyTom »

I have a couple of other ideas on tap for 5.6, related to making things easier to use:

- We will allow colors to be expressed as "#rrggbb" and "#rrggbbaa" strings, along with 4-tuples, everywhere colors are used.

- We will allow images to be given as strings, everywhere images are used. (Including in styles).

- We will check, and complain if a style is used but not defined.

I'm also trying to come up with a better way of handling selected button styles, as the current way seems to be pretty lousy. I'm leaning towards allowing one to prefix style properties with selected_, but I'm not sure that's the best solution. It breaks backwards compatibility, so I'm not sure it's worth it.
Supporting creators since 2004
(When was the last time you backed up your game?)
"Do good work." - Virgil Ivan "Gus" Grissom
Software > Drama • https://www.patreon.com/renpytom

Watercolorheart
Eileen-Class Veteran
Posts: 1314
Joined: Mon Sep 19, 2005 2:15 am
Completed: Controlled Chaos / Sum of the Parts / "that" Midna game with ZONEsama
Projects: Sparse Series/Oddments Shop original cartoon in Pevrea; Cybernetic Duels (fighting game); Good Vibin'
Organization: Watercolorheart Studios
IRC Nick: BCS
Tumblr: adminwatercolor
Deviantart: itsmywatercolorheart
Github: Watercolordevdev
Skype: heartnotes
Soundcloud: Watercollider
itch: watercolorheart
Location: Florida
Contact:

#7 Post by Watercolorheart »

PyTom, I left you a message about transitions in the private PM system of this forum, because I was a bit embarassed to ask ... I also e-mailed you a mock-up ...

RedSlash
Veteran
Posts: 351
Joined: Sun Oct 31, 2004 12:48 am
Location: Canada
Contact:

#8 Post by RedSlash »

If I [carelessly] wrote a script on Linux that uses three totally different backgrounds called bg.PNG, BG.png and Bg.png
Well... this is bad practice, even on a UNIX system. I'd assume most UNIX users would understand not to do this.
I'm debating if I should simply make the system case-insensitive in 5.6. I haven't decided yet.
Well, something that could be handy would be a flag I can pass to ren'py on the commandline to treat filenames as case-insensitive. I think having some note in the doc or tutorial would be enough; I wouldn't want to bother you to go through the trouble of adding extra code for such a minor problem.

Watercolorheart
Eileen-Class Veteran
Posts: 1314
Joined: Mon Sep 19, 2005 2:15 am
Completed: Controlled Chaos / Sum of the Parts / "that" Midna game with ZONEsama
Projects: Sparse Series/Oddments Shop original cartoon in Pevrea; Cybernetic Duels (fighting game); Good Vibin'
Organization: Watercolorheart Studios
IRC Nick: BCS
Tumblr: adminwatercolor
Deviantart: itsmywatercolorheart
Github: Watercolordevdev
Skype: heartnotes
Soundcloud: Watercollider
itch: watercolorheart
Location: Florida
Contact:

#9 Post by Watercolorheart »

Furthermore, it only took me like 3 seconds to fix the problem, once I knew where to look ........

Which I did fix it, and added more stuff, the latest file is in the Second Origins thread on the Gamemaker's forum, as always ......

Post Reply

Who is online

Users browsing this forum: Bing [Bot], Google [Bot], piinkpuddiin