Pages: « 1 2
  Print  
Author Topic: Where do I find ENIGMA's API?  (Read 5208 times)
Offline (Male) edsquare
Reply #15 Posted on: August 02, 2014, 12:50:53 AM

Member
Location: The throne of ringworld
Joined: Apr 2014
Posts: 402

View Profile
Quote
Quote
By the way how can I know in C++ when something is a funtion or a procedure?, you see I also have a C++ to Pascal converter

Difference between function and procedure is very simply.

int addition (int a, int b)
(that's a function - it returns a value)

void decrypt (&bufferFile)
(executes code that will work directly
on bufferFile, nothing gets returned, note
that bufferFile is passed by reference).

Procedures are statements that get executed.  So I can for example code a procedure that will directly decrypt or encrypt a file buffer which was passed by reference, in this case nothing is returned back.  I just ran a procedure.  A function would return something back and usually has stuff that gets evaluated.

You could also run a procedure that executes tasks and passes back whether it was successful or not.  But using VOID, you are not returning any value.  Of course someone will correct me if i'm wrong.

In my upcoming projects I will be using both functions and procedures, :D

Lol  :D of course I know what a function does and what a procedure does, what I meant was if there was some clue that saved me from reading all that piece of code, like in pascal you put the word procedure or function according the case. And don't give me the variables as a clue, because a procedure can have variables only it doesn't return a value, it just uses the variables to do whatever it was written to do.

Guess not eh? well to read thousands of lines of code  ::) :-\
Logged
A child of five would understand this. Send someone to fetch a child of five.
Groucho Marx
Offline (Unknown gender) Darkstar2
Reply #16 Posted on: August 02, 2014, 01:00:08 AM
Member
Joined: Jan 2014
Posts: 1244

View Profile Email
Yes I was aware that procedures can us variables :P

BTW, you will have to re-teach me PASCAL :D

Yes I remember using the word procedure, I've done work in PASCAL back then :D
But did not pursue. I do remember READLN and WRITELN lol.  I could make a text version and console version of LGM lol!

Quote
Quote
By the way how can I know in C++ when something is a funtion or a procedure?, you see I also have a C++ to Pascal converter

Difference between function and procedure is very simply.

int addition (int a, int b)
(that's a function - it returns a value)

void decrypt (&bufferFile)
(executes code that will work directly
on bufferFile, nothing gets returned, note
that bufferFile is passed by reference).

Procedures are statements that get executed.  So I can for example code a procedure that will directly decrypt or encrypt a file buffer which was passed by reference, in this case nothing is returned back.  I just ran a procedure.  A function would return something back and usually has stuff that gets evaluated.

You could also run a procedure that executes tasks and passes back whether it was successful or not.  But using VOID, you are not returning any value.  Of course someone will correct me if i'm wrong.

In my upcoming projects I will be using both functions and procedures, :D

Lol  :D of course I know what a function does and what a procedure does, what I meant was if there was some clue that saved me from reading all that piece of code, like in pascal you put the word procedure or function according the case. And don't give me the variables as a clue, because a procedure can have variables only it doesn't return a value, it just uses the variables to do whatever it was written to do.

Guess not eh? well to read thousands of lines of code  ::) :-\
Logged
Offline (Male) edsquare
Reply #17 Posted on: August 02, 2014, 01:07:01 AM

Member
Location: The throne of ringworld
Joined: Apr 2014
Posts: 402

View Profile
The reason nobody takes the Java conversion seriously is because you simply can't expect a converter to just take Java code and spit out perfectly optimized C++ they are after all two completely different languages and a lot of the subtleties do make a difference. This is why for us seasoned developers it's easier to just rewrite it correctly from scratch ourselves than to piss around correcting all the issues with generated code. Not to mention if you write it yourself you can take baby steps along the way testing and getting individual features working, instead of just converting a giant 20,000 line project (which is what LGM is) and then trying to figure out how to get all the generated code working. Generators are more work than you are bargaining for is basically what I am saying.

Baby steps yes I know what you're talking about, still I hate QT with all my heart, and sadly only one halbacked attempt was made to use other toolkit (wxWidgets) which sadly the only half decent visual editor it has is wxGlade... If only they had completed BoaConstructor.

Don't forget, RadialGM I rewrote the GUI components of all of LateralGM's editors in two days. It's not that much work, ENIGMA is just a very large project, and it can't really make progress with so few developers.

YOU rewrote the gui components of all of LGM in two days, but... You already knew C++ and some Java I dare say, and you did it without a visual gui editor which tells me you really know QT, which usually changes C++ and leaves you with a not standard code.

If wxDev-C++ were as easy to use as wxGlade I might be tempted to use your C++ code plus some input from You, Harry, Darkstar2 and anybody else that would len some time to solve my doubts.

Any way and just out of curiosity... What is the todo list off RadialGM?
Logged
A child of five would understand this. Send someone to fetch a child of five.
Groucho Marx
Offline (Male) edsquare
Reply #18 Posted on: August 02, 2014, 01:15:54 AM

Member
Location: The throne of ringworld
Joined: Apr 2014
Posts: 402

View Profile
Yes I was aware that procedures can us variables :P

BTW, you will have to re-teach me PASCAL :D

Yes I remember using the word procedure, I've done work in PASCAL back then :D
But did not pursue. I do remember READLN and WRITELN lol.  I could make a text version and console version of LGM lol!

If you already know some C++ you can pick up pascal really quick, it's a lot easier, only problem you have to declare your variables ahead and on the right place  :)

Here is a free basic course online:    http://www.pp4s.co.uk/
Here an online free pascal compiler: http://www.compileonline.com/compile_pascal_online.php

Two great books: http://www.marcocantu.com/epascal/  and  http://www.marcocantu.com/EDelphi/  both can be downloaded for free in the website of the author (the links I just gave you)

And you can use the delphi one to teach yourself Lazarus with only minimal modifications.

So anytime you want feel free to give me a yell and we can get to work on Chimera  :raise:

Logged
A child of five would understand this. Send someone to fetch a child of five.
Groucho Marx
Offline (Unknown gender) Darkstar2
Reply #19 Posted on: August 02, 2014, 02:40:09 AM
Member
Joined: Jan 2014
Posts: 1244

View Profile Email
If you already know some C++ you can pick up pascal really quick,

Don't forget I learned PASCAL in school, :D  For some reason I enjoyed more learning C++.  I wish I had learned C++ back then instead of PASCAL. :P

Quote
it's a lot easier, only problem you have to declare your variables ahead and on the right place  :)

I always do that / always did that.  I NEVER write any code with undeclared variable.

Quote
And you can use the delphi one to teach yourself Lazarus with only minimal modifications.

First build me a time machine so I can go back in time. :D

Isn't G**Maker's IDE done in Delphi ?  Many people have been critical about the IDE for being in Delphi.

You know what for now I will stick to C++, and if I have some time I might learn other stuff.  Thanks for the info :)

Logged
Offline (Unknown gender) egofree
Reply #20 Posted on: August 02, 2014, 04:25:29 AM
Contributor
Joined: Jun 2013
Posts: 603

View Profile Email
I don't understand : it seems to me that there is a big elephant in the room, and nobody is talking about it !  :D Robert made a 'Command Line Interface' : http://enigma-dev.org/forums/index.php?topic=2047.0, so ENIGMA can be easily used from any IDE. Or perhaps i misunderstood something ?
Logged
Offline (Male) edsquare
Reply #21 Posted on: August 02, 2014, 09:34:12 AM

Member
Location: The throne of ringworld
Joined: Apr 2014
Posts: 402

View Profile
I don't understand : it seems to me that there is a big elephant in the room, and nobody is talking about it !  :D Robert made a 'Command Line Interface' : http://enigma-dev.org/forums/index.php?topic=2047.0, so ENIGMA can be easily used from any IDE. Or perhaps i misunderstood something ?

Fuck me! you're right! I'm talking low level when I can do it a little more high level! There's no question about it... I'm an idiot.
Logged
A child of five would understand this. Send someone to fetch a child of five.
Groucho Marx
Offline (Male) edsquare
Reply #22 Posted on: August 02, 2014, 09:48:04 AM

Member
Location: The throne of ringworld
Joined: Apr 2014
Posts: 402

View Profile
If you already know some C++ you can pick up pascal really quick,

Don't forget I learned PASCAL in school, :D  For some reason I enjoyed more learning C++.  I wish I had learned C++ back then instead of PASCAL. :P

That's one of the reasons there are so many programming languages, the choice sometimes is also which feels easier, more enjoyable to you.

Quote
Quote
it's a lot easier, only problem you have to declare your variables ahead and on the right place  :)

I always do that / always did that.  I NEVER write any code with undeclared variable.

I know enough C++ to know that you have to declare and initialise your variables, I was talking about the fact that in pascal you have a special section for it depending if they are local, global or what not.

Quote
And you can use the delphi one to teach yourself Lazarus with only minimal modifications.

First build me a time machine so I can go back in time. :D

Isn't G**Maker's IDE done in Delphi ?  Many people have been critical about the IDE for being in Delphi.

You know what for now I will stick to C++, and if I have some time I might learn other stuff.  Thanks for the info :)
[/quote]

The problem with Delphi is that it almost became another .NET language for a while, even now they haven't got rid of all the stuff their users can do using activex controls, this speeds up the development but it's not portable code, it will only run on windows. YYGM is made in Delphi-Object Pascal... Tools so obsolete that they managed to make the software that has been the standard for many years in easy game making.

That said you should us whatever you feel more comfortable using, some one once told me a really good programmer should know 3 or 4 languages at least, and that the should include an interpreted one, a web one, a math one and a general one. Also C++ has a shitload of libraries to use, the only other language that comes close to C++ in that regard is Python... but it's an interpreted language, so the right tool for the right job according to your expertise.  :D

Peace out bro!
Logged
A child of five would understand this. Send someone to fetch a child of five.
Groucho Marx
Offline (Unknown gender) Darkstar2
Reply #23 Posted on: August 02, 2014, 12:55:37 PM
Member
Joined: Jan 2014
Posts: 1244

View Profile Email
I don't understand : it seems to me that there is a big elephant in the room, and nobody is talking about it !  :D Robert made a 'Command Line Interface' : http://enigma-dev.org/forums/index.php?topic=2047.0, so ENIGMA can be easily used from any IDE. Or perhaps i misunderstood something ?

The big elephant fell in a hole :P

Yes I'm aware of Robert's CLI project but he did not complete it, it's not yet complete, from what I recall what you could compile is limited.  he ran into snag of some sort, or perhaps he lacked time.   When I mentioned CLI I was not referring to the same thing Robert was doing, I was jokingly suggesting a console version of the IDE :P
Logged
Offline (Unknown gender) Darkstar2
Reply #24 Posted on: August 02, 2014, 01:44:50 PM
Member
Joined: Jan 2014
Posts: 1244

View Profile Email
That's one of the reasons there are so many programming languages, the choice sometimes is also which feels easier, more enjoyable to you.

I like challenges, how about we start an entire project written in 2 opcodes ? :P

Quote
it's a lot easier, only problem you have to declare your variables ahead and on the right place  :)

Hmm that was too long ago, I remember we had to declare stuff early on, but it's very vague, but there must be some similarities like if you declare variables inside procedures/functions they are local to the function/procedure, right ?  PASCAL was just an optional addon to my computer course, not something I was going to pursue seriously though, I didn't do much with PASCAL but a few projects - Something I probably would have done far quicker in BASIC or even ASM LOL.

Quote
YYGM is made in Delphi-Object Pascal... Tools so obsolete that they managed to make the software that has been the standard for many years in easy game making.

They had a choice to other languages, actually it was Mark Overmars who wrote the initial GM using Delphi, he probably did not know other languages, but when YYG got its paws on the GM franchise only to ruin it, in my opinon, :D, they had all these bloody years and opportunity to re-write the IDE.  They instead decided to mangle with obsolete and duct tape everywhere.  By their own admission they called Delphi or what was left of the original IDE as a pile of "poo", those are their words, look at the irony.  :P

Quote
That said you should us whatever you feel more comfortable using, some one once told me a really good programmer should know 3 or 4 languages at least, and that the should include an interpreted one, a web one, a math one and a general one.

lol well I don't do this as a career so I'm good.  Let's see, I know LOGO, I know C++, BASIC, QBASIC, ASM6502, web programming NIL....... but I don't care, I started doing this as a hobby and will continue as a hobby, programming is not my field anyway, that's not the field I studied.  I haven't touched coding in years, my interest sparked again once I started getting fed up with GM's rubbish :D

Quote
Also C++ has a shitload of libraries to use, the only other language that comes close to C++ in that regard is Python... but it's an interpreted language, so the right tool for the right job according to your expertise.  :D

yes agreed about C++, and it's fast too !
There again you have to KNOW each library and its function set.  Yeah there are tons of graphic libraries and shit, but you have to know them and how they work and what makes them tick.  If you were to ask me to dabble with the openGL libraries and make an OGL demo in C++ I would not know, because I've never done gfx programming.
Most of the stuff I can do in C++ right now is processing / math /algorithms, file access and GUI.  But graphics stuff, 3D stuff, more advanced stuff, I'm not an advanced/expert level yet.

Logged
Offline (Male) Goombert
Reply #25 Posted on: August 02, 2014, 03:06:26 PM

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

View Profile
Don't forget the CLI can build a ton of games now as well. It just needs polished up, and it still don't support fonts.


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) edsquare
Reply #26 Posted on: August 02, 2014, 05:47:09 PM

Member
Location: The throne of ringworld
Joined: Apr 2014
Posts: 402

View Profile
Don't forget the CLI can build a ton of games now as well. It just needs polished up, and it still don't support fonts.


It would be easier to conect to the CLI right?

Also you didn't answer my quiestion about RadialGM. Is it ready to use? if not, what is the todo list?
Logged
A child of five would understand this. Send someone to fetch a child of five.
Groucho Marx
Offline (Male) Goombert
Reply #27 Posted on: August 02, 2014, 06:24:01 PM

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

View Profile
Yes it would be easier to utilize the CLI, because you literally just pass the file path to it and it will build it. However there does need to be a way to shut it down, a stop button for instance, and do other things.

The state of RadialGM is just the GUI, there is no functionality, that is what needs done, it needs resources added, file handling and hooking up the editors to the resources. Now the reason this has been so slow is we've constantly been debating how to make it extremely modular and abstract. I may disregard all of this and begin programming it to be at least functional and then we can focus on improving small aspects of it as we go, like we've done with the rest of our projects.
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) edsquare
Reply #28 Posted on: August 02, 2014, 07:39:08 PM

Member
Location: The throne of ringworld
Joined: Apr 2014
Posts: 402

View Profile
Yes it would be easier to utilize the CLI, because you literally just pass the file path to it and it will build it. However there does need to be a way to shut it down, a stop button for instance, and do other things.

I meant it would be easier for an IDE to connect to the CLI and let it manage ENIGMA. You launch the CLI and don't have a way to stop it? The IDE needs to be connected to it as long as it's running but it would be easie to send it a close signal when you close the ide.

The state of RadialGM is just the GUI, there is no functionality, that is what needs done, it needs resources added, file handling and hooking up the editors to the resources. Now the reason this has been so slow is we've constantly been debating how to make it extremely modular and abstract. I may disregard all of this and begin programming it to be at least functional and then we can focus on improving small aspects of it as we go, like we've done with the rest of our projects.

You could fork the project before that, then you have the base for a RadialGM Mk II in the future and this one could be more modular. Only please, remember not all your users know how to create a makefile, you could use codeblocks, it allows to compile C++/QT projects and it creates a project; when you want to compile just open the project in codeblocks and click compile; it even has the option to compile as a DLL
Logged
A child of five would understand this. Send someone to fetch a child of five.
Groucho Marx
Offline (Unknown gender) TheExDeus
Reply #29 Posted on: August 03, 2014, 07:54:49 AM

Developer
Joined: Apr 2008
Posts: 1872

View Profile
Quote
I meant it would be easier for an IDE to connect to the CLI and let it manage ENIGMA. You launch the CLI and don't have a way to stop it? The IDE needs to be connected to it as long as it's running but it would be easie to send it a close signal when you close the ide.
The way CLI works is that you just give it EGM file. So your IDE would just write an EGM file (either the main project file, or if it is not saved, then save in a temp folder) and just run CLI with that filename as parameter. It does the rest. So you are not actually talking with the CLI at all, and don't need to interface with things like the .dll manually. This makes creating an IDE a lot easier.
Logged
Pages: « 1 2
  Print