Wednesday, September 23, 2015

Splashy Flipper

Hey there,
couple of weeks ago, I finally released my first game made with the Unity engine, it's called Splashy Flipper and it's inspired by the simple game mechanics of Flappy Bird. Though I tried to add some new elements to the gameplay.
You can play a free WebGL version here, and if you like it, maybe you can buy one of the Stores versions, or make a little bitcoin donation!
The great Mirkojax was so kind to make a video review, thank you Mirko!

Here is a Twitch of me beating the World-record (it has already been beaten again...)

I'll realize a series of "making of" posts, explaining in detail how Splashy Flipper was made, with lots of code samples, describing all the catches I encountered during this amusing journey and the solutions I came up with.
The sum of this posts will be a fairly detailed tutorial on how to make a Flappy Bird like game with Unity.
Stay tuned!

Wednesday, January 21, 2015

Monday, January 19, 2015

InstantOC 2.1.0

So there we are, v 2.1.0 has been finally published!
Should be online on the Asset Store within 3-5 days.
There are some long awaited new features and of course the unavoidable, standard, bug-fixing/cleaning stuff.
Let's see them in detail:

Terrain Occlusion Culling
InstantOC now supports Unity Terrains occlusion culling, this means, if you have multiple terrains, occluded ones won't be rendered. You will have to slice your big terrain into multiple pieces with some tool (like this one), or create it from scratch in pieces like this other tool does.
As before, game objects hidden by hills or mountains, won't be rendered as well.

Occludee Support
Now you can mark transparent objects as occludees; occludees don't occlude other objects, but get occluded by other objects; so if you have a transparent object behind a wall, InstantOC will not render it, but if you see through this transparent object, InstantOC will render any object behind it.
For this to work, you will have to create a layer that will be used automatically by the system, and choose it from the main IOCcam panel. Don't put occludees or other stuff on this layer, InstantOC will use it automatically!

Multiple TAGs Support
This one was asked many times on the thread, it took a while, but it's finally here :-)
Now you are no longer forced to TAG your objects with a specific TAG to use them with InstantOC.
You have the flexibility to enable InstantOC without changing your TAGs setup.
As before, you can always skip the TAG autosetup and add manually the IOClod/IOCterrain/IOClight scripts to your game objects.

PreCull Check Support for lights
This powerful optimization that drastically reduces "flickering" of small and/or distant objects, is now available also to lights occlusion culling. When enabled, distant lights managed by InstantOC won't flicker any more.
A little reminder about PreCull Check: if enabled in editor with multiple views (game + top for instance), the results while playing are unpredictable, it's perfectly fine, it works as expected in full-screen preview and final builds. It's due to the "IsVisible" property of the Unity "Renderer" component, it returns true if a renderer is visible on any active camera/view while playing.
So if you want to check occlusion culling while in editor preview with multiple views, disable PreCull Check, but remember always to enable it for your builds!

Bug-fixing and refactoring
The bug-fix described in the previous post has been obviously included in this update, and some initial code refactoring has started. This will eventually lead to version 3.0.0, which will be much more modular and extensible and offer a greater compatibility with the excellent QuickLOD from Chillersanim. A simple API will emerge, to delight the coding users and enable even deeper control on InstantOC.

Saturday, January 18, 2014

InstantOC 2 bug hunting

Just tried InstantOC 2 with the cool FPS controller Prefab included in the new Unity Sample Assets, there is a little bug preventing the "PreCull Check" option to function correctly.
To both support the old FPS controller Prefab and the new one, simply change line 148 in the "IOClod" script from this:
if(h.transform.tag != iocCam.tag)

to this:

Will submit bug-fix release to the Asset Store in a couple of hours.
Btw, the new Sample Assets are really cool!

Friday, January 17, 2014

InstantOC 2.0.0 live on the Asset Store!

InstantOC 2.0.0 is available on the Asset Store, it will maintain the old price (15$) for 15 days, after that, it will be priced 25$.
So hurry up and get your license until it's in promotion!

In the previous post, the details about this juicy update :-)

Tuesday, January 14, 2014

InstantOC 2

It has been a great year for InstantOC, many bugs have been hunted down, some neat features have been added along the way, and overall, the system has been fine tuned.
Now it's time to add some super awesome new features!
InstantOC 2, in its first release, brings:
  • lights occlusion culling
  • full support for dynamic batching
But let's see them in more detail:

Lights Occlusion Culling
InstantOC lights occlusion culling is based on light probes.
At start up, it creates some probes for every light that you want to be managed by InstantOC.
Probes are little sphere colliders randomly placed in the influence area of the light.
InstantOC takes several parameters into account like light range, cone angle and obstacles in order to effectively place probes only where the surface is really affected by the light.

When the InstantOC ray-caster “senses” these probes, it activates the corresponding light (at full quality).
Thus, in every moment, only those lights that really contribute to the current view are enabled.
For special cases, you can also fine-tune your lights by placing some probes manually exactly where you want them; just drag and drop one or more “probe” prefabs (InstantOC/Resources/ folder) in your scene and make them child objects of the light you are fine-tuning.

Dynamic Batching support
Unity free offers dynamic batching. It's rather painful to make it work (imposes some limitations on models and materials), but eventually it does its job.
InstantOC 2 does not break this fragile balance anymore, as it fully supports dynamic batching.
Using "SharedMaterials" instead of "Materials" did the trick.

Particle Effects Occlusion Culling
Well, this feature was already there, but I wasn't aware!
Unity is very modular and with a pretty nice OO API; like the mesh component which has its renderer, also the particle effects have their own renderer (Shuriken and legacy).
So it turned out, that if you place a particle effect as a child of a game object managed by InstantOC, InstantOC shows/hides the particle renderer exactly like it does for all other renderers, it just works!
Adding features without coding is sort of devs Nirvana ;-)

The 2.x release cycle will bring quite some other stuff, first of all, official support for "occludees", which for instance is really useful for transparent objects.
So stay tuned!

PS: InstantOC 2 is a free upgrade for all InstantOC users, the new price will be 25$ (15$ only for the first 15 days after going live on the Asset Store).