Hey guys, this is kind of a conceptual thing, I haven't coded this yet. I'm thinking of a way to track loaded assets filenames and store them in a list when you run a program. I'm finding that I have to keep cleaning house, so to speak when ever I'm set to distribute a demo version of my programs. I have a whole pile of files, of which over 25 percent I'm not using at all. I worry that I'm distributing files that aren't even being used. Anyway here's my idea. If you guys have a better idea please speak up. I'm open to any suggestions.
Create a lib like...
Global TrackFiles = True
Type TFile
Field FileName$
End Type
Function TrackFile(FileName$)
If TrackFiles then
;Check to see if the file is in the TFile list already
For TF.TFile = Each TFile
if TF\FileName = FileName then Return FileName
next
NewTF.TFile = New TFile\
NewTF\FileName = FileName
End if
Return FileName
End if
End Function
Then in your game code you would use
Mesh = LoadMesh(TrackFile("models/car.b3d"))
Then you could generate a list of files that are actually used by the program. Of course this introduces yet another problem, b3d files, and the like, which reference textures.
Any ideas? I'd like to come up with a solution that can move all the files need by the code to a new location on my drive without having to dice through it manually every time.
Create a lib like...
Global TrackFiles = True
Type TFile
Field FileName$
End Type
Function TrackFile(FileName$)
If TrackFiles then
;Check to see if the file is in the TFile list already
For TF.TFile = Each TFile
if TF\FileName = FileName then Return FileName
next
NewTF.TFile = New TFile\
NewTF\FileName = FileName
End if
Return FileName
End if
End Function
Then in your game code you would use
Mesh = LoadMesh(TrackFile("models/car.b3d"))
Then you could generate a list of files that are actually used by the program. Of course this introduces yet another problem, b3d files, and the like, which reference textures.
Any ideas? I'd like to come up with a solution that can move all the files need by the code to a new location on my drive without having to dice through it manually every time.