Jump to content


Photo

G M R A - The Delphi Interpreter [now V1.0.7.4]


  • Please log in to reply
120 replies to this topic

#61 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts

Posted 06 December 2008 - 01:10 PM

Unfortunately, I used a slightly older version of the GML scripts.

Please either redownload or do the following.
Open all sources where there the dll scripts, in files preview.gm6 and DelphiEditor.gm6. Find the script cvc_gmra_init. Finally, add global.CONSTANT=5 just under global.HWND =4.

Since the error reports something about a listbox, I guess you added a few things since the last time....

The controls are there same as before, only the demo makes a difference in using them. As I said, I'm working on the UI designer, which generates GML for creating GUI's.

Kindly,
Chris.

Edited by uuf6429, 06 December 2008 - 01:15 PM.

  • 0

#62 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14392 posts
  • Version:GM:Studio

Posted 06 December 2008 - 02:30 PM

Cool. Before your project gets too big, You should add those
global.CONSTANT=5
constants in the GMK in the Global Game Settings's Contant tab. Since we have to merge with this, we'll get them in our game.

Your example should fill a list with files in the system directory instead of scaring people with the fake deleting files progress. Though it might be too fast to see...

Anyway, keep at it. I hope you have the form layout soon.
  • 0

#63 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts

Posted 06 December 2008 - 02:57 PM

Well, you should have read the dialogs caption :blink:.
  • 0

#64 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14392 posts
  • Version:GM:Studio

Posted 06 December 2008 - 03:03 PM

Well, you should have read the dialogs caption :blink:.


I _am_ a slow reader :)
  • 0

#65 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts

Posted 06 December 2008 - 03:13 PM

Hmmm thought the dialog timeout might be too slow... Seems the opposite, well, I'll fix it.

By the way, did you check the error report dialog box?

Also there's the listview, but something's wrong with my coding it :blink:. Weirdly, items are added but are empty. Well I think they are added since after some time the scrollbar is shown.

Edited by uuf6429, 06 December 2008 - 03:15 PM.

  • 0

#66 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14392 posts
  • Version:GM:Studio

Posted 06 December 2008 - 04:31 PM

Hmmm thought the dialog timeout might be too slow... Seems the opposite, well, I'll fix it.

By the way, did you check the error report dialog box?


Yep

Also there's the listview, but something's wrong with my coding it :blink:. Weirdly, items are added but are empty. Well I think they are added since after some time the scrollbar is shown.

Yes, I noticed it grows with empty strings... I thougth you would fill it with files. I did not dive in the code much to figure it out since I got my 2 eyes in the same socket today (fixing 13 tipos in this sentence tells me this is true).
  • 0

#67 Smarty

Smarty

    GMC Member

  • Retired Staff
  • 7220 posts
  • Version:GM:Studio

Posted 07 December 2008 - 12:17 AM

So you would prefer:

b=make_button(window_handle(),x,y,w,h)
set_label(b,"Rubbish")
over:
code="unit temp;
function Main:Integer;
begin
b:=TButton.Create(nil);
b.ClientRect=TRect(x,y,w,h);
b.Caption='Rubbish';
end;"
gmra_execute(code);

Actually, yes I would, except that I would catch the two external calls under one function as I already said. Script calls don't have the parameter limits that DLLs have. Creating windows objects isn't exactly time-critical, so one or two extra external calls do not matter. I also would not pass the window handle on every function call. It doesn't change, so you might as well pass it once on the initialisation of the library and let the DLL keep it in a global variable.

By setting this code, GMRA can also be made to automatically handle events which in the case for other controls dlls you have to keep peeking at a message queue (not mentioning the multitude of other events that the programmer might not need).

The 'automatically handling events' is done by, once again, just programming what it does in Delphi. I still don't see why you wouldn't just compile it if you went that way.

You can pass/store whole structures using strings and having delphi interpret it correctly. Of course individual parts of the structures may be read and sent to GM.

You bypass an iteration by spelling out the Delphi code instead. I still fail to see much difference. And you still have the same limits if data needs to be passed back.

Who said you shouldn't? But for the less delphi-literate people around, they just want a working GUI with GUI coding only, not a dll with a lot of coding for simply managing the GUI, let alone the PChar/Memory Manager quirks and minor coding bugs in Delphi. Besides, as said, this is very useful for prototyping. If you get this working, then you ain't far from making a working model in real Delphi.

You baffle me. It's like saying that those who aren't very familiar in Delphi, should instead use Delphi.

And what if? Personally, I did take a certain commitment in this one, so comparing this with those might be a little of an insult. You can in essence run PHP code through the CMD or batch jobs, and who exactly would need Phyton, especially if it doesn't feature much out of the language core? This dll on the other hand features a lot of things including better support, a language very similar to GML, full windows control...
In short it i very much limitless. You want to get the harddisk serial? the number of devices? Manipulating an image quickly? An awesome GUI? No problem, RA can do it.

I'm sure you've done your best in trying to attach the processes to the Game Maker window, but it's still a wrapper for an entire programming language. Of course RA can do all those things, exactly because it is based on a full-fledged programming language.

I'm afraid though that this time you're prejudicing this a lot. :) I would have expected some encouragement from you. Other then that, you know the features and you know your solid points. Please bring them out if any, and don't point at the obvious. I've stated above that this is a it slow, no point iterating over it.

Pay attention to my words - I never mentioned it. I do not doubt that some people built a very fast Delphi interpreter.

By the way, this is actually faster then GM's execute_string :).

I never said it wasn't.

Well that was an epic waste of time and waste of bandwidth... The setup runs but the required components are not included and their download links are dead... GO Borland!!! (Loosers)

Did you read the download instructions? It mentions that a prerequisite file must be downloaded and installed. And Codegears is the download host, not Borland. You might send them a friendly mail to ask where the download went, preferably not starting with 'Dear losers'.
  • 0

#68 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14392 posts
  • Version:GM:Studio

Posted 07 December 2008 - 01:18 AM

Well that was an epic waste of time and waste of bandwidth... The setup runs but the required components are not included and their download links are dead... GO Borland!!! (Loosers)

1) Did you read the download instructions? 2)It mentions that a prerequisite file must be downloaded and installed. And Codegears is the download host, not Borland. You might send them a friendly mail to ask where the download went, preferably not starting with 'Dear losers'.

1)No I did not <sarcasm>. I wasted 3 hours. Not gona do it again. 2) the prerequisite files, the link to them are dead. You can't get these anymore through normal channels. So I'm not going to waste any more time trying to locate them. I did download the latest .net from MS. but it's not compatible or detected by the setup.

And they did not send me any key to unlock it when it's all done. I know they usually did. It was like that for c++ and c# 2-4 years ago. I am registered with them (When it was still Borland)

They are loosers because they offered their brand new compilers for free a while back. They should have continued to give it out (the latest version) for free for students and enthusiasts, not a depricated version with a broken installation even if it still works for some.
  • 0

#69 TheMagicNumber

TheMagicNumber

    GMC Member

  • GMC Member
  • 5247 posts
  • Version:Unknown

Posted 07 December 2008 - 01:56 AM

Haha, when I installed it the requirements were stated right beside the download links :) They also linked me to them in the installer.

Uuf, can you actually make documentation for the functions. I am really having a tough time with a few of them.

*PMs icuurd*
  • 0

#70 icuurd12b42

icuurd12b42

    Self Formed Sentient

  • Global Moderators
  • 14392 posts
  • Version:GM:Studio

Posted 07 December 2008 - 03:46 AM

Haha, when I installed it the requirements were stated right beside the download links :) They also linked me to them in the installer.


I know. these are the links that are dead. They are the same requirements as c++ and c#. Are you saying the links worked for you? Anyway, getting a little off topic.
  • 0

#71 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts

Posted 07 December 2008 - 09:24 AM

Actually, yes I would, except that I would catch the two external calls under one function as I already said. Script calls don't have the parameter limits that DLLs have. Creating windows objects isn't exactly time-critical, so one or two extra external calls do not matter. I also would not pass the window handle on every function call. It doesn't change, so you might as well pass it once on the initialisation of the library and let the DLL keep it in a global variable.

But then you have to keep the controls updated, especially progress bars, listboxes, treeviews, edits even maybe buttons.
Now imagine all those functions: set_bounds add_node remove_node add_item remove_item set_progress[_max/min] set_label... Few functions? Don't think so. I've developed this especially after seeing other winAPI dlls and their massive amount of calls and gml scripts.
Lastly, as to your handle thing, that wouldn't make any sense: how would you know which handle the particular dll call applies to?

The 'automatically handling events' is done by, once again, just programming what it does in Delphi. I still don't see why you wouldn't just compile it if you went that way.

I'm still asuming the user doesn't have a delphi compiler/IDE or that he doesn't know in-depth delphi. Therefor, the system for handling events in the interpreter is way better then what is implemented in other dlls, where only a set of messages/events (typically, the most used) are actually useable.

You bypass an iteration by spelling out the Delphi code instead. I still fail to see much difference. And you still have the same limits if data needs to be passed back.

Using strings, GM can store anything from whole objects to pointers. These could have been made by the delphi interpreter. Whichever the case, you can't do this in compiled delphi, because objects variables are static pointers and cannot be changed at runtime (eg, you cannot move an object into GM's memory).
I can't see what you refer to as the limit. I can't ever change GM's architecture, but I can make it simulate what it otherwise couldn't do. For example, if a Windows dll call fills a passed structure (like MEMORYINFO) GM can't do this sort of thing while the interpreter can pass such a structure (when it's fixed) and can format it into a string readable by GM.

I'm sure you've done your best in trying to attach the processes to the Game Maker window, but it's still a wrapper for an entire programming language. Of course RA can do all those things, exactly because it is based on a full-fledged programming language.

So what's the problem? Wasn't you fearing that I just wrapped it up and that's just it? I told you that I didn't *just* wrap it up, but I've changed a lot of things. For one thing, it required a different memory editor. Several objects needed changing because they didn't work right or had some features missing. For example pointer management needs some changing in the interpreter code.

I never said it wasn't.

So it's not level to execute_string() :). Just as compiling java is not like compiling delphi (analogy).

Did you read the download instructions? It mentions that a prerequisite file must be downloaded and installed. And Codegears is the download host, not Borland. You might send them a friendly mail to ask where the download went, preferably not starting with 'Dear losers'.

Haha funny. Anyway, I don't see it worthwhile to get Delphi just for doing this. Now if it were in need of full-speed time-critical coding, then by no means I highly encourage it. But the problem is people wouldn't want to buy Delphi just for making a simple GUI dll.

Uuf, can you actually make documentation for the functions. I am really having a tough time with a few of them.

Sorry for that, but which are exactly problematic?

Kindly,
Chris.
  • 0

#72 Konstantine

Konstantine

    GMC Member

  • New Member
  • 93 posts

Posted 17 December 2008 - 09:02 AM

Haven't tried the DLL so far, since I don't really need what it offers (so far). But its supporting all data types gave me an idea: I once tried to look into Chipmunk DLL (a great 2D physics DLL) and make scripts to pass it to GM, but I couldn't because it returned data types GM didn't support. Do you think this can be done with GM Ra?

Anyway, I 'll try it right away.

If anyone says "But there's already GMphysics for it", try adding some jointed objects and applying high forces to them, and if the game doesn't crash, I 'll break my keyboard on my head (or my head on the keyboard). Besides, Chipmunk is much faster.
  • 0

#73 Konstantine

Konstantine

    GMC Member

  • New Member
  • 93 posts

Posted 17 December 2008 - 09:17 AM

I'm not exactly sure what causes it, but if you play around with selecting text, erasing text, and moving the scrollbars, DelphiEditorIDE.exe crashes: it throws errors saying

Access violation at address 004085B5 in module 'DelphiEditorIDE.exe'. Read of address 1FFFFFFB.

and when I close it, I get the Microsoft message (send error report etc.) and Windows Explorer closes! It reopens afterwards, of course.
  • 0

#74 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts

Posted 17 December 2008 - 11:22 AM

Did you run the code?
Never happened to me before :D

Sorry for that though.

You can use the other editor if you want, it's in DelphiEditor.gm6
Should work just as well.
  • 0

#75 Konstantine

Konstantine

    GMC Member

  • New Member
  • 93 posts

Posted 17 December 2008 - 03:48 PM

That's OK, it only happens occasionally. A question about the GM6 editor: when you click compile, does it create a precompiled code or an executable? And where?
  • 0

#76 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts

Posted 17 December 2008 - 04:37 PM

No, it doesn't compile into object/machine code it instead "compiles" into a bytecode, so that it can be run faster while dodging some parts of parsing the code.

I personally dislike the term compilation here, but it is what Java et al. uses as well, so I'm not concerned in the least.
I'm just taking advantage of java's marketing strategy.

Kindly,
Christian Sciberras.
  • 0

#77 Konstantine

Konstantine

    GMC Member

  • New Member
  • 93 posts

Posted 17 December 2008 - 08:00 PM

Yeah, with "precompiled code" I actually meant bytecode, but I couldn't remember the term. So when the bytecode is generated, isn't it stored somewhere? Is it kept as a binary file to be loaded anytime, or just a cached code in RAM?
  • 0

#78 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts

Posted 20 December 2008 - 06:58 PM

If I'm not mistaken there must be some way to get it back, but answering your question, it is stored in RAM normally.
  • 0

#79 the_mysterious_gamer

the_mysterious_gamer

    GMC Member

  • New Member
  • 431 posts

Posted 15 January 2009 - 09:10 PM

If someone is going to learn a more advanced language like Delphi, why don't they just use that language and compile it? (I know you already discussed this, but you were assuming the only other language you could use was Delphi). Those languages are going to be faster, they will be smaller when compiled, and unlike Delphi, will have a much larger set of free header files (calling DLLs) and such. Any factors that may vary what you want to execute can just be passed as parameters to their DLL.
  • 0

#80 uuf6429

uuf6429

    Covac Software

  • New Member
  • 2522 posts

Posted 15 January 2009 - 09:51 PM

Huh?
This ain't a replacement for the "other languages". It gives a set of features and possibilities to GM. That's the end of it. With your same logic, we shouldn't e using GM and dlls, but code everything from scratch in C or something.

they will be smaller when compiled

Besides, it ain't necesarily smaller. If you use two dlls, one like maxwinapi and another like sockets, they'd have a larger total size then this (while this supports both features).

Any factors that may vary what you want to execute can just be passed as parameters to their DLL.

Those factors which increase load time can be all passed as one string. Indeed, your GUI or dll can be preprogrammed to work by itself, rather then having clumsy GM do the job by peeking at some queu.


Guys, I can't get to your point. Should I plug this out just because some people think they're better off with another language? Why bother? Just use that language!

What do you really want from me except picking up some absurd and baseless argument?

Edited by uuf6429, 15 January 2009 - 09:52 PM.

  • 0




0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users