Pages: 1
  Print  
Author Topic: Pls explain Lateral GM's source code  (Read 2785 times)
Offline (Unknown gender) Mangolion
Posted on: September 10, 2014, 09:46:42 PM
Member
Joined: Sep 2014
Posts: 19

View Profile Email
I am planning to run Lateral GM on Android, I have experiences making Android Apps, I can design rather complex GUI. However, I am a complete newbie when it comes to Java's Swing, looking at the jumble that is Lateral GM's code on GUI, I have absolutely no idea where to start. Could someone please draw me a picture of its GUI components or something?
Logged
Offline (Male) Goombert
Reply #1 Posted on: September 10, 2014, 10:23:25 PM

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

View Profile
There was an attempt to document LateralGM's editors, there is not much documented about LateralGM's code, you'd have to search the Wiki but I can't really provide anything as I don't think there is much available that would be of use to you. The structure of the program is quantitative to specifics, when it comes to specific things I could better assist and explain to you the components or code involved in a working system of the program. It would be a better idea for you ask specific questions about how something works.

Overall when LGM is launched it loads any jars from a plugins folder, such as the ENIGMA plugin which adds a new format and compiler capabilities. Otherwise LateralGM executed by itself is just a program for editing the GM 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 (Unknown gender) Mangolion
Reply #2 Posted on: September 11, 2014, 08:38:00 AM
Member
Joined: Sep 2014
Posts: 19

View Profile Email
I know that LG is only meant to edit GM files, I am going to port it onto Android so I can create files on the fly on my tablet. Perhaps in the future we can literally compile enigma projects on Android! There are already C++ compilers on the OS.
Logged
Offline (Unknown gender) daz
Reply #3 Posted on: September 11, 2014, 04:00:48 PM
Contributor
Joined: Jul 2010
Posts: 167

View Profile
I think you vastly underestimate the amount of work that would go into making an LGM Android port. You would be best off creating your own fork, salvaging the back end and recreating the front end yourself.

Also unless you change how files are loaded, you'll likely be running into out of memory errors with larger project files. I would really not recommend you proceed unless you have a strong stomach.
Logged
Offline (Unknown gender) Mangolion
Reply #4 Posted on: September 12, 2014, 09:13:03 AM
Member
Joined: Sep 2014
Posts: 19

View Profile Email
Most Android phones nowadays have 1-2 GB of Ram, so out of memory is no longer a concern, I am thinking of maybe making a library with all of the GUI components and gmk file loading. But I can't figure out how to decode the gmk file and put in the values, perhaps someone could tell me a little about how to open it through Lgm's source code?
I won't be starting the project for a while though, I'm planning to develop a special ide environment for Android tablets that allows viewing of multiple windows(like the lgm IDE) and that i'll take some time.
« Last Edit: September 12, 2014, 09:18:11 AM by Mangolion » Logged
Offline (Unknown gender) sorlok_reaves
Reply #5 Posted on: September 12, 2014, 09:49:58 AM
Contributor
Joined: Dec 2013
Posts: 261

View Profile
You can have a look at the following file, which reads older (GMK) files:
https://github.com/IsmAvatar/LateralGM/blob/master/org/lateralgm/file/GmFileReader.java

There are similar readers in the same package for reading GMX files, etc.
Logged
Offline (Unknown gender) Mangolion
Reply #6 Posted on: September 12, 2014, 12:15:07 PM
Member
Joined: Sep 2014
Posts: 19

View Profile Email
Thx, I'll look into it
Logged
Offline (Female) IsmAvatar
Reply #7 Posted on: September 16, 2014, 10:22:22 PM

LateralGM Developer
LGM Developer
Location: Pennsylvania/USA
Joined: Apr 2008
Posts: 886

View Profile Email
Our wiki has a good deal of information to help you with developing LGM. For starters, getting the code set up for dev initially is documented here:
http://enigma-dev.org/docs/Wiki/LateralGM:Developing

Understanding the layout of the code is the next task, documented here:
http://enigma-dev.org/docs/Wiki/LateralGM:Packages

All of the file-handling code is contained within /org/lateralgm/file/
All of the frame code for e.g. the frame shon for editing a Room or an Object is contained within /org/lateralgm/subfarmes/
All of our custom components, like custom widgets like the ResourceMenu and IntegerField, are in /org/lateralgm/components/


While LGM was designed to be cross-platform, and mobile devices technically support it (since it is Java), I never considered it worthwhile to do, due to the extreme limitations of mobile platforms (such as the lack of a normal keyboard or two-button mouse) which make IDEs on them less-than-trivial. So while you're welcome to do it, and I'm certainly not going to stop you, I'd just discourage it because it seems silly. Instead, you might try shifting your efforts towards getting games to compile for mobile devices (enigma-side).
« Last Edit: September 16, 2014, 10:27:37 PM by IsmAvatar » Logged
Pages: 1
  Print