Unity3D: automagic texture quality adapting for iDevices

March 29, 2011 in Unity3D

How to adjust texture quality or size or resolution according to different iDevices

adjust texture quality or size or resolution according to different iDevices

How to adjust texture quality or size or resolution according to different iDevices (iPod, Iphone, iPad etc.) automatically?
You can adjust this via the quality settings (Project settings > Quality) in Unity3D. It’s important that you use Mip Maps in the texture import settings!!! Import the best texture (max. 2048×2048), this will be used for the newest/best devices. Quality settings and Mip Maps will automatically downgrade your textures according to the older/slower devices depending on what you set in the quality settings in the editor.
Use this code somewhere during initialisation

1
2
3
4
5
6
7
8
9
10
11
function Awake(){
if( iPhoneSettings.generation == iPhoneGeneration.iPhone ) 
{ 
QualitySettings.currentLevel = QualityLevel.Fastest;
} 
else if( iPhoneSettings.generation == iPhoneGeneration.iPhone3GS ) 
{ 
QualitySettings.currentLevel = QualityLevel.Fast;
}
else if( iPhoneSettings.generation == iPhoneGeneration.iPhone4G )
{ and so on …}}

Things you should think about before getting into Android development

November 26, 2009 in Unity3D

android

android

- Gameloft is taking a step back (not necessarily for ever), and cuts it’s budget on Android development. Even if this may look a bit cowardish in some eyes. It’s a good idea to think about it. Learning the lessons of mobile development before the iPhone era is definitly a good idea.

- Android OS on different devices/hardware, means fragmentation. Fragmenation means necessarily more resources for adapting your software, easily up to 50% of development time. Means more expensive development. Porting to some crappy devices means less fun.

- If your customers are enthusiastic about android apps developers should be aware that this enthusiasm can easily disappear on any day. Customers just have to discover that it’s a nasty bit more expensive to develop for this new platform. Maybe some customers don’t care about the price because they want to promote there über-movie or new über-phone-device. In this case developers are on the lucky side. Don’t forget to charge enough.

- Currently only 40 paid apps at Android Market. That’s not a good sign. Yeah, I know in 2010 everything is going to be greater for sure… blabla…pumping some hot air into the soap bubble.

- iPhone owners behave differently, they are used and willing to pay for the cool things. And Android customers? They hear “open source” and think of “free apps”. So developers will have another nice marketing task: convincing consumers to pay for apps.

- Currently Android Market is a halfhearted copy of the iTunes App Store. Google and other competitors think it’s just cool to open up their own Apps Store and everything is going to be fine. It won’t! Android needs some real masterpieces (hardware and software), currently it doesn’t. Xperia X10? Droid? Not really! Maybe things will change in 2010 or 2011 or 2012.

- An approval-free Store means more crappy Apps, and pretty sure malicious software. Mr. Kevin Nakao says: ….but T-Mobile proved that an open platform would not be riddled with malware and abuse… In my eyes this is against any experience, any platform with huge dispersion and making money is a potential target for the bad guys. If T-Mobile proved something then maybe that its spread of Android Phones is not large enough (3% vs. Apple’s 33%). Read Mr. Nakao’s entry on TechCrunch to form your own opinion.

- checkout the success story ;-) of larva labs developing for Android. Entry 30th Oct.

- also check featured Derek James on gamasutra

Android has obviously the potential to become a successful story but there is much to improve. I think the only company who can do this is google. They have enough spirit for such a thing but unfortunately not a lot expertise with design. I think they should hire Apple for this part ;-) Don’t get me wrong I would love Android to be a success. Real competition would open up some doors for the real things IMO. If you are well funded you should go ahead developing. Apple woke up the giants, but they are still a little bit dozy.

egging – don’t drop the egg

November 24, 2009 in egging, games, Unity3D

egging - don't drop the egg

egging - don't drop the egg

egging – iPhone Game
The game is available at:
http://itunes.com/apps/egging

Although the gameplay is super simple egging is still really challenging. You won’t survive for very long. That’s why time is measured in milliseconds. egging is for these moments much too short to start any other activity and fits well into these little breaks you definitely need before getting back to work. Yet addictive it takes just a little bit of your time. It’s perfect when waiting and I realized that it can give you kind of a Zen mood due to it’s need of concentration, focusing and repeating (although this esoteric thing was not intended).

egging - screenshots compiled

egging - screenshots compiled


So what is it?! I know this will sound weired at first but did you ever try to balance an egg on a fork? On chopsticks? A knife? I would not advise doing so under real world circumstances you might end up with a slimy mess. Here is your chance doing it virtually and even compete against others via world highscores or against friends (AGON online).

Simulation of real world physics is very realistic, means balancing the virtual egg is quite similar to balancing a real egg. On startup you will find a short instruction just in case. But honestly, I don’t think you will need it. Have fun! You will meet me in the leaderboards.

And hey, I forgot to mention. Level “SPOON” gives you the possibility to combine egging with real-world-body-activity, your own creativity and social context. Figure out some rules with your kids?! Like: make it to the next tree and back or walk on the curbstone. But don’t drop the egg. This level’s rules are up to you.

INSTRUCTION

BASICS
Holding your device parallel to the ground and checking if the menu is nicely aligned makes sure you have a good starting position. Choose a level and balance the egg.

HIGHSCORES
Before being able to enter highscores you have to login with your AGON account.

RULES
Don’t drop the egg! This applies to all levels.

Level spoon: Invent your own rules for parties and other social context. Very good for playing with kids. Timer will be stopped by tapping on it or dropping the egg.

Level fork: balance with fork as long as possible.

Level knife: balance with knife as long as possible.

Level chopsticks: balance with chopsticks, stay on top for 20 Seconds.

AWARDS
You can earn 3 awards. Bronze feather with chopsticks, silver feather with fork and golden feather with knife.

Certificates and Provisioning and Unity3D (Remote) – How it worked for me!

November 6, 2009 in Unity3D

certificates, provisioning, ...

certificates, provisioning, ...


Certificates:
Certification procedure created a total mess on my machine. Took me 2 days to resolve this.

Basically you can/will find a very detailed description at Apple but at the same time also a very confusing description. Apperently you have to do the right steps at the right time. But still, you need to read Apples and Unity How-To at:

http://developer.apple.com/iphone/manage/certificates/team/index.action

file:///Applications/Unity%20iPhone/Unity%20iPhone.app/Contents/Documentation/Documentation/
Components/Account%20Setup%20Help.html
file:///Applications/Unity%20iPhone/Unity%20iPhone.app/Contents/Documentation/Documentation/
Components/Unity%20iPhone%20Basics.html

Start:
You have to be a member in the Apple Developer Program. So get an account first and login. Go to “Program Portal”. Go to menu App ID. Create App ID with Wild Card Asterisk and reverse domain name. Read through Apples How-To to understand.

Step 1:
Download and install AppleWWDRCA. After downloading double-click it. Keychain Access will open, click OK. (Keychain Access is a pre-installed application on your Mac; german: Schlüsselverwaltung)

http://developer.apple.com/certificationauthority/AppleWWDRCA.cer

Step 2:
Create locally on your computer two “Certificate Signing Requests”! One for development and one for distribution. Make sure nothing is selected in main window of Keychain Access. Go to Keychain Access -> Certificate Assistant -> “Request a Certificate From of a Certificate Authority…” . (Also check flag below “save to file” radio button). Save(!) requests with individual names on your computer.

Step 3:
In your Developer account go to “Program Portal” (http://developer.apple.com/iphone/manage/certificates/team/index.action)

Step 4:
In “Program Portal go to “certificates” -> open tab “Development” -> request certificate -> load developer-certificate-signing-request that you created in Step 2 -> Approve it! Refresh page after several seconds: you should see a download button. Download certificate (developer_identity). After downloading double-click it. Keychain Access will open, click OK.

Step 5:
In “Program Portal go to “certificates” -> open tab “Distribution” -> request certificate -> load distribution-certificate-signing-request that you created in Step 2 -> Approve it! Refresh page after several seconds: you should see a download button. Download certificate (distribution_identity). After downloading double-click it. Keychain Access will open, click OK.

Step 6:
In “Program Portal” go to “provisioning” -> open tab “Development” -> click/create “New Profile” ->Submit and approve it! Refresh page after several seconds: you should see a download button. Download provisioning file (name it for example Development.mobileprovision). After downloading drag file onto Xcode or iTunes icon in your Dock to install. Alternatively open Xcode -> window -> organizer -> provisioning -> click on “+” button and load development provisioning file. Detailed description in Apples How-To if necessary.

Step 7:
In “Program Portal” go to “provisioning” -> open tab “Distribution” -> click/create “New Profile” ->Submit and approve it! Refresh page after several seconds: you should see a download button. Download provisioning file (name it for example Distribution.mobileprovision). After downloading drag file onto Xcode or iTunes icon in your Dock to install. Alternatively open Xcode -> window -> organizer -> provisioning -> click on “+” button and load distribution provisioning file. Detailed description in Apples How-To if necessary.

Prepare UnityRemote project or other Xcode projects for building.

Step 1:
UnityRemote is in your Unity iPhone Installation folder. Open UnityRemote.xcodeproj with Xcode. Adjust it’s properties and build settings as described in Apple How-To and Unity-How-To. See links at top of this tutorial.
Select Device at the left side of top bar.

Step 2:
Properties:
group & files -> select Targets: Unity Remote -> click on blue info-button at center of window top-bar -> click tab properties -> enter your identifier with your reverse-domain name e.g com.yourname.UnityRemote

Step 3:
Build:
group & files -> select Targets: Unity Remote -> click on blue info-button at center of window top-bar -> click tab build -> go to “Code Signing”-> go to “Any iPhone Os Device” -> choose your provisioning profile.

Step 4:
Go to Build -> Clean Targets -> OK

Step 5:
restart UnityRemote Xcode project.

Step 6:
Make sure your iPhone is connected and WiFi is running.
Make sure Unity iPhone Application is started.

Step 7:
Build and Go.

Your Unity iPhone Application:

Step 1:
Adjust settings for Unity Player. Open your Unity iPhone Project. -> Edit -> Project settings -> Player. Go to Inspector Window/Tab -> go to iPhone Bundle Identifier -> change settings to com.yourname.yourappname

Step 2: When compiling, don’t save build in your assets folder, but somewhere else. Otherwise you will get errors.

Step 3:
Make sure your iPhone is connected and WiFi is running.

Step 4:
Build!

Unity3D Basic is now Unity and it’s free!

November 3, 2009 in Unity3D

Unity

Unity


Unity is now free of charge. A great opportunity to start with professional game development. Go ahead!
http://unity3d.com/unity/download/