Mordred Posted January 14, 2014 Share Posted January 14, 2014 Hi fellow Leadwerkers, a question came to my mind the day before and i hope you're able to answer it. If i, say, add 10GB of data to my project, but i do not use those assets, maybe only 1GB of data is actually placed ingame, thus the remaining 9GB are not used at all. What happens if i now compile the game and make it an executable? Is the game 10GB+ in size, or is it 1GB+ in size (and thus the unneccesary assets were removed)? I'm just wondering if i'm able to add all the assets (Textures, models, animations and such) that i have to a project at once in advance without blowing the gamesize too much. Quote Link to comment Share on other sites More sharing options...
SarperSoher Posted January 14, 2014 Share Posted January 14, 2014 Well instead of opening a thread in the forum for it and waiting for answers wouldn't it be much quicker to build a project and take a look at the resulting file hierarchy in the installed game? As far as I know Leadwerks does not omit unused files on build currently, just does not load them if they are not used in a map. Quote Link to comment Share on other sites More sharing options...
Mordred Posted January 14, 2014 Author Share Posted January 14, 2014 Hell SarperSoher, thanks for your reply. If i could test that, i would've done it on my own, but fact is: I bought the preorderedition recently and do not have access to any version (neither the steamedition, nor the full edition) to test that. That's why i asked here Quote Link to comment Share on other sites More sharing options...
DudeAwesome Posted January 14, 2014 Share Posted January 14, 2014 Everything what is into your project folder will be compiled I guess. When you dont need some assets in your game than you should not integrate them. I think an engine couldnt know which assets the software will be using @runtime when the code will be compiled. When I have a game and there is a choosePlayerModel() function (like male/female) than you need 2 models but only 1 is really used. The engine doesnt know which model you need at runtime so it have to compile the worst case -> compile everything. Quote It doesn´t work... why? mhmmm It works... why? Link to comment Share on other sites More sharing options...
Mordred Posted January 14, 2014 Author Share Posted January 14, 2014 Thanks for your reply too DudeAwesome, i would've guessed that too, but am still unsure. Anyways, i gonna check it as soon as i have got my version Thanks four your Help. Quote Link to comment Share on other sites More sharing options...
SarperSoher Posted January 14, 2014 Share Posted January 14, 2014 I bought the preorderedition recently and do not have access to any version (neither the steamedition, nor the full edition) to test that. That's why i asked here My apologies then, seeing that you're in the "Developer" group, I thought you had it. I think an engine couldnt know which assets the software will be using @runtime when the code will be compiled. Actually all the engines I know of remove the unused assets on build. If you reference an asset in a script it's count as being used. Quote Link to comment Share on other sites More sharing options...
Interference Posted January 14, 2014 Share Posted January 14, 2014 My apologies then, seeing that you're in the "Developer" group, I thought you had it. Actually all the engines I know of remove the unused assets on build. If you reference an asset in a script it's count as being used. A lot of the ones I've used don't. Unreal Engine and Source definitely don't: there's a lot of cut content in several games that's pretty well documented. It's not without precedent. Quote Link to comment Share on other sites More sharing options...
gamecreator Posted January 14, 2014 Share Posted January 14, 2014 Actually all the engines I know of remove the unused assets on build. If you reference an asset in a script it's count as being used. And what if you load files from a custom list file you created? I think it's safer for the engine to assume that you may use any files you put into the project. Though in a perfect world there would be options and settings for this in the editor: 1. checkbox to automatically remove what it feels are unused resources 2. give you a list of unused resources with the option to highlight and include them Quote Link to comment Share on other sites More sharing options...
SarperSoher Posted January 14, 2014 Share Posted January 14, 2014 A lot of the ones I've used don't. Unreal Engine and Source definitely don't: there's a lot of cut content in several games that's pretty well documented. It's not without precedent. Unreal Engine has content culling. It does not load the unused assets in the packages in the editor by default and does not include them in a build afaik. Don't know about the Source, maybe it's a limitation about the mods. My point is, someone said it's impossible for the engine to know which assets are used and which are not, so I've proven that it's possible. And what is your point? Quote Link to comment Share on other sites More sharing options...
beo6 Posted January 15, 2014 Share Posted January 15, 2014 i also think it is not really possible. If you for example have code which loads multiple models?: pseudocode: models = {} for i=1, 100 do models[i] = Model:Load("Models/model"..i..".mdl") end how should the engine know what models you are including? It would need to analyze your code and whatnot. Quote Link to comment Share on other sites More sharing options...
DudeAwesome Posted January 15, 2014 Share Posted January 15, 2014 ok I agree. I dont know something like content culling but how can the compiler detect something like this: When I have a Textbox where I have to type in the Modelname as String? (sure its a bad coding technique but I think the compiler cant know it because there is no relationship or reference) $model = ""; //string function getModelNameFromTextInputBox(){ //function returns my string from the textbox where I write the String in runtime (like in a browser textbox) return ValueFromTheTextBox; } $model = getModelNameFromTextInputBox(); // e.g. "test.mdl" Model:Load(getModelNameFromTextInputBox()); //load my model "test.mdl" Quote It doesn´t work... why? mhmmm It works... why? Link to comment Share on other sites More sharing options...
Recommended Posts
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.