Suggestion: Separate Resources and Code when Saving/Compiling

Started by Ashera, Tue 12/07/2005 01:37:20

Previous topic - Next topic

Ashera

This is a suggestion which unfortunately would be a major change to the way the engine and compiler work.

Right now, the working game files (e.g. roomxx.crm, ac2game.ags) contain a mix of code and imported graphics/resources. My suggestion is that the code and resources should be separated out so that you can, say, change a room background without having to re-compile the room, or can change a room's script without the engine re-writing the room background to disk.
Additionally, in the compiled game, everything is lumped into one executable. This means that when I change, say, the script header, I have to re-compile the game and re-write all the resources to disk. I'll admit I'm working on a pretty big game. It's at 60 rooms so far, using 800x600 high color resolution, with close to 600 sprites. The compiled exe is nearly 300 MB. Most of the compile time is spent just writing the graphics to disk. (I can tell because one of the longest steps is writing acsprset.spr .)

I've searched the forums but haven't found any mention of this before. It may just be that my search-fu is weak.

-Ashera

Rui 'Trovatore' Pires

#1
BTW, you do know about the quick-save thingy, don't you? Press Ctrl-A, or select it ftom FILE menu, and it doesn't all get recompiled.

EDIT - Yikes, that's terribly phrased! What I mean is, you can quick-save. I believe that it compiles just the script and "global changes", as it were (GUIs and whatnot), while leaving graphics untouched. Or something. Whatever it does, it saves really fast.
Reach for the moon. Even if you miss, you'll land among the stars.

Kneel. Now.

Never throw chicken at a Leprechaun.

Ashera

The Quick Save description says that it saves the work, but doesn't compile a runnable game. The problem is that I need to compile a runnable game in order to make sure my script works.

Pumaman

I can appreciate the annoyance if you have a large game and continuously need to test it.

You can just save the room and place a copy of the CRM file in the Compiled folder, and it will override the one in the EXE, however this is quite a faff to remember to do it every time you need to.

The speed of your hard drive does have a direct impact on how long it takes to build the EXE.

Perhaps some sort of option to run the game from the uncompiled resources rather than the built EXE would be handy, but it's non-trivial to implement.

Ashera

The room file tip will help a lot. Thank you.

And I knew it would be a non-trivial change, I just wanted to put it out there. :)

SMF spam blocked by CleanTalk