Jump to content

How to decrease deployment "data ZIP" folder?


domi
 Share

Recommended Posts

I noticed that the data compressed folder in the build directory puts the entire asset library including unused elements.

 

How can I build with only the assets used in a game?

For now my basic test map is over 258 MB.

 

this is what it looks like

post-13808-0-58140700-1420678268_thumb.png

Link to comment
Share on other sites

Ah, I see. The FPS player constructs the name of the foot step sound files programmatically, so they are never included:

    for n=1,4 do
       self.sound.footsteps.concrete.step[n] = Sound:Load("Sound/Footsteps/Concrete/step"..tostring(n)..".wav")
   end

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

self.sound.footsteps.concrete.step[n] = Sound:Load("Sound/Footsteps/Concrete/step"..tostring(n)..".wav")

 

That's programmer coding, the sounds should be clearly named and put on a table, this to keep program clear and editor able to list the assets used.

It reminds be very bad C coders, making code unreadble and unmaintanable : bad practice.

 

I don't think there is some program on earth able to detect assets used by programs like that laugh.png

Sound = "MySound"

i = 0

i +=3

Sound += i

y=10

Sound += "track"

Sound += y

LoadSound(Sound)

 

 

It seems the more Josh gives you guys , the more you go crazy and ask for impossible blink.png

  • Upvote 1

Stop toying and make games

Link to comment
Share on other sites

It is not weird at all Yougroove. It would be bad practice to manually having to specify every single sound in this case. I my case I have a complete soundpack called "naturesounds". All sounds go from naturesound1.wav to naturesound186.wav. What a nightmare that would be if I had to manually specify each sound.

 

 

I also don´t think it is Leadwerk´s responsibility to detect whether such 'dynamic' named files are being loaded. It would be very hacky the least and you will always have some sort of exception to the case. The bulk of the assets are already being loaded via the ways Josh has described in his blog and I personally think those methods are just fine.

 

 

When files are used like in the example above, a 'simple' option to select folders or files with a certain extension for export would be a good solution.

Something like below would do the trick. Not only does this give Leadwerks a unified way of detecing export folders, it also gives the programmers a way of creating dynamic variables without having to worry about missing export errors.

ExportInclude "Sounds/Player/Footsteps"

  • Upvote 2
Link to comment
Share on other sites

As all scripts are scanned and exported, and programmatically generated content is not exported, can we create a myexports.lua.

Even if myexports.lua isn't attached to any maps or entities I presume it will still get scanned and exported.

 

So my question is what is the minimum code that I need to put into myexports.lua to make the export scanner include content that has been programmatically referenced elsewhere in the program.

Do I have to code every file used, or can I code a path to include all files, and will that include subfolders and their files too?

 

eg. if subfolders were not automatically added. Would the following work or would every programmatically referenced file need to be listed.

 

-- helper for publishing

 

local soundexp="Sound/Player" -- entire contents of Player folder added to export

local soundexpFootsteps="Sound/Footsteps"

local soundexpFottstepsConcrete="Sound/Footsteps/Concrete"

local zombiesounds="AddOns/Zombie Character Pack/*.wav" -- just the .wav files added to the export

-- or would this be required to specify each individual file

local zombiesounds1="Addons/Zombie Character Pack/alert.wav"

local zombesounds2="Addons/Zombie Character Pack/idle.wav"

Link to comment
Share on other sites

It seems the more Josh gives you guys , the more you go crazy and ask for impossible blink.png

Yes! This is why users do not design Leadwerks directly, and I say no to a lot of things. biggrin.png

 

Anyways, there's some more info and an update here:

http://www.leadwerks.com/werkspace/blog/1/entry-1383-selective-file-inclusion-continued/

My job is to make tools you love, with the features you want, and performance you can't live without.

Link to comment
Share on other sites

I don't think there is some program on earth able to detect assets used by programs like that laugh.png

(...)

 

It seems the more Josh gives you guys , the more you go crazy and ask for impossible blink.png

 

There was no one who asked for a program to detect that. The only thing that was asked was that one could also get a chance to force the editor manually to include those files, which was implemented now by the option to not use the new selective inclusion ;)

  • Upvote 2
Link to comment
Share on other sites

The only thing that was asked was that one could also get a chance to force the editor manually to include those files, which was implemented now by the option to not use the new selective inclusion wink.png

 

Glad to see Josh made the right decision despite earlier reservations. Good job and keep up the good work.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...