Counter shader

My counter shader is available in the asset store.
Documentation and demo.

Please let me know if you ran into problems or have a feature request.

Nice 1

Hello Zoltan. First of all thanks for this awesome shader.

I have a question.

I would like to do a a kind of counter like the game “Make it rain”: (Minute over 1:45)

I have create a function in “CounterExpample” Script where I change the target, but the behaviour of the shader moves so slow if I pass a number more than 10.000.

Could you help me in order to raise that question?

BTW, Is it compatible with Mobile devices?? I cant see it on Android version :S

Best Regards!

Hello PabloAM, thank you for buying the asset!

That “flip clock” counter is possible to do but it would need a somewhat complex shader. A much simpler solution is actually rotating a quad polygon in front of another and swapping textures: lighting and shadows would be working out of the box and the shaders involved could be very simple too. Another way would be rendering the frames into a texture and using it on sprites. It would need more memory but the shader would be cheap.

Regarding the slow counter: the current game logic (starting at line 47) is implementing a really crude ease-in/ease-out functionality, just as an example. You could adjust the “minSpeed” and “maxSpeed” variables but I recommend writing your own solution, tailored for your needs. I’d probably use an AnimationCurve to have precise, visual control over how the material parameters change over time.

Unfortunately I can’t test the shader on mobile. Do you have any kind of log or error message which could help narrowing down what goes wrong?

Interested in mobile too. Make apk for us to test

I’m going to install the android SDK and see if I can export the example project.

I can’t make an apk for the example scene:

Error building Player: Win32Exception: ApplicationName=‘C:/Android/adt-bundle-windows-x86_64-20140702/sdk\tools\zipalign.exe’, CommandLine=‘4 “D:\Projects\ZSpline-Counter\Temp/StagingArea/Package_unaligned.apk” “D:\Projects\ZSpline-Counter\Temp/StagingArea/Package.apk”’, CurrentDirectory=‘Temp/StagingArea’

Any ideas?

Really cool asset! Just bought a copy :slight_smile:

Thank you! :slight_smile:

Thanks for reply Zoltan.
I wanted to Android and iOS but is not compatible.

A buy to trash :frowning:

Thanks anyway.

I’m sorry to hear that PabloAM. What is actually happening in the scene? Do you have an error message or a crash log which might help me narrow down the problem?

ZoltanErdokovy I’m having the exact same error making an apk for my application. Could it be the adt-bundle version?

BFips: Unfortunately I have zero experience with mobile development so I’m afraid I can’t help you.