Standardizing the Lab Rats 2 Image Format
Added 2020-11-14 11:35:28 +0000 UTCIf you've been following these blogs for the last couple of months you will be familiar with the ongoing Lab Rats 2 image file saga. This post is another, and hopefully last, in that story.
A quick recap: a couple of versions ago LR2's total file count surpassed 64k, almost all of these files being the individual images that are used to make up clothing images, clothing masks, ect. Android .APK files have a 64k limit for individual files, so the android build of Lab Rats 2 broke. For some time the android version contained a limited number of faces to sneak in under the 64k limit and I didn't add any new clothing items or patterns to avoid surpassing it again. Recently I implemented a new file format that stored all of the android versions into a pre-packaged .zip (which the .APK could treat as a single file).
Initially the .zip format was dramatically slower, but with this most recent update I was able to put time into optimizing it. My benchmarks now show the two methods as identical, with the .zip actually producing more consistent display times. Now I am replacing the old PC file structure entirely - all builds of Lab Rats 2 will make use of .zip files to store the character image files.
Changing the PC version over to the .zip file structure has a few major benefits. The first, and probably the most important, is maintainability. By uniting the similar-but-different systems I only have one section of code that needs to be updated if I need to make changes in the future, avoiding potential bugs. It also means that any performance optimizations I am able to make will be applicable to both PC and Android versions. Finally, packaging the files as .zip's makes it easier for modders and developers to grab the files and do whatever they want with them (subject to the Lab Rats 2 license, of course). The old PC based Ren'py archives were never secure, but opening them up took an extra unnecessary step for people who wanted to poke around.
I really hope this is the end of my blog posts about image files, .zip limitations, Ren'py build processes, and all the rest of it! With the Android limitations finally behind me I am starting up some new clothing items to be rendered for v0.35, with some additional features included that I'll talk about in another post!
Comments
Howdy! First, great work! Thanks for all that you do. This game is excellent and I keep coming back to it all the time. Second, if I could make a suggestion: I'd like to see the option to modify clothing to make it open top and/or open crotch. I don't know how difficult that would be, but it would add a lot for the creation of particularly slutty outfits. Thanks again!
2020-11-16 15:28:12 +0000 UTCwhen will we be able to date the family members? i see some npc have a like for incest or dislike,so that suggests 3sums with that npc and family member. side note: loving the update. a bug i run into is when you tell someone to strip and its a decision to leave socks on(etc) the error page comes up. ignore twice and it goes back to the undressing.
IcemanX91
2020-11-15 20:07:58 +0000 UTCGreat to hear you're working on more clothes. Hopefully, we'll finally get tights (a.k.a. pantyhose)! Keep up the good work!
Chris
2020-11-15 19:48:43 +0000 UTCDid you fix the issue with the how the images are displayed when you have multiple people on screen? The last time I played "Vers. 34.2" have the images jumping all over the place, stacking on top of each other, and changing location with each line of dialogue. I can get you some SS's if you haven't seen the issue yet.
Perversity
2020-11-14 14:52:19 +0000 UTC