Unity 5 multiplatform build trouble

Post here if you need help getting started with Daggerfall Unity or just want to clarify a potential bug. Questions about playing or modding classic Daggerfall should be posted to Community.
Post Reply
User avatar
venim1103
Posts: 8
Joined: Thu Mar 26, 2015 6:32 pm
Location: Finland

Unity 5 multiplatform build trouble

Post by venim1103 »

Hi!

I've been playing around with the tools now and I'm using Unity 5 under wine on Linux (which works perfectly, compared to Unity 4 which had a lot of problems..)

I tried building the first test dungeon (tutorial dungeon) on different platforms and it seems the only platform that works ok is Windows (again using wine as I don't own a copy of windows and will not buy one).

So far both the Linux and Android builds seem to build ok but they lag like hell (especially the android one because of low operating power)! I don't know where the problem lies, I've been trying to fiddle around with the lighting, the pixel quality etc. but nothing seems to help.

I haven't tried Mac or iOS builds yet but I'm sure they have the same problems as the Linux based ones..


Might this be because of not full compatibility with Unity 5 or something else?
Any ideas?


Btw, I got Google Cardboard view working on my Android build :D but it's unplayable because of the lag :(

(Ps. I had to import the assets manually by hand from git because I'm using Unity 5)

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Unity 5 multiplatform build trouble

Post by Interkarma »

Are you experiencing any errors while building, or just issues with performance? If you could, please try creating a smaller test scene (like a standalone Gothway Garden) and let me know if it has the same problems.

In terms of general performance, I would expect issues on tablets at this point. A lot of optimisation needs to be done for Daggerfall's environments (which are made of hundreds of tiling textures, so hundreds to thousands of draw calls) to perform well on low powered devices. This is going to be a large undertaking I want to tackle by itself after 1.3 is released. It seems to perform well on regular computers though. My Linux test environment is a 5-year-old notebook running Ubuntu and everything ticks along quite nicely.

Could you also let me know if the previous Linux demo runs OK in your environment? This was built under Unity 4 but it's a good one to test because you can explore the whole world, including dungeons. This might help isolate problems with DFTFU builds in Unity 4 vs builds in Unity 5. I'd say more testing will be required at my end if that's the case.

Oh, and the DFTFU Developer Preview from home page of http://www.dfworkshop.net has a premade .unitypackage for convenience. This will always be a slightly cleaned up version compared to the live Git version.

User avatar
venim1103
Posts: 8
Joined: Thu Mar 26, 2015 6:32 pm
Location: Finland

Re: Unity 5 multiplatform build trouble

Post by venim1103 »

After trying the demo out , which you linked, and seeing that it works fine (except some texture bugs on my machine), I understood that maybe the problem is in the Unity 5 build only..

I installed Unity 4 and tried building the tutorial Privateer's Hold dungeon. Building for Linux works on both Unity 4 and Unity 5, but on Unity 5 builds the Privateer's Hold dungeon lags like hell, and on Unity 4 build there's no lag whatsoever. On Direnni Tower both versions lag though (maybe it's my computer) so I'm not totally sure anymore and the Windows version is lag free...

I also tried both Gothway Garden and Daggerfall city and there was no lag on both Unity 4,5 builds for Linux.

I haven't tried Streaming world yet..


I'm not sure if it's the Unity version anymore after seeing the problem with Direnni Tower..

The only weird thing that happens in the lagging versions is, that it starts to lag right from start after the camera jumps towards the sky (even though in the settings everything, including the camera position is preset, normal, 0.0.0) and also inside the editor it doesn't do that...


Also, no matter what I try the Android build is very very slow, which probably is just the lack of power on my machine, like you said, because of the high amount of tiling textures and draw cells.


Ps. the only "error?" I get when building on both Unity 4 and 5 is:

DFTFU 1.2.41: Arena2 path validated.
UnityEngine.Debug:Log(Object)
DaggerfallWorkshop.DaggerfallUnity:LogMessage(String, Boolean) (at Assets/Daggerfall Unity/Scripts/DaggerfallUnity.cs:318)
DaggerfallWorkshop.DaggerfallUnity:Setup() (at Assets/Daggerfall Unity/Scripts/DaggerfallUnity.cs:229)
DaggerfallWorkshop.DaggerfallUnity:Start() (at Assets/Daggerfall Unity/Scripts/DaggerfallUnity.cs:185)

, when adding the path to the Arena2 folder on DaggerfallUnity prefab.


PPS. Oh and thanks for the info, I didn't know that the DFTFU had the updated unitypackage inside (which I then used for the Unity 5 builds) :P

User avatar
venim1103
Posts: 8
Joined: Thu Mar 26, 2015 6:32 pm
Location: Finland

Re: Unity 5 multiplatform build trouble

Post by venim1103 »

I might be coming to this problem from a weird angle. The problem might also be inside the Unity itself or in my computer and not a problem of the Daggerfall workshop tools.

I was checking the differences between all my Linux and Windows builds and I noticed this weird thing happening with my controller options in the Unity menu.


EDIT (from original message):

I found out what the problem was with my controller options. It was with my keyboard's driver.. Trying out another keyboard solved that issue BUT it didn't solve the lagging issue. I also tried different mouses and I even changed the mouse pooling rate according to this guy in the Unity bug report which didn't solve the issue:

http://issuetracker.unity3d.com/issues/ ... ot-getaxis

SOAPSUDS:
"I also have this issue. When my pooling rate is set to 500 or 2ms following this guide https://wiki.archlinux.org/index.php/Mouse_Polling_Rate every unity game I've tried breaks, mouse looks at the ceiling/graphics lock up and switching away gets a few more frames. Setting the pooling rate to 125hz or 8 ms fixes all my unity games."


Ps. This bug might be that exact general Unity bug because of such a similar description.. It might not have anything to do with the Daggerfall Workshop tools themselves.
Last edited by venim1103 on Thu Apr 02, 2015 12:32 pm, edited 3 times in total.

User avatar
Interkarma
Posts: 7236
Joined: Sun Mar 22, 2015 1:51 am

Re: Unity 5 multiplatform build trouble

Post by Interkarma »

That's a solid chunk of info. Thank you for taking the time to relay all of that.

Now that you mention it, I encountered a Linux bug early on in my builds described here. Unity have marked this as resolved as of 4.5.2, but I can still reproduce with a fresh Linux VM. This mouse input issue causes sticky/laggy mouse-look behaviour while the cursor is locked. If this sounds like your problem, try turning off the lock mouse check box in PlayerMouseLook Inspector and let me know if that makes any difference.

I'll do as much testing as possible leading up to 1.3 release to get the best result I can. I won't be doing much with tablet builds for now, but I do want PC&Linux to run equally well if possible. Hopefully this is something we can at least work around.

User avatar
venim1103
Posts: 8
Joined: Thu Mar 26, 2015 6:32 pm
Location: Finland

Re: Unity 5 multiplatform build trouble

Post by venim1103 »

I already tried that actually... I even tried to remove the whole PlayerMouseLook, CharacterController, PlayerMotor, all those from my build and I still had the same problem as above :?

It seems like a weird bug, especially because when I tried to build the same build of Privateer's Hold on Unity 4 and Unity 5 for Linux, the Unity 4 version didn't get the bug, worked perfectly, but the Unity 5 build got it..

I hope I can be a help for bug testing under Linux, at least, as I do all my building, testing and running under Linux... My goal is also to eventually build a Daggerfallike game on mobile iOS and Android to test out mobile VR and then on Windows/Linux/Mac I want to try full VR ;)

Unity is amazing because of it's assets, tools and sdk's. A beginner game developer like me can make some cool stuff without much knowledge... Like it took me a couple of minutes to add Google Cardboard sdk and configure it to work on my android build and TADAAA, I got myself a cheap VR version of Daggerfall :P

User avatar
venim1103
Posts: 8
Joined: Thu Mar 26, 2015 6:32 pm
Location: Finland

Re: Unity 5 multiplatform build trouble

Post by venim1103 »

Ok, I tried the laggy build executable on both low end 32bit Arch Linux (Intel Core 2 duo) and on high end (my University's) 64 bit Ubuntu (Intel Core i7, 8 core) computers.

Both the 32 bit and the 64 bith version has exactly the same lag even when the specs are so different...

Haven't found the reason yet :(

I will take a better look at this after I come back from holidays...

Ps. I built the same scene with same Unity 5.00f version that I've been using on my Linux machine now on native Windows and it built exactly the same as inside wine in Linux.. and I got the same exact result and the same exact problem, which means it wasn't the wine (..I've been having ;) ).

Also as the problem seems to arise sometimes on Unity 4 and always on Unity 5, it might be a problem with the tools after all and not just Unity itself..

Post Reply