BlockLeftTop, PRELOAD BlockLeftBottom, PRELOAD BlockLeftStretch, PRELOAD BlockTop, PRELOAD BlockBottom, PRELOAD BlockStretch, PRELOAD BlockRightTop, PRELOAD BlockRightBottom, PRELOAD BlockRightStretch, PRELOAD
DeltaEngine

Increasing performance on the iPhone

by Ferdinand Lange 20. March 2009 10:14

After finding our game not running as fast as we expected, I dedicated the last 3 days of work on finding ways to increasing the performance.

There are 2 issues which have a heavy impact on the framerate. Drawcalls and Physics.
Both have several roots and solutions.

For the graphics part you should decrease the drawcalls as much as you can. Since every object has its own drawcall it doesn't take too long to have several hundreds of themm, which is by far too much. What you want to do now is combining them. Basically telling Unity to draw them as one object. This only works for objects that share the same material, so you might consider using the same texture with some fancy UV layouts for several objects. You start by creating an empty gameobject and assigning the desired objects as its child. Next you need the CombineChildren script, which is found in the Standard Assets.unityPackage and assign it to the gameobject you created earlier. Tadaa, all those objects will be drawn in a single drawcall now.
If you're working on a 2d game you also might consider using the SpriteManager class, which is a convenient way to draw lots of sprites in a single call. It supports UV-Animation, Billboarding and other goodies you might enjoy.
You can optimise your lightning by creating lightmaps for your meshes in your 3d composing tool instead of using dynamic lights, since Unity has no baking function.
Another rather unlikely scenario is a too high polycount. But remember just in case: it's an iPhone, it has a tiny display, you won't even see that much of a difference between 500 and 2000 poly characters, and even if, it's still just a phone. :)
That said you should be fairly well if you stay within this stats:
Drawcalls < 30
Polycount < 10k

As for the physics, if you're using a lot of physical objects, you should consider using the simplest collider you can (e.g. enabling Convex mode on MeshColliders, using SphereCollider instead of BoxColliders)
If this doesn't help, you have the possibility to decrease the precision, or increase the collision checking interval. Head to the Menubar>ProjectSettings>Time and increase the Fixed Timestep. Remember that decreasing the physics precision can lead to penetrating objects, objects getting stuck in each other, and other graphical impacts, so you should thoroughly test which works best for you. If you still want to get more out of it you can consider slowing down your gameplay. While doing this you can increase the Fixed Timestep even further.

Fixed Timestep Defaultvalue: 0.02

That sums it up. You can find more detailed explanations and help in the Unity Forums and the irc channel #unity on freenode.org

Happy coding

Can't get used to a Mac?

by Ferdinand Lange 26. February 2009 05:08

So can't we.

While being used to a windows environment, it's really awkward to get used to how a Mac actually gets things done.
Minimizing the window on double clicking the titlebar, programs which are still running though you (thought you) quit them, and where the heck is the friggin' menubar.

Here, however, are some helpful articles to ease the introduction to your brand new Mac.

Top 30 mistakes made by new Mac users
It applied to me for two thirds of the issues :)

10 things every new Mac user should know
Good to know...

10 Applications every new Mac user should download
I havent actually tested those, since i try to use the Mac as little as possible. (But who wants WMP on a Mac anyways?)

Official list of Mac OS X Keyboard shortcuts
For those who are hardcore keyboard shortcuts users or just get confused about how they completely do things differend.

Good luck, you really might need it.

Sound SDK on the iPhone

by Ferdinand Lange 24. February 2009 07:06

Hekkus Sound System recently added support for Mac OS X and the iPhone, which is kinda useful if you want to play OGG files and do some better sound effects. It also has a OpenAL interface and supports many other platforms including cell phones, windows, even .NET and so on. Check it out if you need more advanced sound support.

Tutorial zum Schreiben von Scipte für das Programm Unity3D in Visual Studio

by Ferdinand Lange 21. February 2009 09:04

Unity3D benutzt C# Scripte, die man sehr gut in Visual Studio programmieren kann.

In diesem kleinen Tutorial möchte ich euch kurz erläutern, wie ich das gemacht habe.

 

 

Voraussetzungen:

  • Unity

  • Visual Studio

  • Mac

  • Windows

  • FTP-Server für den Mac

 

1.

Zuerst habe ich ein neues Projekt in Unity3D erstellt, mit dem Namen „UnityTest“.

 

2.

Man muss den FTP-Server auf dem Mac einrichten, so das das Root Verzeichnis im aktuellen Projektordner ist, bzw. ,wo die Scripte liegen sollen.

Bei mir liegt das Rootverzeichnis unter „.../UnityTest/Assets /Scripte/“.

 

3.

Um die UnityEngine.dll und UnityEditor.dll zu bekommen, müsst ihr nur in der Mac Konsole Folgendes eingeben:

 

(für Unity3D)

cp /Applications/Unity/Unity.app/Contents/Frameworks/UnityEngine.dll /Users/yourusername/
cp /Applications/Unity/Unity.app/Contents/Frameworks/UnityEditor.dll /Users/yourusername/

(für Unity3D iPhone)

cp /Applications/Unity\ iPhone/Unity\ iPhone.app/Contents/Frameworks/UnityEngine.dll /Users/yourusername/
cp /Applications/Unity\ iPhone/Unity\ iPhone.app/Contents/Frameworks/UnityEngine.dll /Users/yourusername/

 

anschließend findet ihr die beiden Dateien im euren Benutzerordner wieder.

4.

Als nächstes kopiert ihr die soeben erlangten Dateien auf euren Windows PC in einen Ordner eurer Wahl.

 

5.

Nun habe ich ein neues Konsolen Projekt in Visual Studio erstellt und es „UnityScripte“ genannt.

Darauf hin muss man die beiden dll-Dateien zu den Verweisen hinzufügen.

Nun muss man nur noch einen neuen Ordner im Projektverzeichnis mit dem Namen „Scripte“ erstellen und dort werden alle Scripte gespeichert, die wir auch in der Unity Energy benutzten wollen.

 

6.

Als letztes hab ich mit in diesem Projekt ein kleines Tool programmiert mit dem ich die Scriptdateien per FTP auf meinen Mac transferieren kann.

Es muss nur noch die IP mit dem Port und den User so wie das Passwort in der Program.cs eingetragen werden.

Beim Ausführen des Tools (drücken der F5 Taste) werden alle .cs Dateien und Unterordner aus dem Script-Ordner in unsren Projektordner von Unity3D kopiert, danach muss noch kurz die Appeltaste + R (Refresh) in der Unity Energy gedrückt werden und die Änderungen werden aktualisiert.

 

Dieses Tool stelle ich euch zum downloaden bereit: UnityScripte

 
Disclaimer: The opinions expressed in this blog are own personal opinions and do not represent the companies view.
© 2000-2011 exDream GmbH & MobileBits GmbH. All rights reserved. Legal/Impressum

Poll

Which platform should Soulcraft be released on next?











Show Results Poll Archive

Recent Games

Soulcraft

Fireburst

Jobs @ exDream

Calendar

<<  February 2012  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
2728291234
567891011