Pages: « 1 2
  Print  
Author Topic: ENIGMA -- srs bizness  (Read 7154 times)
Offline (Male) Josh @ Dreamland
Reply #15 Posted on: November 23, 2008, 06:04:01 PM

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

View Profile Email
Whew. For a minute there I was afraid everyone'd be like ZOMG NO DUN HURT OUR PRESHIS ERRORZ
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) jimmyjames273
Reply #16 Posted on: November 23, 2008, 09:52:03 PM
Member
Joined: May 2008
Posts: 6

View Profile Email
Yea get rid of the errors. If it means a speed increase I'm all for it.
Logged
Offline (Unknown gender) OniLink10
Reply #17 Posted on: November 23, 2008, 11:10:27 PM
Member
Joined: Jul 2008
Posts: 68

View Profile Email
Kill the Errors!
Logged
Offline (Unknown gender) yaywalter
Reply #18 Posted on: November 24, 2008, 03:12:30 AM
Member
Joined: Apr 2008
Posts: 3

View Profile Email
I like the idea.  :)
Logged
Offline (Male) sprintf()
Reply #19 Posted on: November 24, 2008, 02:29:59 PM

"Past Contributor"
Location: S. Wales
Joined: Apr 2008
Posts: 72
MSN Messenger - dmgoron@gmail.com
View Profile Email
It's not as simple as "who would release a game with errors anyway?". Exception handling is just something that should be done in programs, so that when something fucks up, someone has some idea why. Unless you can predict every kind of error and validate all input data to ensure it won't happen (which fucks all your speed saving anyway) you're going to get a runtime error sooner or later.
Logged
Offline (Unknown gender) ludamad
Reply #20 Posted on: November 24, 2008, 02:43:51 PM
Developer
Joined: May 2008
Posts: 1256

View Profile Email
Bigmoron is of course right, it is not so clear cut, lets look at the affected areas (according to Josh):
Quote
List of typical errors:

    * Accessing an undefined sprite: Fatal, debug mode will report it
    * Accessing an undefined script: Will error at compile time
    * Accessing any other undefined resource: Fatal, debug mode will report it
    * Going past an array limit in a VAR: Not fatal, don't think debug mode will report it though
    * Going past an array limit with pointers: Just fatal. It's a C++ thing.
    * Division by zero: Fatal, debug mode will report it in var, cannot report it with int/double/etc
    * Nonexisting variable: Totally impossible, may implement something to track that
Accessing an undefined sprite is virtually impossible as long as you use sprite names, as well as undefined scripts with script names and other resources. Going past an array limit in var or C++ arrays could be a problem - however one could easily create an array structure that errors when out of bounds (with C++, and then release as a ENIGMA lib).

Such a thing would be recommended for early stages, and possibly removed when the code is confident enough to be bug free. Bigmoron's point is very valid - the people playing your game can be your biggest bug testers.

As for divide by zero, I'm not sure how one would handle that nicely, especially if you plan to use C++ types (which anyone and everyone should opt for over Var). 

And Nonexisting variable? Probably not a huge issue, though I'm not exactly certain what Josh means.
Logged
Offline (Male) nbeerbower
Reply #21 Posted on: November 24, 2008, 03:39:25 PM

Member
Location: Pennsylvania
Joined: Jun 2008
Posts: 34

View Profile Email
If it's gonna be 10x faster than do it! And if you really want the errors just run it in debug mode, makes sense.
Logged
Offline (Male) RetroX
Reply #22 Posted on: November 24, 2008, 04:03:06 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
And Nonexisting variable? Probably not a huge issue, though I'm not exactly certain what Josh means.
Undefined variables.  And currently, I would believe that's variables that aren't defined using "var x" or something of the like since Josh hasn't implemented automatic definitions.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Unknown gender) ludamad
Reply #23 Posted on: November 24, 2008, 04:06:40 PM
Developer
Joined: May 2008
Posts: 1256

View Profile Email
Automatic declarations have been implemented since forever.
Logged
Offline (Male) RetroX
Reply #24 Posted on: November 24, 2008, 05:02:20 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
They didn't quite work in R3 at first. >_>

But I guess it means undefined variables used in statements and such.

Any time that it wouldn't work in Game Maker or whatever.
Logged
My Box: Phenom II 3.4GHz X4 | ASUS ATI RadeonHD 5770, 1GB GDDR5 RAM | 1x4GB DDR3 SRAM | Arch Linux, x86_64 (Cube) / Windows 7 x64 (Blob)
Quote from: Fede-lasse
Why do all the pro-Microsoft people have troll avatars? :(
Offline (Male) Josh @ Dreamland
Reply #25 Posted on: November 25, 2008, 06:43:21 PM

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

View Profile Email
Since the game wouldn't compile if there were any truly undefined variables, they just don't exist in ENIGMA. So here, undefined means that you didn't say varname=something; before you said if(varname) or function(varname).
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) hach-que
Reply #26 Posted on: November 26, 2008, 09:48:51 PM
Member
Joined: Nov 2008
Posts: 4

View Profile Email
Instead of "No errors", couldn't you just make it show:

"This game has encountered an error.  Please contact <author name> at <author email/web>.  The game must now close."

I've never used ENIGMA, but it's just an idea...
Logged
Offline (Unknown gender) ludamad
Reply #27 Posted on: November 27, 2008, 05:24:20 PM
Developer
Joined: May 2008
Posts: 1256

View Profile Email
Hach-que: You miss the point, in order to show errors there needs to be constant checking whether an error has occurred or not. This slows down the game.
Logged
Offline (Male) Chris94
Reply #28 Posted on: November 27, 2008, 08:10:05 PM
Member
Location: Canada
Joined: Aug 2008
Posts: 8

View Profile
Sounds great! I'll be looking forward to any new releases!

Chris94 :)
« Last Edit: November 28, 2008, 05:08:36 PM by Chris94 » Logged
Pages: « 1 2
  Print