Pages: [1] 2
  Print  
Author Topic: Bragging  (Read 5297 times)
Offline (Male) Josh @ Dreamland
Posted on: January 18, 2009, 12:00:36 AM

Prince of all Goldfish
Developer
Location: Ohio, United States
Joined: Feb 2008
Posts: 2934

View Profile Email
It's not bragging if you can back it up, right?

Ism and I implemented a syntax checker. Yay. Now you can test if your code will compile (or at least, SHOULD compile) before you press the actual button, and have to go digging, yay.

Right now, Ism just displays my results in a message box. I'm hoping she makes it highlight the line soon, but that's not what I'm here to brag about.

I repeated the line
if a do if a=0 b=0 else c=d  until x=0 else d=e f=0.1
about 2800 times, followed by
a b
at the very end.

I ran syntax check in LGM. Finished in about 3.3 seconds.
I then ran the same code through... another program that some of you may be familiar with. It took about 15.1 seconds.

So I am in a pretty decent mood, considering that even accounting for the overhead from passing files back and forth between ENIGMA and LGM, we're still outperforming other editors by... a lot.

With less nested things, the times are closer. Like 2 seconds vs 2.5. But ENIGMA's always ahead.

I guess that's the beauty of not generating a token tree every time you need to check syntax.

Also, ENIGMA not only gives line number, but an absolute index.
Say you have draw_line(1,2,3,4,5,6,7). It'll return the position of the comma following the 4. That way it's less confusing. I want Ism to highlight that, too, but again, we'll see.

Anyway, I'm tired. It's like... Not Saturday anymore. Gnight.
« Last Edit: January 18, 2009, 12:06:00 AM 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
Offline (Unknown gender) Game_boy
Reply #1 Posted on: January 18, 2009, 07:53:55 AM
Member
Joined: Apr 2008
Posts: 228

View Profile
Great! Unlike that other software, you'll be able to display a syntax check for the whole game at one rather than one piece of code in one object. That should cut down on the number of compiles you have to do.

Would it be possible to add a trace function, where any syntax error shows you the path of functions it took to get there?
Logged
Offline (Unknown gender) score_under
Reply #2 Posted on: January 18, 2009, 07:57:50 AM

Member
Joined: Aug 2008
Posts: 308

View Profile
I then ran the same code through... another program that some of you may be familiar with. It took about 15.1 seconds.
Is that the obfuscator, or is it GCC?

EDIT: Oh, GM7 >.< why do I always overlook the obvious?

OH, and I have an amazing idea... Compile Enigma games in Visual C++ for debugging (Have you ever used that debugger? Even a 5-year-old could fix a bug in their program with that).
« Last Edit: January 18, 2009, 08:00:40 AM by score_under » Logged
Offline (Male) Josh @ Dreamland
Reply #3 Posted on: January 18, 2009, 08:14:13 AM

Prince of all Goldfish
Developer
Location: Ohio, United States
Joined: Feb 2008
Posts: 2934

View Profile Email
score_under-- That'd be great for me, but not for anyone else. (I happen to use GDB, which comes with Code::Blocks and Dev-C++)
For actual users, I want to have a full featured debug window. I have plans for it that are so big, I'ma keep them to myself for fear of sounding stupid.
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) Game_boy
Reply #4 Posted on: January 18, 2009, 08:16:01 AM
Member
Joined: Apr 2008
Posts: 228

View Profile
... Visual C++ for debugging ...

I'm upset now. ENIGMA should never be tied to proprietary applications, especially Microsoft ones. Microsoft's idea of a C++ implementation is a nonstandard, unpredictable mess and any legitimate code will probably fail to compile. VC++ will probably be somehow corrupted with WinAPI too.
Logged
Offline (Unknown gender) score_under
Reply #5 Posted on: January 18, 2009, 09:01:47 AM

Member
Joined: Aug 2008
Posts: 308

View Profile
... Visual C++ for debugging ...

I'm upset now. ENIGMA should never be tied to proprietary applications, especially Microsoft ones. Microsoft's idea of a C++ implementation is a nonstandard, unpredictable mess and any legitimate code will probably fail to compile. VC++ will probably be somehow corrupted with WinAPI too.
You've never used VC++, have you? And as I said... for debugging. Not for the game's debug mode (different) or for the actual game.
Logged
Offline (Male) Josh @ Dreamland
Reply #6 Posted on: January 18, 2009, 09:18:54 AM

Prince of all Goldfish
Developer
Location: Ohio, United States
Joined: Feb 2008
Posts: 2934

View Profile Email
Either way, I wanna stay with GCC and GDB.

Oh, and Game_Boy, what did you mean with the syntax trace? That shouldn't be needed, since you check each individual file. If you mean check the outputted code, it should never be syntactically incorrect.
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) Game_boy
Reply #7 Posted on: January 18, 2009, 09:39:18 AM
Member
Joined: Apr 2008
Posts: 228

View Profile
... Visual C++ for debugging ...

I'm upset now. ENIGMA should never be tied to proprietary applications, especially Microsoft ones. Microsoft's idea of a C++ implementation is a nonstandard, unpredictable mess and any legitimate code will probably fail to compile. VC++ will probably be somehow corrupted with WinAPI too.
You've never used VC++, have you? And as I said... for debugging. Not for the game's debug mode (different) or for the actual game.

You are proposing to compile an ENIGMA source file with VC++ for debugging purposes, yes? (If not, what do you mean?) I doubt it would work straight off, and I don't want any level of official dependency even for debugging purposes. If you can get it to compile with VC++, then great.

--

Oh, and Game_Boy, what did you mean with the syntax trace? That shouldn't be needed, since you check each individual file. If you mean check the outputted code, it should never be syntactically incorrect.

Sorry. Got confused between syntax and other errors. What I meant was the Game Maker thing where it says:

Code: [Select]
Error in action number 1 of obj_something
in script scr_process
in script scr_get_value

<<Actual Error here>>

Except it should show exactly which line of code in obj_something called scr_process, and which line of scr_process called scr_get_value. In Game Maker, it's annoying trying to find which specific line caused it if there are multiple calls to one script in another.

Logged
Offline (Male) Josh @ Dreamland
Reply #8 Posted on: January 18, 2009, 11:12:39 AM

Prince of all Goldfish
Developer
Location: Ohio, United States
Joined: Feb 2008
Posts: 2934

View Profile Email
Ah, okay. ENIGMA has been doing that during compile since... R3, for sure. Maybe R2.
It does that for the few runtime errors, too.
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) RetroX
Reply #9 Posted on: January 18, 2009, 11:54:36 AM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
Would it be possible to lower compile time?

EDIT: Also, this.
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 #10 Posted on: January 18, 2009, 12:35:32 PM

Prince of all Goldfish
Developer
Location: Ohio, United States
Joined: Feb 2008
Posts: 2934

View Profile Email
Retro--
Compile time has been cut at least in half since R3.

And nice.
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) Game_boy
Reply #11 Posted on: January 18, 2009, 01:22:38 PM
Member
Joined: Apr 2008
Posts: 228

View Profile
Ah, okay. ENIGMA has been doing that during compile since... R3, for sure. Maybe R2.
It does that for the few runtime errors, too.


OK. I haven't tried to make a real game with ENIGMA yet so I didn't know. Um, I suppose I should have tested those releases, but it's hard to distinguish between bugs and unimplemented stuff.
Logged
Offline (Male) RetroX
Reply #12 Posted on: January 18, 2009, 07:34:13 PM

Master of all things Linux
Contributor
Location: US
Joined: Apr 2008
Posts: 1055
MSN Messenger - classixretrox@gmail.com
View Profile Email
Retro--
Compile time has been cut at least in half since R3.
It has?  Sorry, I haven't checked since.
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 #13 Posted on: January 19, 2009, 09:52:08 AM

Prince of all Goldfish
Developer
Location: Ohio, United States
Joined: Feb 2008
Posts: 2934

View Profile Email
I haven't released anything since. XD
But yeah, I did cut it by amazing proportions. It used to take 15 seconds, now it takes seven or so.
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 #14 Posted on: January 19, 2009, 11:44:47 AM

Resident Troll
Joined: Feb 2008
Posts: 960
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
Not sure what you're doing to speed it up, but one thing would be separate object files for different parts of the project. Then if you're trying to fix a bug and you have to run/edit/run/edit/etc over and over all it'd have to do is compile one file and then link, which is a lot faster. The IDE could also keep track of what's been changed so it only has to regenerate the new stuff.
Logged
Pages: [1] 2
  Print