Pages: 1
  Print  
Author Topic: Environment Variables are Windows Only  (Read 2580 times)
Offline (Male) Goombert
Posted on: April 23, 2014, 03:40:25 AM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3110

View Profile
Well I was recently fixing the environment_get_variable function for SuperRiderTH the old version was really messed up. But anyway, I just wanted to check Studio's manual for lols, and well...

Quote from: YoYoGames
NOTE: This is a Windows only function.
http://docs.yoyogames.com/source/dadiospice/002_reference/miscellaneous/environment_get_variable.html

Apparently YYG doesn't know that Unix invented environment variables, and is pretty much one of the biggest reasons Windows has them.
https://en.wikipedia.org/wiki/Environment_variable

Quote from: Wikipedia
They were introduced in their modern form in 1979 with Version 7 Unix, so are included in all Unix operating system flavors and variants from that point onward including Linux and OS X. From PC DOS 2.0 in 1982, all succeeding Microsoft operating systems including Microsoft Windows, and OS/2 also have included them as a feature, although with somewhat different syntax, usage and standard variable names.

I think this is the epitome of why their logic is so flawed.
« Last Edit: April 23, 2014, 03:42:48 AM by Robert B Colton » Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) Darkstar2
Reply #1 Posted on: April 23, 2014, 04:00:41 AM
Member
Joined: Jan 2014
Posts: 1244

View Profile Email
lmao!

Someone should post this on their forum

Logged
Offline (Male) Josh @ Dreamland
Reply #2 Posted on: April 23, 2014, 07:35:31 AM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2958

View Profile Email
I'm pretty sure that anyone who actually knows what Unix is, is aware of this.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Unknown gender) onpon
Reply #3 Posted on: April 23, 2014, 08:17:44 AM

Member
Joined: Feb 2010
Posts: 102

View Profile WWW Email
Of course POSIX systems have environment variables, but it's obvious that what that documentation really means is that YoYo Games is too lazy to implement support for POSIX environment variables.
Logged
Offline (Male) Rusky
Reply #4 Posted on: April 23, 2014, 09:45:38 AM

Resident Troll
Joined: Feb 2008
Posts: 955
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
ENIGMA: mocking their competition for lacking insignificant features since 2007
« Last Edit: April 23, 2014, 04:39:50 PM by Rusky » Logged
Offline (Unknown gender) daz
Reply #5 Posted on: April 23, 2014, 10:11:19 AM
Contributor
Joined: Jul 2010
Posts: 167

View Profile
Don't assume that they don't know other operating systems have environment variables. It's mostly likely just a matter of "we only got around to adding this function for Windows".
Logged
Offline (Male) Goombert
Reply #6 Posted on: April 23, 2014, 02:50:24 PM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3110

View Profile
Do you know how easy it is for Linux daz? It's about 50% simpler than a chdir()
« Last Edit: April 23, 2014, 02:55:44 PM by Robert B Colton » Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Male) Rusky
Reply #7 Posted on: April 23, 2014, 03:53:16 PM

Resident Troll
Joined: Feb 2008
Posts: 955
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
Do you know how many games even use environment variables? It's about 100% less than you think.
Logged
Offline (Male) Goombert
Reply #8 Posted on: April 23, 2014, 03:57:54 PM

Developer
Location: Cappuccino, CA
Joined: Jan 2013
Posts: 3110

View Profile
lel, you're, but still
Logged
I think it was Leonardo da Vinci who once said something along the lines of "If you build the robots, they will make games." or something to that effect.

Offline (Unknown gender) Darkstar2
Reply #9 Posted on: April 23, 2014, 04:57:34 PM
Member
Joined: Jan 2014
Posts: 1244

View Profile Email
Do you know how many games even use environment variables? It's about 100% less than you think.

Good old DOS games lol !
Logged
Offline (Male) Josh @ Dreamland
Reply #10 Posted on: April 25, 2014, 07:37:18 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2958

View Profile Email
When I was little, I used GM to make all sorts of things. Not just games. The ability to do things like edit the registry was crucial, and it taught me gobs about how my operating system worked. I wouldn't learn until later how flawed an approach this was, but hey, we all have to start somewhere.

The point is, yes, a typical game doesn't have any use for environment variables, and is typically concerned with its own directory only insofar as loading resources from a local folder is concerned. But I still value support for lower-level functionality.
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Male) Rusky
Reply #11 Posted on: April 26, 2014, 03:41:13 AM

Resident Troll
Joined: Feb 2008
Posts: 955
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
When you were little, you used Windows, which has the feature being complained about here.
Logged
Offline (Male) Josh @ Dreamland
Reply #12 Posted on: April 26, 2014, 05:35:11 PM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2958

View Profile Email
I don't see a problem with using an otherwise cross-platform toolkit to do platform-dependent coding. With preprocessor expressions, equivalents or alternatives can be given on platforms which do not support that feature.

It's a little unfair that Linux users have to pick between dconf, gconf, xfconf, kconf, and just writing the keys to a file in ~. But that's the downside of customizability, something that Linux distributions have always had, and Windows has generally not. At this point, the obvious choice is dconf or just writing the file.
« Last Edit: April 26, 2014, 05:37:32 PM by Josh @ Dreamland » Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Pages: 1
  Print