Pages: 1 2 3 4 »
  Print  
Author Topic: Command Line Interface  (Read 31908 times)
Offline (Male) Goombert
Posted on: June 20, 2014, 03:00:37 pm

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

View Profile
So I decided to do some testing and get the command line interface I started working and building an empty game. The program I have dubbed "emake" boots in less than 3 seconds initializing the library and all, and can compile and run an empty game in about the same amount of time. It is significantly faster than loading the IDE and building an empty game from there.

This has a lot of implications, you can build games without an IDE, you can build games much quicker, especially extremely large games like TKG makes. This also means we could significantly improve the performance of LGM working with large projects. This would be done by only loading the resource tree at startup, and loading and unloading resources or as you edit them or we could also just cache them.

This would allow someone like TKG to load a 100mb game much quicker, probably about 5-10 seconds, and build the game much quicker. The way we would accomplish building the game without loading it is by simply passing the file path of the project to the CLI and telling it to build the project.

A lot of these ideas are already utilized by Studio and it has many of the same restrictions that follow which are actually the same for most other IDE's. But we have some issues:

1) LGM does not have a guaranteed format, it lets you save and load from all formats.
2) This would require that you create the project directory when you want to make a new game, like in Studio, you couldn't get away with adding resources and saving later because the IDE has to have it on disk.
3) GMK is damn near impossible to optimize as a result of it being one giant ass file, you can't easily skip through parts of it and write a single resource.
4) You probably would not be able to build without saving your changes. I believe Studio has this same restriction.

Some possible solutions are the following:
1) Treat formats like GMK as an import/export where you can import a GMK but it will automatically be converted to GMX or EGM whichever format you choose.

Here are some benefits:
1) Faster loading times
2) Faster compile times
3) Less out of memory errors
4) Can build projects without an IDE
5) Makes it much easier for 3rd parties to write IDE's and other interfaces for the program

So the question is, does the cost outweigh the benefit? I am fairly certain most of you would say yes, but feel free to express your ideas on the matter.

*** Update ***
See latest forum post, the CLI now builds projects.
« Last Edit: February 17, 2021, 05:20:13 pm by Goombert » 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) Darkstar2
Reply #1 Posted on: June 20, 2014, 03:48:56 pm
Member
Joined: Jan 2014
Posts: 1238

View Profile Email
I would have to see it and try it !
I don't like the idea of discontinuing the IDE and building everything from a command-line.  How the hell does that speed of development ? It only increases its time.  Might be faster loading / compiling, but an IDE is a major time saver.  How the hell would one place their tiles, objects, sprites in the room, without a room editor.  You would have to create the instances yourself and constantly try and edit to get the proper X /Y.  What about  certain object properties that you control in the IDE, room, etc. in the IDE you have to select events and put code in it, how the hell are you going to do that without an IDE ?  It's more time consuming and complicated.  If YoYoGames decided tomorrow to discontinue its IDE and ask everyone to build their games using a CLI, no GUI/IDE, I'm quite sure even the experienced advanced developers would not be too happy.

The way I would handle large ass projects is by using external resource handling.  I already have plans to make my own function libraries to handle this. I could make multi gigabyte projects and my EGM would load instantly since everything would be handled by the library and only loaded as needed, dynamically.  But at least there is an IDE to work with to organise your resources / placeholders, edit room and other minimal stuff you would keep inside your EGM.

Logged
Offline (Male) Goombert
Reply #2 Posted on: June 20, 2014, 03:54:46 pm

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

View Profile
Judging your comments indicates you didn't even bother to read my post. Currently LGM loads your entire project into memory as one giant ass binary and then uses JNA to send that memory to the compiler, which requires changing endianess and is extremely slow as hell. The IDE could use the CLI interface and just pass the file to it to compile, is the whole point of this. To speed up the IDE, not make it slower.
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) Darkstar2
Reply #3 Posted on: June 20, 2014, 04:13:10 pm
Member
Joined: Jan 2014
Posts: 1238

View Profile Email
Judging your comments indicates you didn't even bother to read my post. Currently LGM loads your entire project into memory as one giant ass binary and then uses JNA to send that memory to the compiler, which requires changing endianess and is extremely slow as hell. The IDE could use the CLI interface and just pass the file to it to compile, is the whole point of this. To speed up the IDE, not make it slower.

#1) I did read your post, what caught my attention is you mentioning that one could create an entire project without an IDE, which is was hard for me to digest.

#2) using the CLI through the IDE means having to save each time a change is made.
This increases the likelihood of LGM crashing.  As I get cannot  create new thread and many errors when saving too frequently in LGM, and yes even with empty projects that have no sprites or any resources loaded.
So this would mean each time you want to run your game you would have to save changes. But what if you DON'T want to save changes and only save them if the result of your test is productive, you would have to "undo" the changes yourself and re-save, OR you would have to save to a different file.
Personally I could live with that if the pros outweigh the cons, that's how it works in studio anyway, if it means it makes LGM more stable it would be good, which won't be the case since the stability issues are regardless of project size as I've proven many times

Regarding the building an entire project without an IDE particularly large one that part I am not convinced at all unless you have an amazing photographic memory and can visualise a virutal room editor and automatically figure out all the X/ Y's and object properties mentally ! lol.
Logged
Offline (Male) Goombert
Reply #4 Posted on: June 20, 2014, 04:27:34 pm

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

View Profile
No, it would actually make that a lot better, LGM crashes from saving frequently because it's accumulating more and more memory usage. Although you seem to be having other issues as well like bugs in JoshEdit, which aren't out of memory errors at all and make no sense.

Anyway TKG is one person who really wants it and so do I. And having it is better than not having it. This is literally the way practically all game engines and IDE's work. I can make the thing first and yall can decide later whether you want LGM to continue being a laggy Java program or you want it sped up.

On top of that, this lays the groundwork for a C++ IDE by getting a lot of the plugin redone in C.
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) Darkstar2
Reply #5 Posted on: June 20, 2014, 04:51:06 pm
Member
Joined: Jan 2014
Posts: 1238

View Profile Email
No, it would actually make that a lot better, LGM crashes from saving frequently because it's accumulating more and more memory usage. Although you seem to be having other issues as well like bugs in JoshEdit, which aren't out of memory errors at all and make no sense.

Anyway TKG is one person who really wants it and so do I. And having it is better than not having it. This is literally the way practically all game engines and IDE's work. I can make the thing first and yall can decide later whether you want LGM to continue being a laggy Java program or you want it sped up.

On top of that, this lays the groundwork for a C++ IDE by getting a lot of the plugin redone in C.

So TKG making an entire game entirely from non IDE, I would be shocked. I'd love to know how he will do this, given his games are big is he going to place all those resources by mentally calculating their X Y coordinates ?    How can you build a game entirely from CLI, you are not very convincing in selling this, since you are asking people's opinion.......
Ok you mentioned IDE accessing the CLI.
But you also mentioned that one  could make an entire game without even using IDE....This is the part that I'd love to know about, how ??!?!? because I'd love to try that but can't see how I could possibly do so without an IDE.  Unless you are building projects that don't involve a GUI :P
Logged
Offline (Male) Goombert
Reply #6 Posted on: June 20, 2014, 04:56:47 pm

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

View Profile
You wouldn't use the CLI to create the files, it's expected that the project will be created in an IDE. The command line will compile it. But yes it's possible to edit your resources outside the IDE using text editors and image editors, you can very easily open a sprite or background from a GMX and modify the resources, and you can open the object files and change the code and other properties. You can also edit scripts using notepad++ with the following extension.
http://enigma-dev.org/docs/Wiki/Plugins
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 #7 Posted on: June 20, 2014, 05:28:42 pm

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

View Profile
No, it would actually make that a lot better, LGM crashes from saving frequently because it's accumulating more and more memory usage. Although you seem to be having other issues as well like bugs in JoshEdit, which aren't out of memory errors at all and make no sense.

Anyway TKG is one person who really wants it and so do I. And having it is better than not having it. This is literally the way practically all game engines and IDE's work. I can make the thing first and yall can decide later whether you want LGM to continue being a laggy Java program or you want it sped up.

On top of that, this lays the groundwork for a C++ IDE by getting a lot of the plugin redone in C.

Just that is enough of a selling point to outweight the possible cons, In my view and humble opinion if you're going to develop something as memory hungry as a video game editor (what with ogl openal, shaders, physics et all), you are better served doing it in a compiled language.

Anybody that has tried Eclipse knows just how memory hungry a complex application developed in java truly is.
Logged
A child of five would understand this. Send someone to fetch a child of five.
Groucho Marx
Offline (Male) Rusky
Reply #8 Posted on: June 20, 2014, 06:03:30 pm

Resident Troll
Joined: Feb 2008
Posts: 954
MSN Messenger - rpjohnst@gmail.com
View Profile WWW Email
Really the editor shouldn't be that memory hungry just because it's a game editor, especially when it doesn't run the game itself within the IDE.

But yes, moving more of the plugin's functionality to C++ is fantastic.
Logged
Offline (Unknown gender) Darkstar2
Reply #9 Posted on: June 20, 2014, 06:21:23 pm
Member
Joined: Jan 2014
Posts: 1238

View Profile Email
You wouldn't use the CLI to create the files, it's expected that the project will be created in an IDE. The command line will compile it.

So the IDE would simply call the CLI which will work directly on the file instead of the IDE passing its memory to the compiler, got it, that's how it should be done anyway, :D

Quote
But yes it's possible to edit your resources outside the IDE using text editors and image editors, you can very easily open a sprite or background from a GMX and modify the resources, and you can open the object files and change the code and other properties.

Agreed, but you still need an IDE to create that GMX, GMK, EGM or whatever .... That is my point, how would you otherwise build entirely from command line.  I think I might actually do straight building from CLI for my upcoming dynamic / external resource handling library, I won't need sprites or placing stuff in room.  With this new library I want to build, that will allow working on massive projects multi gigabytes in size even, and keeping the IDE un cluttered with only the code.

The faster compiling through IDE -> CLI is a much welcomed feature although on my system things compile quite fast - that might benefit those with slower HDDs ? systems ?
and if the only con is having to save changes before compiling, that is really not a con because this is how it's done in studio :D

Logged
Offline (Unknown gender) time-killer-games
Reply #10 Posted on: June 20, 2014, 10:49:29 pm
"Guest"


Email
THIS IS SO WONDERFUL ROBERT! If we didn't live on the opposite coast of the US I'd totally go gay and fall in love with you. (Just an expression to make a point - you're such a great friend) :D :D :D

I'm so happy!! :D thank you!!
Logged
Offline (Unknown gender) Darkstar2
Reply #11 Posted on: June 20, 2014, 11:03:43 pm
Member
Joined: Jan 2014
Posts: 1238

View Profile Email
THIS IS SO WONDERFUL ROBERT! If we didn't live on the opposite coast of the US I'd totally go gay and fall in love with you. (Just an expression to make a point - you're such a great friend) :D :D :D

I'm so happy!! :D thank you!!

TMI  ;D ;D ;D

I guess the best way is to try it and see how it works out.  I think this feature might become useful for some libraries / scripts I want to write, not requiring IDE / room editing etc.


« Last Edit: June 20, 2014, 11:05:50 pm by Darkstar2 » Logged
Offline (Male) Goombert
Reply #12 Posted on: June 20, 2014, 11:45:30 pm

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

View Profile
Quote
THIS IS SO WONDERFUL ROBERT! If we didn't live on the opposite coast of the US I'd totally go gay and fall in love with you. (Just an expression to make a point - you're such a really great friend) :D :D :D

I know I am, but also I got the basics laid out for loading GMX and I have it parsing the # of rooms and their captions. Just a bunch of copy and paste work to redo the LGM version. Other than that only fonts need worked out, I'll need to make LGM write font textures to the GMX format which requires writing them the way they do, which will need reformatted into our way. We use less variables to store glyphs than they do.
« Last Edit: September 14, 2017, 03:02:07 pm by Goombert » 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) Goombert
Reply #13 Posted on: June 27, 2014, 07:29:55 pm

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

View Profile
Just to update everyone on this, the CLI now builds Project Chaos, with a few minor glitches and kinks I still have to work out this should be able to compile most GMX games shortly. It is also builds the game in less than 6 seconds, loading times are trivial now.

This is the pull request where I am working, I will be asking for a merge once I clean it up some and work out some of the kinks.
https://github.com/enigma-dev/enigma-dev/pull/765

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) time-killer-games
Reply #14 Posted on: June 27, 2014, 08:33:44 pm
"Guest"


Email
YAAAAAAASSAAAAAYYYYYYY!!!!!! THANK YOU! :D :D
http://www.youtube.com/watch?v=qOllBh1-DCs
Logged
Pages: 1 2 3 4 »
  Print