Pages: « 1 2 3 »
  Print  
Author Topic: LateralGM seems a little clunky overall, Ideas but not sure how to develop them.  (Read 28726 times)
Offline (Male) HitCoder
Reply #15 Posted on: November 08, 2015, 05:53:46 pm

Member
Location: Oxford, England
Joined: Aug 2014
Posts: 157

View Profile WWW Email
Here's an example GUI I slapped together in like, 20 minutes, because I started off serious and got lost, so I just gave up trying to make something useful and just made an example GUI. It looks almost identical to LGM but with tabs, so it's pointless really, I need to be more original. Also I'm not advanced enough in VS to do anything functional, that'll take a while, but you know...
« Last Edit: November 08, 2015, 05:58:08 pm by HitCoder » Logged
Computer Scientist, Programmer in C#, C/C++, Java, Python, GML, EDL, and more. Hobbyist musician.
DISCORD: HitCoder#4530
Offline (Male) Goombert
Reply #16 Posted on: November 08, 2015, 06:57:31 pm

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

View Profile
You're right HitCoder, there's nothing stopping you, and on top of that, LateralGM follows three tier architecture. It means you can reuse the same code and throw out the whole UI layer, so you could just port LateralGM to JavaFX by rewriting the UI layer. We wanted to make this easier by adding a CLI where you'd just pass the file as a shell command for it to be built, to facilitate quickly bootstrapping third party/new IDE's. My one that loads GMX files does exist but it's not as complete.

Also check out WPF, Qt, GTK# for Mono, and the new JavaFX. Qt also exists for C#, just like how it is done for native Windows Forms, the controls are wrapped in C# classes and exposed to you. That's a called a language binding because Qt is C++ and on top of that they are wrapping it in C# to use it from C#. There's also Qt for Java.

Use anything really except Java Swing, because it is the worst of the worst GUI frameworks that were ever made. Anyway, it'll take time and practice. Clearly you are free to start with the C# version I had if you want. It might help you to study LateralGM's code a little as well. I first came here back in 2013 and I had no idea how any of the project worked, and I hadn't really spent much of my adult life coding at that point, besides Mario games. So just stick with your hobbies and you'll get where you want to be.

PS: I've really been yearning to write that C# IDE for LGM just because of how nice it is to have a truly native IDE. Follow the 3 tier architecture and release a separate Linux version with GTK. Also the C# programming language has nicer semantics than Java.
« Last Edit: November 08, 2015, 07:01:20 pm by Robert B Colton » 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) HitCoder
Reply #17 Posted on: November 10, 2015, 10:47:20 am

Member
Location: Oxford, England
Joined: Aug 2014
Posts: 157

View Profile WWW Email
I would be interested at looking at the source of the C# IDE for Enigma, but may I ask if I can look at it through Visual Studio Express 2013?
Thanks, I'm just interested in seeing how it works and what I can do - maybe I could attempt to finish it.

~HitCoder
Logged
Computer Scientist, Programmer in C#, C/C++, Java, Python, GML, EDL, and more. Hobbyist musician.
DISCORD: HitCoder#4530
Offline (Male) Goombert
Reply #18 Posted on: November 10, 2015, 03:20:48 pm

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

View Profile
Yeah, just download from GitHub man, it looks like I left all the Visual Studio solution files in there.
https://github.com/enigma-dev/SharpGM

So you should just have to open it up, I used 2013 too iirc. You might have to download and install the dll for Scintilla's Windows Forms wrapper. I used Scintilla for the code editor/syntax highlighting. Or it may be commented out because I opened it in Mono and didn't set up Scintilla, don't know if I pushed that to GitHub. Just Google how to get Scintilla for C#/Windows Forms or use NuGet.
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) HitCoder
Reply #19 Posted on: November 10, 2015, 06:03:50 pm

Member
Location: Oxford, England
Joined: Aug 2014
Posts: 157

View Profile WWW Email
I cannot figure out how to get scintilla, even after extensive googling (probably looking for the wrong thing or something) but I tried running the IDE and it looks good, but creating new objects, sprites, scripts, etc... seems to only open blank windows.

I know it's nowhere near a usable product but I'm completely lost with the code.. I've never used VS before so I guess I'll just wait to use it at college and learn to use it. That will be next year. Tbh I can't wait, the tutor seemed cool too, and college is better than high school. The British school system may be really confusing to you since you're American so it's easier for me not to go into detail, lol.
Logged
Computer Scientist, Programmer in C#, C/C++, Java, Python, GML, EDL, and more. Hobbyist musician.
DISCORD: HitCoder#4530
Offline (Male) Goombert
Reply #20 Posted on: November 10, 2015, 08:02:49 pm

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

View Profile
It's fine I'd understand. I realize this is a lot of information, but I'll give it a go.

Regarding the editor's, as far as I remember only the one's shown in this screenshot should be layed out properly, the others may not be completed or do anything.


I am really interested in working on this IDE again and adding the actual logic. But there's some things I have to straighten out first. With this new LGM release I am also writing the GMX API in C++, which is a reusable library for loading GMX projects. This is needed in NaturalGM, and C# can call native code, so I'd just use it instead of rewriting it again in C#.

The basics start with the language. In C++ you can namespace things. And you can nest namespaces in other namespaces. The namespaces are resolved with the :: operator, such as std::string.

In Java, there are no namespaces, only packages. Packages follow the naming convention of a web domain name, except reversed. So if ENIGMA was creating a package, we would use the package name of org.enigma-dev.somejavapackage. When you do not own a domain name you can use things like your GitHub URL where the project is hosted. Each Java file in a package has only a single outer class. You can not have two outer classes in Java that are side by side. You can nest another class inside the outer class, called an inner class, but it can not be side by side. So it is 1 main/outer class for each *.java source file. You can't even put a single enum next to the outer class, must be inside it. These packages correspond to physical folders on the file system, as opposed to C++'s and C#'s being just in the actual source files.

This limitation does not exist in C# because it follows the C++ conventions of namespaces. You can put multiple classes at the outer level side by side. So I genuinely believe that C# is a superior language for many other reasons in addition to this, including the way it handles templates and generics.

So all that exists there are the designer files. The designer file is just where the WYSIWYG tool to place controls puts its code for creating them. You can write that code yourself in your own classes, which is what is done in LateralGM. Other frameworks like Qt use their own designer files which are compiled to C++, in JavaFX or WPF you use XML files. WPF does the styling in the XML, but JavaFX and Qt use separate CSS files to style the controls.

Anyway, there is nothing wrong with using a designer. A lot of people often say that this isn't good because you can create more flexible layouts through code, which is true. But there's nothing wrong with using a designer to lay out the basics of a form. And with WPF and JavaFX, using XML layout files is the way to code because it separates the layout from the logic of the program. Just like how HTML separates the structure of the DOM with CSS for styling and JavaScript for logic. Things are more reusable and modular this way.

MainWindow.Designer.cs
So we have the designer file generated by Visual Studio:
https://github.com/enigma-dev/SharpGM/blob/6719388fb7cabcdffefe69e4f5f8e38deae756de/SharpGM/MainWindow.Designer.cs#L26
Contrary to what it says, you can actually edit it from code as long as you write the exact same code as the editor would. Also, people often complain about this way of doing layouts because XML is more flexible, you can keep it outside the executable and let end users change the layout, so people often argue that WPF is the way to go. But when people write native Win32 apps using C++ and plain old Windows API, they do it in resource files, which I'll get to.

MainWindow.cs
Then you have the regular source file, which is where you should add the actual logic. This includes events for the controls and everything.
https://github.com/enigma-dev/SharpGM/blob/6719388fb7cabcdffefe69e4f5f8e38deae756de/SharpGM/MainWindow.cs

MainWindow.resx
Finally we have the resx file for the form.
https://github.com/enigma-dev/SharpGM/blob/6719388fb7cabcdffefe69e4f5f8e38deae756de/SharpGM/MainWindow.resx

This file is XML and the comments give you a good explanation of what it is for. It is essentially an extension of the rc resources file for WinAPI. When you write native Win32 applications like I just mentioned, using C++ and the plain old WinAPI without .NET or anything, you use rc resource files. ENIGMA uses these for some of the basic message dialogs, such as get_login or show_info.
https://github.com/enigma-dev/enigma-dev/blob/715e96c3b17af346d68e37a8c1708cc13cb369f5/ENIGMAsystem/SHELL/Widget_Systems/Win32/getstring.rc#L14
Notice it looks like a layout? LTEXT is just a label. It tells you its position, dimensions, and text value just like a layout file would. Anywhere you see #include <windows.h> that means the Windows API is being used. These files go through what's called the resource compiler (MinGW, the Windows port of GCC, has an open source version that ENIGMA uses) turns these into a binary which the Windows API can read.

All of this gets wrapped up for you with .NET, including the native controls. Everything in Windows Forms and .NET is just C# bindings (called a language binding because one language is wrapping another languages code, C# wrapping C++ ie) around all of this that takes care of the work for you. resx is an extension of these native Windows API resource files that is formatted as XML.
« Last Edit: November 10, 2015, 08:29:34 pm by Robert B Colton » 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 (Unknown gender) TheExDeus
Reply #21 Posted on: November 12, 2015, 09:24:49 am

Developer
Joined: Apr 2008
Posts: 1860

View Profile
Quote
I am really interested in working on this IDE again and adding the actual logic. But there's some things I have to straighten out first. With this new LGM release I am also writing the GMX API in C++, which is a reusable library for loading GMX projects. This is needed in NaturalGM, and C# can call native code, so I'd just use it instead of rewriting it again in C#.
Forget GMX, do EGM.
Logged
Offline (Male) WizzardMaker
Reply #22 Posted on: November 12, 2015, 10:35:27 am
Member
Joined: Feb 2015
Posts: 35

View Profile
I guess that GMX is for compatibility reasons
Logged
Offline (Male) HitCoder
Reply #23 Posted on: November 13, 2015, 11:47:09 am

Member
Location: Oxford, England
Joined: Aug 2014
Posts: 157

View Profile WWW Email
I made that in Visual Studio Express 2013.
Logged
Computer Scientist, Programmer in C#, C/C++, Java, Python, GML, EDL, and more. Hobbyist musician.
DISCORD: HitCoder#4530
Offline (Male) rcobra
Reply #24 Posted on: November 14, 2015, 02:28:44 pm
Member
Joined: Nov 2015
Posts: 67

View Profile WWW
hi, I have a question about the new IDE, or tried anyone can use Lazarus?
Logged
ps.sorry for my english
Offline (Male) HitCoder
Reply #25 Posted on: November 14, 2015, 03:53:42 pm

Member
Location: Oxford, England
Joined: Aug 2014
Posts: 157

View Profile WWW Email
hi, I have a question about the new IDE, or tried anyone can use Lazarus?

Do you mean is it being made in Lazarus, or can Lazarus be used as the IDE?

Also, it's just an idea, I'm not sure whether I'm going to go through with it. But thanks for mentioning it, Lazarus looks quite interesting and I may try it, never heard of it before, it's geared towards software so making an IDE in it might work, but I'm just concerned about whether it's native or interpreted. I'll have a look though.
Logged
Computer Scientist, Programmer in C#, C/C++, Java, Python, GML, EDL, and more. Hobbyist musician.
DISCORD: HitCoder#4530
Offline (Male) HitCoder
Reply #26 Posted on: November 14, 2015, 04:18:09 pm

Member
Location: Oxford, England
Joined: Aug 2014
Posts: 157

View Profile WWW Email
So I've been messing with VStudio and I now know how to handle nodes in treeviews. I will be investigating data storage and more with this. maybe once I learn enough I might just build on top of SharpGM, but I would rather make my own IDE from scratch; I work better that way.
Logged
Computer Scientist, Programmer in C#, C/C++, Java, Python, GML, EDL, and more. Hobbyist musician.
DISCORD: HitCoder#4530
Offline (Male) rcobra
Reply #27 Posted on: November 14, 2015, 04:47:47 pm
Member
Joined: Nov 2015
Posts: 67

View Profile WWW
use Lazarus to write a new IDE or port LateralGM, it's just an idea

ps.yoyo games made port gm in Lazarus http://yoyogames.com/news/65
« Last Edit: November 14, 2015, 04:57:26 pm by rcobra » Logged
ps.sorry for my english
Offline (Male) HitCoder
Reply #28 Posted on: November 14, 2015, 07:49:55 pm

Member
Location: Oxford, England
Joined: Aug 2014
Posts: 157

View Profile WWW Email
use Lazarus to write a new IDE or port LateralGM, it's just an idea

ps.yoyo games made port gm in Lazarus http://yoyogames.com/news/65

Sounds like a nice idea, but I am already starting to learn C# and I will need these skills for when I'm in college. Lazarus seems nice, might tinker with it a bit over the next week.

Is it bad that I'm mad at Yoyogames for not finishing that? Or was it just not publicised? There's no decent game development IDE for the pi, even though it was designed FOR programming. Python is the most disgusting programming language I've ever seen, which is another reason I drifted away from the pi.

Anyways, so far I'm capable of making an IDE that doesn't save or compile with some important features missing. Still tinkering around though, might make something interesting.
Logged
Computer Scientist, Programmer in C#, C/C++, Java, Python, GML, EDL, and more. Hobbyist musician.
DISCORD: HitCoder#4530
Offline (Male) HitCoder
Reply #29 Posted on: November 14, 2015, 08:32:37 pm

Member
Location: Oxford, England
Joined: Aug 2014
Posts: 157

View Profile WWW Email
I tried Lazarus, I don't like it at all... I don't know why I just can't get on with interfaces with windows floating everywhere... Lol.

On the other hand, I have everything about my IDE all thought up, is just making it functional. Also, C# isn't so hard after all.
Logged
Computer Scientist, Programmer in C#, C/C++, Java, Python, GML, EDL, and more. Hobbyist musician.
DISCORD: HitCoder#4530
Pages: « 1 2 3 »
  Print