ENIGMA Forums

Outsourcing saves money => Programming Help => Topic started by: edsquare on August 01, 2014, 10:28:11 AM

Title: Where do I find ENIGMA's API?
Post by: edsquare on August 01, 2014, 10:28:11 AM
What I mean is this: Is there some place to look and read all the API? Where?

If there isn't, then what files of the source should I look in?
Title: Re: Where do I find ENIGMA's API?
Post by: TheExDeus on August 01, 2014, 01:26:01 PM
What do you mean with API? API usually means using one thing inside another. ENIGMA isn't meant to be used outside ENIGMA.
Title: Re: Where do I find ENIGMA's API?
Post by: Goombert on August 01, 2014, 03:09:23 PM
Quote from: TheExDeus
ENIGMA isn't meant to be used outside ENIGMA.
Yes but there is no need to limit its capabilities of doing so.

Anyway, here are some places to get started.
http://enigma-dev.org/docs/Wiki/Module_hierarchy
http://enigma-dev.org/docs/Wiki/ENIGMA:Developing
http://enigma-dev.org/docs/Wiki/Graphics_Systems/
http://enigma-dev.org/docs/Wiki/Compilers/

You really just have to use the search functionality of the Wiki, this stuff is all over the place, I haven't really had time to organize it.
Title: Re: Where do I find ENIGMA's API?
Post by: edsquare on August 01, 2014, 04:38:42 PM
What do you mean with API? API usually means using one thing inside another. ENIGMA isn't meant to be used outside ENIGMA.

API : Application Programming Inteface ; In computer programming, an application programming interface (API) specifies how some software components should interact with each other.

When you make a program for windows you may need to know several APIs: The API of the software you are using, Windows API, Database API, etc.
so that you can use those applications inside yours, make calls, send files, create, modify, save, delete databases, etc. ; so Enigma's API is not necesary (although it kind of is) for using LGM+ENIGMA but... If you want to call ENIGMA from another IDE and use it then you need to know ENIGMA's API.

What I want to know is how to make enigma work with another IDE, I managed to start the Python one, but I have the same problem as when I start LGM from a desktop shortcut (no way to compile, debug or run a game), also it lacks some buttons that LGM has, since it's made with Python, and since QT changes Python code a lot less than C++ code, I thought I could study it and see if I can finish it at least to the state of LGM (minus bugs and instability I hope). But in order to truly understand the code I need some API reference.


Anyway, here are some places to get started.
http://enigma-dev.org/docs/Wiki/Module_hierarchy
http://enigma-dev.org/docs/Wiki/ENIGMA:Developing
http://enigma-dev.org/docs/Wiki/Graphics_Systems/
http://enigma-dev.org/docs/Wiki/Compilers/

You really just have to use the search functionality of the Wiki, this stuff is all over the place, I haven't really had time to organize it.

Thanks man!
Title: Re: Where do I find ENIGMA's API?
Post by: Goombert on August 01, 2014, 05:06:10 PM
edsquare, Harri def. knows what an API is he just didn't know what you meant in context. Using ENIGMA in C++ is pretty easy, just copy and paste ENIGMASystem/SHELL and have your C++ program run make on it and use namespace enigma_user for all GML functions.
Title: Re: Where do I find ENIGMA's API?
Post by: edsquare on August 01, 2014, 05:48:49 PM
edsquare, Harri def. knows what an API is he just didn't know what you meant in context. Using ENIGMA in C++ is pretty easy, just copy and paste ENIGMASystem/SHELL and have your C++ program run make on it and use namespace enigma_user for all GML functions.

I know He beats me hands down in programming knowledge, it's just one of those days you know?  :-\

Harri my most sincere apologies if I offended you.  :(

Thanks Robert! a couple more questions: Only gml functions? or any function? So if I want to draw a room the function is in enigmasystem/shell? I just call it draw_room?  ???

Title: Re: Where do I find ENIGMA's API?
Post by: Goombert on August 01, 2014, 06:31:21 PM
Haha, don't be hard on yourself he nor I really give a shit, I just like to point out when people misunderstand something, I don't know why I have a phobia of myself or someone else misunderstanding something or anything.

Anyway ed, it requires a tad bit of knowledge of everything. I am not really sure what you mean by draw room, so I presume you mean draw all the instances in the room and clear the background color, and that is handled by screen_redraw which is in Graphics_Systems/OpenGL1/GLscreen.cpp

That function clears the background, the background color, sets the viewport and the default project and runs through every objects draw event. However, for more simpler things such as our variant data type where you can simply include Universal_System/var4.h in your C++ project.
Title: Re: Where do I find ENIGMA's API?
Post by: edsquare on August 01, 2014, 06:42:35 PM
Haha, don't be hard on yourself he nor I really give a shit, I just like to point out when people misunderstand something, I don't know why I have a phobia of myself or someone else misunderstanding something or anything.

Anyway ed, it requires a tad bit of knowledge of everything. I am not really sure what you mean by draw room, so I presume you mean draw all the instances in the room and clear the background color, and that is handled by screen_redraw which is in Graphics_Systems/OpenGL1/GLscreen.cpp

That function clears the background, the background color, sets the viewport and the default project and runs through every objects draw event. However, for more simpler things such as our variant data type where you can simply include Universal_System/var4.h in your C++ project.

Lets see if I can explain myself a little better, I want to know how does LGM call to ENIGMA's functions, like to make the room on the ide and how can I search for that in LGM or RadialGM to see if I can understand it and be of some use around here.

Basically what files should I study and what clues tell me if it's a call to enigma or not.
Title: Re: Where do I find ENIGMA's API?
Post by: TheExDeus on August 01, 2014, 06:45:50 PM
Quote
When you make a program for windows you may need to know several APIs: The API of the software you are using, Windows API, Database API, etc.
so that you can use those applications inside yours, make calls, send files, create, modify, save, delete databases, etc. ; so Enigma's API is not necesary (although it kind of is) for using LGM+ENIGMA but... If you want to call ENIGMA from another IDE and use it then you need to know ENIGMA's API.
I know what an API is, but there is no such thing as ENIGMA's API in the usual sense. LGM talks to the .dll via a plugin. I guess you could call the way they talk an API. You should look at compiler source code (\CompilerSource) and the Java plugin source (which is somewhere in Git).
No need to look into \ENIGMAsystem, it's the game engine which has nothing to do with the IDE. The .dll (\CompilerSource) is also technically not connected to the IDE. LGM sends data via the plugin and the .dll sees this data. Then it parsers, writes everything to IDE_EDIT files (which is the generated content) and then calls a makefile so C++ would compile it.

So basically you should look into the Java plugin code and then replicate that, so you know how to send data to the .dll.

Others might help you more on this than I. I have done basically 0 changes for the \CompilerSource in the years I have been here. I have only modified the .exe a little. I work on the game engine.
Title: Re: Where do I find ENIGMA's API?
Post by: edsquare on August 01, 2014, 06:54:53 PM
Quote
When you make a program for windows you may need to know several APIs: The API of the software you are using, Windows API, Database API, etc.
so that you can use those applications inside yours, make calls, send files, create, modify, save, delete databases, etc. ; so Enigma's API is not necesary (although it kind of is) for using LGM+ENIGMA but... If you want to call ENIGMA from another IDE and use it then you need to know ENIGMA's API.
I know what an API is, but there is no such thing as ENIGMA's API in the usual sense. LGM talks to the .dll via a plugin. I guess you could call the way they talk an API. You should look at compiler source code (\CompilerSource) and the Java plugin source (which is somewhere in Git).
No need to look into \ENIGMAsystem, it's the game engine which has nothing to do with the IDE. The .dll (\CompilerSource) is also technically not connected to the IDE. LGM sends data via the plugin and the .dll sees this data. Then it parsers, writes everything to IDE_EDIT files (which is the generated content) and then calls a makefile so C++ would compile it.

So basically you should look into the Java plugin code and then replicate that, so you know how to send data to the .dll.

Others might help you more on this than I. I have done basically 0 changes for the \CompilerSource in the years I have been here. I have only modified the .exe a little. I work on the game engine.

Well that certainly makes it easier and not  ;D Java? Brrrr! But what can one do? Thanks Harri, this makes it more likely for me to do something for you all (Other than virtual BJobs!  :D ).
Title: Re: Where do I find ENIGMA's API?
Post by: Darkstar2 on August 01, 2014, 09:06:55 PM
This is something I will touch when I get a bit more time, just fooling around with recreating an entire project outside LGM and compiling.  I already know how to generate the EGM file and based on options/system/chosen generate the folder structure and files along with the right source files to be compiled, though certain areas I am clueless about, the structure of RMG files (room files).

I have enough knowledge to help me build a converter which takes an EGM and converts it to a dynamic resource handling, meaning only the resources needed are loaded, meaning you can load projects several GB large and the IDE would be lightning fast and tiny, as the assets are stored externally and called dynamically, my converter would automatically convert an entire project into this, making much smaller files, and games take a fraction amount of memory, where resources are read directly into memory as needed. I plan on writing this entire in C++, and if I'm lucky integrating it to LGM as a plugin (new button / option under build).
But that's far in to the future !  Initially I will be using this for myself, and if all works well, offer it for release.

Also about functions, all the GML/EDL whatever function you use in ENIGMA are actually C++ functions.  Adding your own set of GML/EDL whatever FUNCTIONS to ENIGMA is easy, either as a function or based on  an extension, again, easy to do.

Also, if you are wondering where in the C++ source code you can find a specific function in ENIGMA it is very easy.....

You can use a tool called UltraFileSearch (Lite / FREE for personal use).   Set the starting folder pointing to main ENIGMA folder, search by criteria containing text
and type the function you are looking for,
and hit search.  It will list you all the source
files that contain the function you entered into the search.  So you can immediately know in which header and CPP files are stored the functions you want to modify/fix, saves a lot of time if you don't know where to look.

Also what I am aiming to do is doing like GM Studio does, as opposed to creating a single file, like EGM for example, content of which is passed to the plugin and processed, I would like to eventually be able to have an IDE create the folder structures and files, and have things processed from files stored on disk as opposed to passing along resources by memory.....this will resolve a lot of the stability issues in LGM, and that's how GM Studio does it.  You'd have to save your project first though before compiling or running, that combined with dynamic resource handling and you got yourself a rock solid IDE, smaller, faster, and consuming far less memory.

By your JAVA comment I reckon you are not a fan of JAVA or know JAVA programming ?

Neither do I, but there is apparently an amazing tool that can convert Java to C++ and C++ to JAVA, someone here used it and gave amazing results.  I'd love to get to write an entire IDE to C++ or port it to C++ along with dynamic resource handling and what I talked about above.  One can only dream.

But I thought you knew JAVA !?!?


Title: Re: Where do I find ENIGMA's API?
Post by: edsquare on August 01, 2014, 11:44:11 PM
Quote
By your JAVA comment I reckon you are not a fan of JAVA or know JAVA programming ?

Neither do I, but there is apparently an amazing tool that can convert Java to C++ and C++ to JAVA, someone here used it and gave amazing results.  I'd love to get to write an entire IDE to C++ or port it to C++ along with dynamic resource handling and what I talked about above.  One can only dream.

But I thought you knew JAVA !?!?

I'd love to try your converter when LGM works again in my pc.

Me a JAVA fan? No by the stars no and a million times no!  :D

Seriously, I don't know Java, if I wanted to use an interpreted language I would go for Python, tryed reading java code once or twice, and although people say its verbose because its easy to read I much preffer les verbose languages, C++ I'm studying right now so I can't really undertake such an enterprise on said language, Python; dabled on it, it's easy to learn and much more stable than Java (I think), that tool I jave it, as a mather of fact I can convert to and from java to C++, C#, VB, and between those too. so I might take that code and try to use it but... no converter does a full and perfect conversion, there's always some manual labour left, and I don't trust myself with C++, now if we were talking about C#... But someone said they hate C#, or was it .NET languages? If it was the former well there's monodevelop+mono+gtk#  ;D

What I'll likely do is try and finish the Python IDE (GameEditor?) it also needs another name. The other one I'm making (Code name Chimera) in Lazarus-FPC is giving me some problems managing true trasnparency on linux-GTK so I'm redoing part of it and it's not as simple as replacin the controls... Different controls different functions, different calls and so on.  :) Maybe Ill end up doing the python one and rebranding it as Quimera  ;)

If the tool you're talkin is not TSS Java to C++ converter, then I would love to know the name, if only to see if it works better than the one I have.

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 but as already mentioned it doesn't convert everything nor is it perfect, and every time it gets to a piece of code marked as void it leaves the word there so a little help would be apreciated.
Title: Re: Where do I find ENIGMA's API?
Post by: Goombert on August 01, 2014, 11:50:48 PM
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.

(http://enigma-dev.org/docs/wiki/images/6/6b/Rgm_ide.png)
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.
Title: Re: Where do I find ENIGMA's API?
Post by: Darkstar2 on August 02, 2014, 12:29:27 AM
I'd love to try your converter when LGM works again in my pc.

It's going to be a fully C++ project, at first i'll make it a CLI and later add a GUI if people want to.  That will be a project separate from ENIGMA and I will support only EGM files.

Quote
Me a JAVA fan? No by the stars no and a million times no!  :D
Seriously, I don't know Java, if I wanted to use an interpreted language I would go for

Ok I was confusing you with another user by the name of egofree which contributed lots of fixes and features to LGM....Sorry :D

Quote
Python, tryed reading java code once or twice, and although people say its verbose because its easy to read I much preffer les verbose languages, C++ I'm studying right now so I can't really undertake such an

Only other languages I know are BASIC, ASM6502 - As far as PASCAL I did back in school, but forgot most of it, so I'm settling for C++, OR......a QBASIC version of the LGM lol ! or straight to ASM / binary code even that would be great :D

I'd love to thank YYG**mes for inspiring me to fuel my interesting for programming again without their rubbish I would still be using GM and D&D :P

Quote
different calls and so on.  :) Maybe Ill end up doing the python one and rebranding it as Quimera  ;)

lol.  Nice.

Quote
If the tool you're talkin is not TSS Java to C++ converter, then I would love to know the name, if only to see if it works better than the one I have.

Indeed it's TSS, though I never used it myself so I can't comment on it. From what I heard it does a decent job, and i'm sure nobody here is entering coding contests,
because ENIGMA's code is a mess in some areas and would not win any contest. So i'm ok in using a converter. 

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
Title: Re: Where do I find ENIGMA's API?
Post by: Darkstar2 on August 02, 2014, 12:37:47 AM

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

yes obviously I am aware of that, but I don't know fuck all about JAVA to even work with LGM's source :D

YET I know enough about C++ to do certain things, to a certain extent, though I am not to your level or Josh's level or Harri's level and so I could not contribute as much as I wanted, and I am NIL in terms of graphics programming so whenever I see stuff like Vertex, gl this Glthat, d3d this and that to me it's Chinese. :P

Where I CAN contribute is optimising LGM and making it more stable and less memory intensive, as it seems the issues are with enigma.jar, frequent testing/running will eventually cause out of memory and other crashes as I mentioned several times with logs etc, and we've established that the problem occurs at the plugin level not LGM itself without the plugin.  So my aim is to get ENIGMA accessing the folders/files directly as opposed to passing shit by memory, which I think is what is causing the issues we talked about in LGM......and besides, that's how Studio does it.

Try opening a really big project in LGM, it can be painfully slow and slow the IDE to a crawl, taking so long to compile, running into errors / crashes ,etc..... That's where I MIGHT, no promises, be able to help.
Imagine opening a multi gigabyte project at the speed of lightning, LGM being lightning fast, not  crashing, compiling being much faster, since it does not have to pack all the resources as they are already packed 1 time and accessed dynamically.  So faster IDE, reduced RAM usage, and being able to make really gigantic games. :D

Title: Re: Where do I find ENIGMA's API?
Post by: edsquare on August 02, 2014, 12:50:53 AM
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  ::) :-\
Title: Re: Where do I find ENIGMA's API?
Post by: Darkstar2 on August 02, 2014, 01:00:08 AM
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  ::) :-\
Title: Re: Where do I find ENIGMA's API?
Post by: edsquare on August 02, 2014, 01:07:01 AM
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?
Title: Re: Where do I find ENIGMA's API?
Post by: edsquare on August 02, 2014, 01:15:54 AM
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:

Title: Re: Where do I find ENIGMA's API?
Post by: Darkstar2 on August 02, 2014, 02:40:09 AM
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 :)

Title: Re: Where do I find ENIGMA's API?
Post by: egofree on August 02, 2014, 04:25:29 AM
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 ?
Title: Re: Where do I find ENIGMA's API?
Post by: edsquare on August 02, 2014, 09:34:12 AM
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.
Title: Re: Where do I find ENIGMA's API?
Post by: edsquare on August 02, 2014, 09:48:04 AM
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!
Title: Re: Where do I find ENIGMA's API?
Post by: Darkstar2 on August 02, 2014, 12:55:37 PM
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
Title: Re: Where do I find ENIGMA's API?
Post by: Darkstar2 on August 02, 2014, 01:44:50 PM
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.

Title: Re: Where do I find ENIGMA's API?
Post by: Goombert on August 02, 2014, 03:06:26 PM
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.

(http://i.imgur.com/CMrXnmN.jpg)(http://i.imgur.com/F8Y4njD.png)
(http://i.imgur.com/CEaXL7x.jpg)(http://enigma-dev.org/docs/wiki/images/0/04/Nativecommandline.png)
Title: Re: Where do I find ENIGMA's API?
Post by: edsquare on August 02, 2014, 05:47:09 PM
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?
Title: Re: Where do I find ENIGMA's API?
Post by: Goombert on August 02, 2014, 06:24:01 PM
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.
Title: Re: Where do I find ENIGMA's API?
Post by: edsquare on August 02, 2014, 07:39:08 PM
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
Title: Re: Where do I find ENIGMA's API?
Post by: TheExDeus on August 03, 2014, 07:54:49 AM
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.