ENIGMA Development Environment
Website is in read-only mode due to a recent attack.

Pages: 1
  Print  
Author Topic: Where would you like your objects?  (Read 1047 times)
Offline (Male) Josh @ Dreamland
Posted on: May 16, 2013, 07:06:14 AM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2951

View Profile Email
The more I review the idea, the clearer it is that I ought to start moving event code into separate source files. I'm thinking the new pretty printer (which I am using as a gloss word for "that thing that exports all the relevant engine code") should implement this change, just while I'm at it.

The point of this is to make it so that objects do not all need rebuilt every time you run the game. Issue with that is, we need somewhere to store the object files generated by the compiler (eg, GCC). The way I see it, we have a few options:

1) Store them in temp files. Your game will need built from scratch once, every time you reboot the machine.
2) Store them in the same folder as the game. So there'll be a ./game.egm, and a ./bin/game.egm/objects. This will leave object files everywhere, because nothing will ever delete them.
3) Store them in the actual game. This will make games extra fat, and could be problematic when using zipped formats (we can't point the linker to a zipped file).
4) Insert better idea here.

My only better idea is to give ENIGMA a specific spot in appdata / ~ that stores object files by game ID/path+filename, along with a timestamp to let ENIGMA know that it's been two weeks since the objects there have been used, and so they should probably be deleted. Game Maker used to prompt to delete old temp files on start, so I guess it wouldn't be unheard of.

Anyway, thoughts welcome.

Cheers
Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Male) Goombert
Reply #1 Posted on: May 16, 2013, 07:35:58 AM

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

View Profile
No your better idea blows, I hate how GM always asks me to clean up old temp files. Just go with #2 its most standard and what you see with every other compiler.
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 #2 Posted on: May 16, 2013, 09:11:26 AM

Developer
Joined: Apr 2008
Posts: 1860

View Profile
While 2) seems the best way it also could be the most confusing to noobs. They will see all those files with the game.exe or game.egm and never figure out why they are there. This would prompt things like packing game.egm+all obj. in a zip just to share the source. On the other hand it would be the most practical way to do it.
Logged
Offline (Male) Josh @ Dreamland
Reply #3 Posted on: May 16, 2013, 10:57:51 AM

Prince of all Goldfish
Developer
Location: Pittsburgh, PA, USA
Joined: Feb 2008
Posts: 2951

View Profile Email
A prompt is not completely necessary. It could just be set to unceremoniously delete any objects that haven't been used in over two weeks when it is launched, or when the IDE is closed. The point of this endeavor is not to make all games build fast every time, but just to make it so when you are actively developing a game (or multiple games at once), you don't need to build all of it every time you want to test something.

My main issue with (2) is, as HaRRi pointed out, novices won't know what the bin/ dir is. My fear is not that they will bundle the objects with the game, but instead that they won't know it's safe to delete them if they delete or stop working on the corresponding games. If they were dumb enough to include the bin/ dir with the game, we'd have serious problems, because they could be including a hundred games' worth of object files.

Another thing I have to work out is getting the objects to build as shared objects/dynamic link libraries, so they can be rebuilt and swapped out on the fly. This will, ideally, allow debug and design mode to make changes to the code and hot-swap it with the existing code.
« Last Edit: May 16, 2013, 11:04:18 AM by Josh @ Dreamland » Logged
"That is the single most cryptic piece of code I have ever seen." -Master PobbleWobble
"I disapprove of what you say, but I will defend to the death your right to say it." -Evelyn Beatrice Hall, Friends of Voltaire
Offline (Male) Goombert
Reply #4 Posted on: May 16, 2013, 11:56:16 AM

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

View Profile
Now that I think about it, ya go ahead and throw them in temp, I don't need that shit nobody does, and it always confused me when I started learning C++ and like Visual Studio and stuff, it is very confusing to novices, you would literally have to put the biggest sign on the folder that states otherwise. So just put em in temp
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 #5 Posted on: May 17, 2013, 01:25:34 AM

Developer
Joined: Apr 2008
Posts: 1860

View Profile
Giving a choice is usually a good option as well. But for now putting them in temp seems the best solution.
Logged
Offline (Male) Goombert
Reply #6 Posted on: May 17, 2013, 12:26:35 PM

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

View Profile
One other thing you could do is give ENIGMA its own temp directory inside its installation folder or from a relative path where LGM or ENIGMA are originally executed.
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.

Pages: 1
  Print