Jump to content


Photo

Treat uninitialized variables as value 0


  • Please log in to reply
43 replies to this topic

#1 Lightang3l

Lightang3l

    GMC Member

  • GMC Member
  • 851 posts

Posted 29 March 2012 - 09:59 AM

Does GM Studio have this feature. I really need it! Not because I'm a bad programmer I use it for something and can not be replaced...

This really is a buy/no buy for me...

Information will be very much appreciated.

(Please stay out of my thread if you are going to say the option is useless, or that it makes you have bad habits or that the option is the devil, because you don't know how to use it)
  • 0

#2 Robert3DG+

Robert3DG+

    VR Games

  • GMC Member
  • 1853 posts
  • Version:GM:Studio

Posted 29 March 2012 - 10:06 AM

(Please stay out of my thread if you are going to say the option is useless, or that it makes you have bad habits or that the option is the devil, because you don't know how to use it)


But it is all those things. Covering your ears and yelling "LA LA LA" does not and will not ever change that. And yes, "Treat Uninitialized Variables As 0" is gone.

My best advice to you personally is to stop acting so self-righteous about your "knowledge" of the "feature", take an afternoon off and spend the time it takes to fix up all your objects and move on with your project.
  • 6

#3 rwkay

rwkay

    YoYo Games CTO

  • YoYo Games Staff
  • 1415 posts
  • Version:Unknown

Posted 29 March 2012 - 10:12 AM

Gm:Studio does not and will not support 'Treat Uninitialized variables as 0' it is a bad practice and we are not allowing it in any way - why do you think you need it?
  • 2

#4 Lightang3l

Lightang3l

    GMC Member

  • GMC Member
  • 851 posts

Posted 29 March 2012 - 10:18 AM

@rwkay sigh... that's too bad. Would it have killed them to live it in? No one was forcing people to use it... a step backwards in my opinion.

@Robert3DG+ my objects are just fine thank you.

Guess this thread can be closed now. Thank you!

PS: There was a very good use for it though but I'm too self-righteous about my "knowledge" to explain myself.

Edited by Lightang3l, 29 March 2012 - 10:19 AM.

  • 0

#5 rwkay

rwkay

    YoYo Games CTO

  • YoYo Games Staff
  • 1415 posts
  • Version:Unknown

Posted 29 March 2012 - 10:24 AM

Fair enough.. but we could have helped you
  • 1

#6 Nocturne

Nocturne

    Nocturne Games

  • Administrators
  • 16824 posts
  • Version:GM:Studio

Posted 29 March 2012 - 10:30 AM

PS: There was a very good use for it though but I'm too self-righteous about my "knowledge" stupid to explain myself.


Fixed. Posted Image

I think that when people who have been working in this industry probably since before you were born tell you that a function is bad and shouldn't be used then you should listen to them as maybe, just maybe, they know more than you... Posted Image


Sorry, but honestly, when a real expert like Russell offers to help you and you turn him down, then that is just stupid.
  • 2

#7 Lightang3l

Lightang3l

    GMC Member

  • GMC Member
  • 851 posts

Posted 29 March 2012 - 10:36 AM

I doubt anyone could have helped me... the way my surfaces are set up it's impossible to initiate a room without errors. Even if I initialize the variables hundreds of steps in advance GM still returns an error, others have tried, solutions are not known.

But forget about my game-breaking bug, I can give you some other benefits:

1. You can work a lot faster if you do trivial stuff.
2. You can always turn it off and check for errors and then turn it back on.
3. You don't need to check if objects exist if you plan on using 0 and you gain performance.
4. When you publish your game you can turn it on, because players are not developers, they don't need to see every minor error.

Why not give people the option? Shame on Yoyo... I'll be sticking with the old GM I guess. I was excited about the new runner though... ohh well...

@Nocturne that's just how I am I guess...

Edited by Lightang3l, 29 March 2012 - 10:37 AM.

  • 1

#8 MaxRock

MaxRock

    GMC Member

  • GMC Member
  • 37 posts
  • Version:GM8

Posted 29 March 2012 - 10:38 AM

I know how Lightang3l feels about this. I myself (bad habbits from the past) would need to go through over 320 scripts and 1600 objects to "fix" this(and I would, if I would have to), BUT, I'm pretty positive that GM:Studio still treats uninitialized variables as 0, after unchecking the "Throw an error when arguments aren't initialised correctly" in Global Game Settings. I checked this with all runners cept HTML5, (because as we know, it simply can't do this) and they are returning 0. Even my game had no problems on them (cept the ones caused by the lack of extension/dll support yet+ random freezes on C++ runner)
  • 0

#9 Lightang3l

Lightang3l

    GMC Member

  • GMC Member
  • 851 posts

Posted 29 March 2012 - 10:45 AM

I don't want to start a debate here, to each his own. Besides fixing the bug in my game, that nobody can fix, I had a legitimate use for it, which I will not disclose.

Thanks MaxRoc for the info, that sounds promising.

@Nocturne How would I have known Russell was an expert? :unsure: Real life example of how "Treat Uninitialized variables as 0" would have helped :biggrin:
  • 0

#10 Robert3DG+

Robert3DG+

    VR Games

  • GMC Member
  • 1853 posts
  • Version:GM:Studio

Posted 29 March 2012 - 10:51 AM

Russell (aka rwkay) works at YoYo Games.
  • 2

#11 Nocturne

Nocturne

    Nocturne Games

  • Administrators
  • 16824 posts
  • Version:GM:Studio

Posted 29 March 2012 - 10:56 AM

I know how Lightang3l feels about this. I myself (bad habbits from the past) would need to go through over 320 scripts and 1600 objects to "fix" this(and I would, if I would have to), BUT, I'm pretty positive that GM:Studio still treats uninitialized variables as 0, after unchecking the "Throw an error when arguments aren't initialised correctly" in Global Game Settings. I checked this with all runners cept HTML5, (because as we know, it simply can't do this) and they are returning 0. Even my game had no problems on them (cept the ones caused by the lack of extension/dll support yet+ random freezes on C++ runner)


That is distict... that option is specifically for scripts. The TUVAZ option is just plain wrong and for all the reasons that have been outlined as benefits!!! Honestly, if you are so sloppy a coder as to need this then you shouldn't be trying to make products for the open market anyway. Your game should be PROGRAMMED as bug free, and not just have the bugs hidden behind a facade of normallity waiting to bite you in the *ss when you go that one step too far.

As for what you say about surfaces, I find it hard to believe as I have used surface for millions of things and NEVER ONCE come across a situation where I would possibly need TUVAZ... so I'm pretty sure that a workaround can be found. Post a novice topic with the code and we'll see what we can do!

PS: I assumed you would know who Russell is, sorry! http://gamemakerblog...ee-russell-kay/
  • 2

#12 Mike.Dailly

Mike.Dailly

    Evil YoYo Games Employee

  • Administrators
  • 1497 posts
  • Version:GM:Studio

Posted 29 March 2012 - 11:18 AM

I don't want to start a debate here, to each his own. Besides fixing the bug in my game, that nobody can fix, I had a legitimate use for it, which I will not disclose.

See... this is a different question. ALL bugs can be fix; ALL. It's just a decision as to whether it's WORTH fixing, and whether it's worth your time to fix. Now, if you don't think it's worth fixing, that's fine and up to you, continue to use GM8.x for this project and all the best to you!

However... if it's something you really want to fix and simply don't know HOW, then we can probably help there. There might be a lot of work involved in fixing it, but there is no technical reason why having to initialise variables would break any program, there's always a way around things - always.

But it's your choice. :thumbsup:
  • 4

#13 MaxRock

MaxRock

    GMC Member

  • GMC Member
  • 37 posts
  • Version:GM8

Posted 29 March 2012 - 11:37 AM

That is distict... that option is specifically for scripts.

I know, I find it funny, but it also does the same what tuvaz does, try it, even with simple drawing value of uninitialized variable. When it goes to me, I only use tuvaz to not initialize minor local variables(As I said, bad habbit from past, when didn't even have net access).
And true, dunno why Lightang3l would need it for surfaces. Like Nocturne sugested, post the code in Novice subforum. For sure we will be able to come up with a fix.
  • 1

#14 cotycrg

cotycrg

    GMC Member

  • GMC Member
  • 851 posts
  • Version:GM:Studio

Posted 29 March 2012 - 10:16 PM

I doubt anyone could have helped me... the way my surfaces are set up it's impossible to initiate a room without errors. Even if I initialize the variables hundreds of steps in advance GM still returns an error, others have tried, solutions are not known.

But forget about my game-breaking bug, I can give you some other benefits:

1. You can work a lot faster if you do trivial stuff.
2. You can always turn it off and check for errors and then turn it back on.
3. You don't need to check if objects exist if you plan on using 0 and you gain performance.
4. When you publish your game you can turn it on, because players are not developers, they don't need to see every minor error.

Why not give people the option? Shame on Yoyo... I'll be sticking with the old GM I guess. I was excited about the new runner though... ohh well...

@Nocturne that's just how I am I guess...

Your idiocy simply hurts at this point. You should really stop while you're ahead not to far behind.

1) No. It's slower because it requires the language to be interpreted for it to even be possible. Compiled languages are ALWAYS faster. No exceptions.
2) You can click the "test" button and it will tell you if a variable has not been initialized anyways. It even tells you the object and a list of global variables that ARE initialized.
3) You do not gain performance. There's instance_exists() for a reason.
4) If you have 'minor errors' for them to even see, your game is not finished. You're a child for thinking so.

All in all, you're just a new programmer, probably a young teen who gets what they want from their parents or something. Quit acting self entitled to a simple feature that you only want to use as a programming crutch.
  • 1

#15 Lightang3l

Lightang3l

    GMC Member

  • GMC Member
  • 851 posts

Posted 30 March 2012 - 08:41 AM


I doubt anyone could have helped me... the way my surfaces are set up it's impossible to initiate a room without errors. Even if I initialize the variables hundreds of steps in advance GM still returns an error, others have tried, solutions are not known.

But forget about my game-breaking bug, I can give you some other benefits:

1. You can work a lot faster if you do trivial stuff.
2. You can always turn it off and check for errors and then turn it back on.
3. You don't need to check if objects exist if you plan on using 0 and you gain performance.
4. When you publish your game you can turn it on, because players are not developers, they don't need to see every minor error.

Why not give people the option? Shame on Yoyo... I'll be sticking with the old GM I guess. I was excited about the new runner though... ohh well...

@Nocturne that's just how I am I guess...

Your idiocy simply hurts at this point. You should really stop while you're ahead not to far behind.

1) No. It's slower because it requires the language to be interpreted for it to even be possible. Compiled languages are ALWAYS faster. No exceptions.
2) You can click the "test" button and it will tell you if a variable has not been initialized anyways. It even tells you the object and a list of global variables that ARE initialized.
3) You do not gain performance. There's instance_exists() for a reason.
4) If you have 'minor errors' for them to even see, your game is not finished. You're a child for thinking so.

All in all, you're just a new programmer, probably a young teen who gets what they want from their parents or something. Quit acting self entitled to a simple feature that you only want to use as a programming crutch.



Yes you are correct I am just a new programmer, but I love games and i want to make some. I did use the option for more than hiding my mistakes though. I'm 25 and I grew up without a father, all I got so far was by working for it.

As for the feature, I don't believe I am self-entitled to it, but I just don't see the point of removing it. As I said before, nobody was forcing anyone else to use it... what is the point of not having it?

If the answer is "To keep people from developing a bad practice" than I respond to you: "Why do you care about how other people program their games?". If they work it does not matter how they work.

I will wait for GMS to go out of beta (I'm assuming it's still in beta, I have not checked) and ask around about certain options or lack of options.
  • 1

#16 Robert3DG+

Robert3DG+

    VR Games

  • GMC Member
  • 1853 posts
  • Version:GM:Studio

Posted 30 March 2012 - 08:44 AM

I will wait for GMS to go out of beta (I'm assuming it's still in beta, I have not checked) and ask around about certain options or lack of options.


If you mean TUVAZ it's not coming back. Ever.
  • 1

#17 Erik Leppen

Erik Leppen

    GMC Member

  • GMC Member
  • 2038 posts
  • Version:GM:Studio

Posted 30 March 2012 - 09:09 AM

I just don't see the point of removing it.

Well, just read the posts:

it requires the language to be interpreted for it to even be possible.

This is the point of removing it. So that GML can be compiled, which is necessary to make it fast enough for games to work on YoYo's target platforms - mobile phones etc.

you're just a new programmer, probably a young teen who gets what they want from their parents or something.

This is ad hominem and totally unneeded. NEVER EVER resort to these types of arguments, if you don't want to ruin your credibility.

Edited by Erik Leppen, 30 March 2012 - 09:10 AM.

  • 1

#18 cotycrg

cotycrg

    GMC Member

  • GMC Member
  • 851 posts
  • Version:GM:Studio

Posted 30 March 2012 - 12:13 PM

Yes you are correct I am just a new programmer, but I love games and i want to make some. I did use the option for more than hiding my mistakes though. I'm 25 and I grew up without a father, all I got so far was by working for it.

As for the feature, I don't believe I am self-entitled to it, but I just don't see the point of removing it. As I said before, nobody was forcing anyone else to use it... what is the point of not having it?

If the answer is "To keep people from developing a bad practice" than I respond to you: "Why do you care about how other people program their games?". If they work it does not matter how they work.

I will wait for GMS to go out of beta (I'm assuming it's still in beta, I have not checked) and ask around about certain options or lack of options.

Why do I need to know about your sorry "boo-hoo" past? That has nothing to do with any of our conversation, so keep it to yourself.

And it's not really "to keep from using bad practice," it's because, like I said any many others have pointed out already, TUVAS REQUIRES it to be an interpreted language. That is just silly to even WANT that. The speed differences are just much to great.
  • 0

#19 Lightang3l

Lightang3l

    GMC Member

  • GMC Member
  • 851 posts

Posted 30 March 2012 - 12:35 PM


Yes you are correct I am just a new programmer, but I love games and i want to make some. I did use the option for more than hiding my mistakes though. I'm 25 and I grew up without a father, all I got so far was by working for it.

As for the feature, I don't believe I am self-entitled to it, but I just don't see the point of removing it. As I said before, nobody was forcing anyone else to use it... what is the point of not having it?

If the answer is "To keep people from developing a bad practice" than I respond to you: "Why do you care about how other people program their games?". If they work it does not matter how they work.

I will wait for GMS to go out of beta (I'm assuming it's still in beta, I have not checked) and ask around about certain options or lack of options.

Why do I need to know about your sorry "boo-hoo" past? That has nothing to do with any of our conversation, so keep it to yourself.

And it's not really "to keep from using bad practice," it's because, like I said any many others have pointed out already, TUVAS REQUIRES it to be an interpreted language. That is just silly to even WANT that. The speed differences are just much to great.



I don't want you to know about my past... and it is not "boo-hoo". I was just replying to your statement that I am .. quote "just a new programmer, probably a young teen who gets what they want from their parents"... you seem to have trouble remembering what you posted from the looks of it, because that's the only reason I brought it up.

By the way, I took a look at your games from your signature, and I don't think I should be taking advice from you any time soon. Cheers!

On topic: I understand now why it was taken out. I'm fine with it if it's for the greater good, I'm happy it was not taken out for no good reason.

However I hope there will be an option to not show the errors. I tested my game for months now, but nobody is perfect, and I would like it if players don't get to see them if/when they happen. (no, I don't want error reports from players).
  • 0

#20 Robert3DG+

Robert3DG+

    VR Games

  • GMC Member
  • 1853 posts
  • Version:GM:Studio

Posted 30 March 2012 - 12:57 PM

By the way, I took a look at your games from your signature, and I don't think I should be taking advice from you any time soon. Cheers!


However I hope there will be an option to not show the errors. I tested my game for months now, but nobody is perfect, and I would like it if players don't get to see them if/when they happen. (no, I don't want error reports from players).


Says the guy who wants to purposefully release bugged software because he's simply to lazy to do it right. Real classy.

You make cheap shots, you take cheap shots.


This thread is disgusting.

Edited by Robert3DG+, 30 March 2012 - 01:01 PM.

  • 1




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users