Lighting in Unity2D looking different on phone than in editor - unity3d

I am working on a little mobile game in Unity in 2D. I want the player to be a light source and everything else to be dark, so I gave "everything else" the sprites/diffuse material. This works extremely well in the editor/Game view in Unity, but when I build to my Android phone it looks weird. See the pictures. Any ideas?
Currently I am using the realtime rendering mode for the light, I know it is not efficient, but that's a problem for later. I looked into baked lighting, but I spawn the rooms random and dynamically so I am not sure how to proceed there.
I can find very little information about lighting in 2D mobile games in Unity, not sure how to proceed, it is all very confusing.
How can I make the lighting look the same on the phone as in the editor/game view in Unity?

Sry for writing an answer instead of a comment, but I'm new to SO and don't have the rep to write comments, yet.
I had similar issues on my Android build and we would need way more information in order to help you.
(1) Are you building for Android, iOS or both?
(2) Check your graphics emulation. Make sure you use OpenGL3.
(3) Check your graphics tier upon build. Try to use the highest tier with high settings. Lower tier settings might result in bad light.
(4) Not necessarily corresponding to your issue but you might wanna try building with a 32-bit display buffer and see what happens.
(5) Are you using post processing effects? There is very limited support on mobile devices.
(6) Check the priority of each light source you are using.
(7) Maybe it's a shader issue? Have you tried using mobile shaders?
Hope this helps, again, sry for answer while not being 100% sure.
Cheers.

Related

Large venue augmented reality

What are all the hardware (camera) and software requirements for big screen augmented reality? Is there any workaround to use Vuforia and smartphone to display on a large LED screen?
Basically, it will work if the target is big enough and the mobile device camera is good enough. But it will be very difficult for you to get exact answers I think - you need to test it or simulate it.
Regarding if people hide the target - again, you need to figure out yourself what the scenario is and how bad can it be. If it's very crowded and people are hiding the target constantly, using only target-based solution is not enough. If you're only talking about hiding here and there, you can use Vuforia's Extended Tracking for that.

Unity Tango app crashing when using FindPlane function

Recently I've started porting my older Unity code with an earlier version of the Tango / Unity SDK to the latest version. Overall, it's working great. Faster frame rate, less drift, everything seems pretty good....Until: BLAM... Sudden crash. So, I tried paring down my app to the essentials to see if I could reproduce the crash and what I've found is that if I follow the AR Unity example in the docs to the letter, no problem. But, if I add a 'FindPlane' call within the Update() function so I place a sphere at the planeCenter of whatever is at 960,600 (middle of screen), after a few minutes the app will crash. So my suspicion is that this is what's causing the crash in my larger app (with many more moving parts, so to speak).
My question is two part:
1) can anyone suggest some debugging processes to help me identify exactly what the problem is here, in case it isn't the FindPlane function after all?
2) does anyone know why the FindPlane function might cause an error? Even if it doesn't successfully find a point it should still return Vector3.zero and a new/default Plane object, neither of which should result in a crash.
Thank you for your thoughts on this perplexing issue.
EDIT: I tried installing and activating Tango-Debug-Overlay recently and it shows a bit of diagnostic info. The problem appears to be thermal, and from what I can tell, related to the depth sensor. So now I'm trying to set a very low FPS, as a test, and disabling the depth sensor between frames, to see if that has any impact. I will post updates as I find out info.

How can we programmatically enable/disable default iPhone Camera?

I am looking for the way to enable and disable default iPhone camera such as at certain time or latitude/longitude. There are some place where the camera is prohibited, so we can disable it when one reaches at such a place, this is just for an example. Well I thought that disabling and enabling camera in iPhone is not possible. But when my superior gave me the document and said me to check this then I found that its possible to enable/disable default iPhone camera. That document was for enterprise deployment guide, which is associated with enterprise program. There was written the new features of enterprise program and has mentioned
the point of enabling and disabling the default iPhone camera. You can look for the enterprise deployment guide over net and can see that thing. Well I googled for this that how to enable disable the camera, but nothing came. So can you please let me know that how to do this mean enabling disabling camera. Is there any tutorial reference any samples there. Moreover I would like to ask that what is the difference then in enterprise, do we make the apps in the same way in the enterprise as we make for the general developer program.
So how to accomplish this thing enabling/disabling default iPhone camera?
How to implement as well?
well I also thinked same as you are saying that it's not possible. But when I saw the enterprise deployment guide I was shocked.
Here is the link to download this guide and you can have a look over that then you will also come to know that this is possible
Enterprise Deployment Guide
What’s New for the Enterprise in iPhone OS 3.0 and Later
See this para and you can find the point under there where is this mentioned that you can enable/disable camera in iPhone
I'm pretty sure you can't disable the camera arbitrarily. Apple is pretty strict about not letting developers mess with things the user expects to work at all times, and the camera would definitely fall under that category.
So, unless there is some documented, Apple-approved way of doing things, your next best bet is probably jailbreaking and using that to somehow interfere with the camera's operation. I'm afraid I don't know how you'd go about doing that, however.
As for enterprise use and whatnot, I'm not sure, but I would guess that while an iPhone is part of an enterprise network/group/what-have-you, the admins can disable the camera. I doubt that is available programmatically either, however, as it doesn't seem like it would be something made available to developers. So, again, if a method to handle it programmatically isn't mentioned in the documentation you received, it probably doesn't exist.
Allow use of camera: When this option is turned off, the camera is completely
disabled and its icon is removed from the Home screen. Users are unable to take
photographs.
source:
http://manuals.info.apple.com/en_US/Enterprise_Deployment_Guide.pdf
I believe you can if you have gained the Enterprise Edition.

Any other game SDK besides CORONA for the iphone/ipad

Does anyone know of another good game SDK/Engine for the ipad or iphone other than CORONA?
Have a look at Cocos2d
Well since you didn't mention you need it to be free, I'd cast unity into consideration.
It's as powerful as it is expensive ;)
The above answers are great possibilities. I highly recommend unity as it just came out with its newest release that offers a gajillion wonderful features like batch rendering, beast lighting, etc. Its also ridiculously easy to program (im surprised there isn't a 'make this game for me' button in it). The price is worth it. By clicking a button, you can publish your game to pc, Mac, web, iPhone, iPad, xbox, wii, ps3, or android, depending on whether you purchased the license for each. It' bloody magic. Keep in mind that you need to buy the unity pro license before you buy the iOS license. One does not work without the other. It'll be a total of around 3 grand USD, but again totally worth it. Community is rad and helpful too.
If you're going the free route and have some coding chops, I'd run with openFrameworks. It's a c++ wrapper of the iphone sdk and has a very low learning curve. OpenFrameworks was created for artists who wanted to make interactive installations and art games but couldn't get really deep into objective c. Check out zach gage's work (stfj). He made bit pilot, unify, synthpond, and sonic wire sculptor all in open frameworks. He's also releasing his best yet very soon for the iPad. My own company is using oF (openFrameworks) for it's new game releasing this coming Saturday. Try it out. I guarantee you'll find something you love about it.
Good question. For very specific gaming needs, PhoneGap is worth a look. But considering it's JavaScript/ HTML/ CSS, it will not be as fast as the (IMO terrific) Corona. But if your game is in any way more page-related than sprite-animation related, give it a look. I created most of the games at VersusPad.com using PhoneGap, but now switched to Corona.

Level Creator for iPhone Game

I'm making an iPhone game that has several maps with graphics attached. The graphics may allow the player to pass through them or block them. Is there an application for OS X that will allow me to pass some of this work off to a designer without having to reinvent the wheel and develop a map creator.
I'm not 100% sure what you are asking, but if I get the gist I think this may help you out:
http://www.gamesalad.com/ <- Game editor/creator.
It doesn't offer much in the way of flexibility, but may be of some use to you.
Enjoi!