Category Archives: Experience Talk

About what I experienced in game dev

Moving to Unity: What’s good and what’s the nightmare

So… I decided to write it here too, after I wrote a Japanese blog about this before. For anyone who hasn’t known yet, I’m a visual novel developer who has made visual novel for nearly 10 years. I’ve used Renpy, Lemonovel Air (AS3 based Japanese engine) and now I decided to move to unity because Lemonovel Air hasn’t been up to date lately and Adobe Air itself is quite not up-to-date. I have another reason why I moved from Renpy, but let’s not to talk about that now. Let’s started about why I like about Unity.

For your information, I’m using Win 10, CPU i5 10Gen, 32GB RAM.

What’s Good About Unity

Like what everyone has already known, we can do various think with Unity with WYSIWYG format. Like animated this or that, and more.
Additionally, there are a lot of plugin/add-on to add to make your games more “woah”. I won’t comment the plugin you use this time, but I want to discuss about “Unity” itself.
By the way, I’m using Utage which is a Visual Novel Assets/Engine for Unity which is already known in Japan to produce various visual novel both for mobiles or consoles.

What I like about Utage:

  • BGM will automatically turned a bit quieter when the character is talking.
  • They have 2 scripts to handle mouth or eyes movements, called the avatar and dicing. The movement also can depends on the voice (mouth will shut if there is no voice) and also can depend on text, or both. If you use avatar mode, character’s mouth will be scaled depends on the voice’s volume.
  • Support is very fast and reliable.
  • Excel based, so it’s easy to arrange the localize. Like Japanese text column can be placed beside English and others.

The Nightmares

…Sorry for immediately going proceed to the bad sideπŸ™„πŸ™„πŸ™„. But I think most of you has already known about the good side? Hopefully…. but yes, I think you need to know more about the nightmares. Ahem.

Very, Not Important Nightmare: C#

It’s pretty obvious, but, even though you can make visual novel on unity by just purchasing the add-ons, you-mostly-need C# skills to customize a lot of features. In my case, since the default menu format doesn’t meet what I want, it’s a must to use C# to customize the timing when the menu will appear, when the screenshot will be taken as the save slot’s thumbnail, and others.
This though, might not be a big deal for developers who are used to customize this and that for their games.

A “Bit” Troublesome Nightmare: Project Size

So, at first I was “shocked” but, I eventually get used with it. My game/project file size was around 300MB when I made it first using Lemonovel Air. But when I move it to Unity, it turns to around 5.5GB.

…I’m not lying. I was shocked very first, and I noticed it’s because the Library folder inside the project files is damn huge. Though, it seems this folder is necessary to run the game on Unity. You can simply delete it, but then whenever you start your game on Unity, this folder will be automatically remade.

Another File Size Issue: Asset Size IS NOT SAME with the Asset Size Unity will import

I have a habit to compress the file size first before putting it inside the project folder to keep the size small. I used to use PNGQuarts (Since it can compress the file size a lot, like 80% or more, without changing the file extension), but with Unity, it doesn’t matter.

Even if the image file, either if it’s in psd or png or jpg is about 5MB, by default Unity would import it as 10MB or more 😨😨😨
I didn’t notice this first and the first time I built my demo, it was around 1GB++…

It seems you need to change the “Import Setting” manually inside unity (something like changing a file properties) to compress the files, and some images, are actually not enable to be compressed, if… they can’t be divided by 4!!! (yes, I have some 1280×721 images, and I need to turn it to 1280×720 first)

You can though, skip this by just making asset bundle later, but asset bundle itself is full of other nightmares, so I prefer to compress it manually (well we can just select couple of images and change the compression all together).

One of Main Nightmares: BGM could cause so many “Now Loading” screen.

This is hard to notice on PC, but it still happens, especially when you “jump” to a specific label/scene (since the assets usually can’t be preloaded before they “jump” as, they don’t know what to use after the “jump”), as by default, Unity Sound Asset will have preload enabled, and load in background disabled.

If you use asset bundle, especially those compressed (by default), you must use this preload. You can choose to use load in background to prevent this “Now Loading” screen (so black screen with turning now loading indicator? or maybe lag if you don’t have such now loading screen), but this could cause the bgm play “late”, as they need time to finish the load first.

Although, the best solution is changing the import mode to “Streaming”, especially for offline game. But—-this Streaming, can’t be used if you’re using Asset Bundle 😭😭😭

There are many occasions with CPU Usage 100%, AND SOME CAN BE VERY LONG

Switching Platforms

Unity can support multi platforms, and this feature is one of the reason why I use unity, but– guess what? When you choose to “Switch Platform” on the build settings, Unity will “reimport” all of your assets to match the new platform format? (you might say it’s same jpg files, for what!?… idk I want to know as well.) AND IT CAUSED 100% CPU USAGE FOR—-in my case 10-30 minutes…😨😨 I didn’t notice it first when I made my demo, but then when I finished re-coded the whole game, with the assets number is like 10k files++?Β  Gosh… it was super taking time.

…and there’s even paid script to make this “switch platform” faster, 25 USD. (There’s free one too, but I haven’t tested either of them)

What’s more frightening though, if you force shutdown at the middle of the switching platform progress, since it takes too long, it will start the reimport again the next time you reopen your project on Unity. πŸ™„πŸ™„πŸ™„

Making Asset Bundles

This though, could be because of the add-ons settings, but basically making asset bundles could take super very long, especially if your assets has too many small files like mine.

By default compression settings, my pc, which I thought is quite powerful already, well, it took like 1 hour or more to finish making asset bundles, and while it’s on process, the cpu usage is 100%…

Well, be positive. Just leave your pc and play ring fit adventure while waiting. You can keep fit, or get muscle ache like me 🀣🀣🀣

Asset Bundle Nightmares

What’s Asset Bundle anyway….

By default, Unity will compress all of your assets (scenario, images, sound files etc etc) into one big file when you build the game. This, can be a problem to patch (since you can’t copy paste 1 or 2 files you want to fix only), and on some platforms, a huge resource files will cause the game to not be able to launch as well.

Tbh, by changing the import setting itself, the resource file size I got is already around the same with asset bundle or maybe even smaller, so I don’t really need asset bundle to compress my game. Still, the patches feature might be essential in future. You can also see some platform like Google etc is recommending to use Asset Bundle for future needs.

But there are too many problems with AssetBundles…

Asset Bundles are specific for Each Platform…

So, you need to build it per platform…. yes… one for Windows, one for Mac one for blablablablabla 😭😭

You Need to Rename The Original Resources Folder when building the game with Asset Bundles

Or the original files will also be included inside the game and it caused your game size 2X than normal. Rename sounds very easy right? Not if because of the rename Unity will need to reimport all the assets inside the renamed folder and it will take a while if you use a lot of assets…………….

Especially For Offline (PC/Consoles Game) You need to move/delete unnecessary platform based asset bundles before building the game…

So, if you build an asset bundle, for example for Mac, you can’t use it to test on the Unity Windows editor, if you use Windows to develop the game. You will need to build a Windows asset bundle to test the asset bundle on windows, but you will later need the Mac asset bundle to run it on Mac. Basically, you will need to place this Asset Bundle within the Streaming Assets folder to make it work (could be different if your game is half-online).

When you build the game, Unity will build all inside Resources folder and the Streaming Assets folder. Which means… if you have Assets bundle for Windows and Mac inside your Streaming assets, you will need delete the Windows one first before building the Mac version, or delete the Mac first before building the Windows version.
If you don’t do this, both of the files will be included in your game and caused a huge file size!! HOW TROUBLESOME!

Using Assets Bundles Or Not will cause Difference in Actual Play.

…So, if you use assets bundles, which is a “compression” file, basically you need to preload the assets first before using it actually inside the game. This— can cause “Now Loading” screen or lags in various occassion, which might not occur if you don’t use the asset bundles….

… Seriously, isn’t it a lot easier to simply upload 300MB than taking care of this stuff?

That’s all for now what I can remember. There could be more, but I don’t remember it now, and there also might be any other solution to solve the matters above for greater programmer, as I’m really a noob to this πŸ™„ but tbh, I’ve been eager to punch my monitor for several times already…

Things you need to be cautious regarding Mac Apps notarization.

After googling, finding more and more info and some deep search, I found that the past fail I experienced with the Mac Apps notarization was not because of the notarization itself, but because some progress I did after the notarization. Below I listed some stuff that you need to pay attention in regards to notarize Mac Apps, especially if you’re using Adobe Air like I did. Btw, I’m not really a programmer, so sorry if some of the text below sounds silly to some of you. I’m using Mac 10.13.6 with xCode 10.1 by the way, since my Mac is very old (2012) and I can’t install any newer OS.

1. Don’t use Steam Content Prep.

My first fault was because I use Content Prep from Steam SDK as a habit to prepare the Mac version for Steam. It seems after the Content Prep “warp” the notarization will be annulled, and if we do the opposite (warp first then notarize the warped app), the notarization will be failed. Just, don’t use this tool.

2. Don’t forget ENTITLEMENT.PLIST

This is the culprit which caused me to redo all of my notarization!!!
You can proceed the notarization without using this, but Steam API requires a special setting on entitlement.plist to work (a permission for the dylib file)!! Also, if your game is using Java (as far as I know both of Adobe Air and renpy is using java to build, so I added Java related permission here just for in case). Anyway, it’s a simple xml file, yet it’s very important!!

3. Make sure the file name inside MacOS folder has no space (inside the .app bundle).

So after my first “success” notarization progress, I tested the file (it was fine) then uploaded the file to Steam, and downloaded it to test again if it works but… it’s failed. I somehow have already been suspicious with the file inside MacOS folder inside the app bundle, so I simply edit the file name and the game works again. But—the notarization was annulled. (You can check this by running xcrun stapler validate on Terminal.)

To settle this, first I tried to re-notarize the file with edited name only, but then it caused more rejected notarization, and I realize that rebuild a whole new .app file is easier and faster. Just, especially for Adobe Air user, don’t add space within the name inside <filename> section.

4. Inside Resource folder is still editable (probably?) But not the one inside MacOS folder.

I tried to delete one file and added random folder inside Resource folder and it’s fine. But when I delete/ edit the file name of the original file inside MacOS folder the notarization was annulled.
I haven’t checked the Resource folder thoroughly, so probably there’s still hidden rule in it.

5. Notarized the plugin first before the app is useless.

I noticed that the notarization fail report mostly mentioned about the plugin/ ane I use, so I tried to notarize it first before using it to build the game, but it won’t do T_T just, notarize it once for all when the .app is done.

6. What the notarization based of?

Tbh I’m not really sure of this.
I have 3 files for East Tower – Kuon, for example, and they only different in languages. The final command on notarization is only “xcrun stapler staple xxx.app”, so at first I was wondered, how could they differ which xxx.app has been notarized, if there are three Kuon.app? But, they really can. I tried to notarized English version first, then I try to staple the Japanese version without the notarizing it, but it was failed (the English version notarization won’t be applied to the Japanese version), and it was the same when I tried to staple an earlier version of the English version. Only the correct .app file which has been through the notarization can be stapled.

To put it shortly, there are still some mystery within this progress. I’m not really sure, but it should settle the notarization issue for now even if… well, it’s indeed taking time to notarize a game, especially a big one,Β  as we need to upload a zip file to Apple server.

Nightmare with Google Play

After Mac issue, Google Play? Isn’t there any good news for developer? T_T Sadly that might be the current case…

FIRST NIGHTMARE: GOOGLE PLAY 64 BIT NECESSITY

This is actually happened quite long ago but I haven’t done anything to fix it yet as it’s pretty complicated.

64bit app issue is actually pretty old, but it seems the new issue is different with the older one. To support Android Q, Google asked developer to make the app to contain the new arm binary (er forget the code), different with the older one. The problem is, if I update my current app to this version, the ANE (Plugin) to process the in app billing won’t work anymore, and~~~I will need to buy and learn the new one (from different provider since the previous ANE maker doesn’t support this update anymore.)

But this is not all. Google did ask us to update the app to match Android Q requirement (it doesn’t mean the current app can’t be played on Android Q, but they want to remove all app which doesn’t match this requirement from Google Play Store), but most of Android devices actually can’t play this 64 bit type app. It’s too high-spec.
As the result, now developer need to upload at least 2 types of apps to Google Play store for one title, the older version which supports earlier version of Android OS and the newest one which only can be played on Android Q and other 64 bit supported devices.
Basically: Double Works.

Luckily, Google Play has let us to finish this until next year deadline. So there’s still time to learn about the new plugin and others…

SECOND NIGHTMARE: GOOGLE PLAY PROMO VIDEO

Sooo isn’t it just youtube?

Yes, even I myself would never think youtube will give me such issue orz.

The nightmare started with the notification from Google, asking us to remove ads from the google promo video (it’s youtube video), or the promo video will be removed from Google Play Store.

The issue is, I did monetize my older video, but all the ads now have been removed due to Youtube new rule, which mentions only channel with more than 1000 subscribers can have ads. But, it seems youtube system still detects this video which doesn’t have ads anymore as “video with ads” and Google play support can’t do anything beside telling me to ask youtube about it.

BUT

YOUTUBE HAS NO EMAIL SUPPORT IF YOUR ACCOUNT DOESN’T HAVE SPECIAL PRIVILEGE

Basically I only can write down on a community forum, andddd no one would answer it of course.

…okay it’s easier to reupload the video as a new video! Google Play also suggested this! Except….

“Your video has been uploaded previously, therefore this one can’t be proceeded. “ — Youtube

…the moment I saw that error message on youtube, I just feel… hopeless….. just…why? This is so absurd T_T

Maybe the only thing I can do is edit the video, like adding a blank frame at the end or something, changing the file name and try to reupload it again. But… this would give me more hassle, so probably I’ll simply delay this matter for now.

*Just hope there would be less issue for developer from now on.

Dilemma with the new Mac OS 10.15 Catalina

There are soo many dilemma with the the technical support lately. Sometime I wonder why the new OS update will cause more stir rather than bringing more sales >< Anyway, I’ll tell you a story about the issue with MAC update this time.

CATALINA HORROR

One day, Steam sent me email, notifying that I need to make sure my apps support 64 bit and notarization to make it works with the new OS, Catalina. I usually don’t pay much attention to OS update, because well, I have my apps in too many platform, and it’s a big hassle to confirm if it works in every new OS for every platform, unless there are a big notification that it will need urgent update like this or it won’t work anymore.

I thought it would be easy, like only turn the app to 64 bit and upload it to somewhere to get notarized. I WAS WRONG.

It’s very easy to turn the app to 64 bit, and all my apps on Steam started from HTTOYM (2015) are all 64 bit.
But then, the first notarization try ended failed. At first I thought I simply used a wrong SDK version, but that’s not that easy. The app needs to get the correct code sign first before notarized.

To do this code sign, we need to generate a certificate within the apple developer console (which cost 99 usd a year) but it’s ok as I already have it for iOS anyway. But that’s not all……..

After build the new app using the new SDK, I need to eliminate some files generated by the SDK that might bother the notarization progress, then code sign everything using the correct developer id certification (I got issue before cause idk why but there’s weird extra space that needs to be added on my developer id) then after finish everything, the next is…. proceed with the notarization.

NOTARIZATION HORROR

Tbh I already failed 3 times with this.

Basically it’s simple, I only need to upload the file to apple server. But it’s slow! I tried to use my ET Akio data to try because it’s the smallest, but it takes 30 minutes ish for the notarization. And then… ok let’s try the luck and see if it works or not this time πŸ˜•πŸ˜•πŸ˜₯πŸ˜₯

After the notarization finished, I still need to staple the notarization result to the app itself before upload the new build to Steam.

Finish?

FINISH?

NO!

THE TRUE HORROR

Basically it will only finish for 1 build, while in my case, the games have each build for each language version.

This means, for Akio I need to reupload 4 build for the 4 languages it supports. Same for Takashi, then I also still have Kuon, Kurenai, and all my Eroolia and CAFE 0 Series. Imagine with the HTTOYM which now supports 7 languages (insert Death flag here) — in other words I need 14 hours ish only for HTTOYM game.

…is it really worth to do all of this?

…or maybe I should ask, is it really worth to ask developer to do all of this, Apple? 😭😭😭😭😭😭

For the meanwhile, I decide to learn first about how to notarize first while proceed with my other porting project T_T I can’t promise if I will make Catalina works with my games for now, as I haven’t succeeded yet as far with the notarization.

If it takes longer and messier than what I thought, I might drop all support for Catalina and later. My suggestion for now is simply, don’t update to Catalina yet T_T

Eroolia’s Dinner Party, and stuff I did recently.

Hi, and I apologize for not updating this blog more often ^^;

Yakiniku Party

First, I want to tell about the marvelous dinner yakiniku party with Eroolia (kokouta) casts! Not all could come due to the schedule but it was really fun!

It’s really exciting to work with them, I feel as if I really went into the Eroolia’s world πŸ’–πŸ’–

Learning Unity, polishing scenario and others

So yes, I’ve spent my last few days in learning unity and it’s not easy as it’s very different with the engine I used before.

First, I’m thinking to use “Utage” which is quite famous in Japanese visual novel community and also used by Japanese company product too as I heard. This engine though, doesn’t use text files, but it’s excel based. Which means, the programming method is quite different with the method I know so far. It enables me to try many new effects, but there’s also some issue I got as the glittering CG I like might not be as easy to produce as before. I still need to learn a lot about it.

Amazon Apps Updates

I also decided to convert my apps on Amazon Appstore to support multi languages, like the one I published at Google Play and iOS. Hopefully the progress will run smooth without any issue. It takes a bit of time though ^^;