Ok, this week didn’t go exactly like expected.
In the 9th level of the Dungeon, I want to create an underground forest. To do so, I bought a Tree pack on Unity Asset Store. They look very good, but their texture mapping was really sub-optimal : a lot of space was wasted.
Wasted space = lost VRAM = less total textures = lower visual quality.
So I decided to redo their texture mapping. 3D pipeline is not exactly my speciality, thus I lost the best part of a day to set everything till I reached a satisfying result.
Once that done, it reminded me that I didn’t check since long time how much RAM the game was needing to run. Last time I did that was for Beta 1, in last September, and the game needed about 450MB. That was quite reasonable and in part with my objective for the game to use 2GB at maximum. According to Steam Hardware Survey, there are 2% of players with less than 2GB of RAM, 10% with 2GB, 14% with 3GB, and the rest ( = 74%) with more than 3GB. For me, it’s important that at least people with 3GB be able to play the game, so the game using 2GB should ensure that. If I can manage to stay under 1.6GB, that would be even better, as it might allow player with 2GB of RAM to launch the game ; although people with such low system RAM might not have a good enough GPU to run the game, so it’s not a big concern.
Anyway, I checked Beta 2 RAM usage, and it was at a massive 1.7GB ! As the Beta 2 is bundled with less than half of the game content, that came at quite a big shock !
After some in-depth checking, I found out it was the creature Animations that were taking more than 1GB : it turned out that with the method I was using to assign animations to creatures, Unity was duplicating the animations instead of sharing them across the creatures like expected. Of course, Unity documentation didn’t have a word about that matter. Once again, I had a big issue because of Unity basic shortcomings. Like I said before Unity is globally great, but it’s trapped with plenty of deadly stuff like that.
Fortunately, Unity introduced a new animation system with its 4 version, called Mecanim (also plagued with a bunch of stupid issues, but I had already solved most of them a few months back). This new version didn’t have the duplicated animation issues, but it means I had to upgrade all my creatures to the new system. I had already planned to do so, so the system was already in place & working, but it meant I had to spend a couple of long days on integration, while I already had more than enough of it in this month.
Once I upgraded all creatures (30% were already using Mecanim), the animations RAM usage plummeted to less than 100MB, which lead the game to need only a bit more of 600GB. Things got back on track, and the 2GB objective should be relatively easy to keep in line now !
So after that, I took a break and as today, I didn’t work on the game for more than 3 days in a row, which didn’t happen since long time..!
But it makes me eager to get back to level design, and hopefully, I’ll get the energy & time to create a level in the next few days (I may take again some break for New Year ).
So as a little teaser as much for you than for myself, I put a screenshot of the built-in map editor. If you’re into level design, you’ll likely enjoy it, as it’s really fast & simple to create a level (except for puzzle mechanism which requires to understand a few advanced stuff).
Facebook Comments