Nowadays people know the price of everything and the value of nothing
Ramblings of
Alex Lovett


Up a Level - Store - Experiments


Lumen - Website - WheelReview - Painting_with_Light - Drawing - Food - GKN - Inspiration - House - Valideus - RoundTree - Reality_2.0 - Math_Art - Lilly - Unity5 - GameDesign - WishList - Fridge - XFactor
Tags: - Games - Unity
Show comments

The way Unity will work on the web is the most confusing bastard stuff in the world

Unity uses Mono for It's scripting
Mono is an custom implementation of the C# spec that Microsoft partially open sourced
the part Unity uses is free due to the open source LGPL license it enjoys

Then Mobile phones happened and Apple do not allow the on the fly compilation that Mono lets you do free
This is done via a JIT VM, just in time virtual machine and is typically how C# is ran, compiled on the fly using magic

instead they have to compile beforehand ( AOT ahead of time ) which Mono wants moneys for... lots and lots of moneys
So they held Unity to ransom ( probably ) as Unity become more successful
Unity said FU... people are happy with the 5 year old version you already sold us
But people were not happy, they cried at weird memory problems and missing features that came with C# 4 and 5 that they could only dream of using, let alone the debugging issues.

And now to get out of this on going problem and finally be able to upgrade to a modern C# with better memory management they will do the following

C# is compiled to an intermediate language ( IL ) using the free part of Mono, this is normally then ran in realtime on a device via the HIT VM ( which Apple won't allow )
But instead Unity will convert this intermediate code into C++ source code, which is then compiled using Enscripten asm.js thingy made? by Firefox guys into a weird JavaScript soup that some how runs fast but looks like computer vomit

Thus taking advantage of a shit ton of work either end that is free and open source and even used and probably contributed to by their competitor Unreal Engine and Mono

They just have to take care of this middle step themselves... now do we trust them to do this part properly?

Already they are claiming "What is so exciting about IL2CPP is the big performance speedups however. We have seen 2-3x speedups on math heavy code."

Still a weird place we find ourselves that ( C# -> IL -> C++ -> JS -> Machine Code ) is a fast intelligent way of making anything.. ever..

Link: --- the-future-of-scripting-in-unity

Link: --- 247039-The-collected-il2cpp-forum-topic

Link: --- on-the-future-of-web-publishing-in-unity

Show comments for 'Unity Future'
Tags: - Photoshop - Games - Unity
Show comments

Decided to enter the "make a T-shirt design for Unity because they can't be bothered to do it themselves" contest. You can win $300 of asset store credit which might be handy, but I just wanted to enter for fun and because quite frankly, it only took 1 hour 20 minutes of my time and I am better than anyone else... in my mind

Well then another 1 hour 20 fiddling with it and making it high res, but you get the idea, I'm a badass is the point I am trying to make

First Draft below:

How can I not win, anyone who is clever enough to both deconstruct the original Unity logo from a cube into the 3 arrow / vectors it is made from and use the cube representation as a mathematical exponent should clearly be worshipped for the god they are

Though something to do with angry birds will probably win instead...

In case the symbolism escapes you, the person at the top ( who should really be outside the circle but T-shirt design is limited to a square area and I have no room ) represents one person going in 'you' effectively, are then multiplied or cubed to the power of Unity resulting in 3 people all looking rather relaxed. It's you x 3 if you use Unity basically. Using Unity is thus like having 3 cooler versions of you.

Nerd / Programmer Humour I know, but hey, you don't get much more nerdy than the Unity in crowd now do you


And in White:

Show comments for 'Unity Shirt'
Tags: - Programming - Games - Unity - Shadowood
Show comments

Ah so simple, yet so not so simple.

I have a lovely fluid solution after many hours, and it renders all onto a flat 2D plane. Now I hadn't really thought much about how the rest of the 3D scene will sit with this fluid. I can't just have it all float over the top of it nor hide underneath it, I need it to merge with the fluid, and as It's a 2D plane by default objects just stick thru it with hard edges ruining the illusion of the 3D for example:

It is quite jarring where the cube suddenly enters the fluid. So I need to mask the fluid away based on the proximity of the cubes or the depth they sit at... simple.. I thought. Nope requires editing shaders which is never simple. But alas I finally prevailed and figured it out, the effect is almost unnoticeable, which is good because it is meant to be something you do not notice, versus clearly noticing how bad the above images is. Also the particles will fade out gently around the cubes not just suddenly get clipped by them.

So it looks better like this

Done with help from this site here:

Link: --- fun-with-shaders-and-the-depth-buffer

Or even betterer like this:

Wonderful, job done ( aside from figuring out how to vertex color particles within the shader now )

Except none of it runs on the actual iOS device DOES IT!!!!!!

So back to the drawing board, and to find a way to capture camera depth that works in iOS and PRAYING all the shader jiggery I am doing will continue to work.

And how nice do a few cubes look ( only after 200 hours in Unity too! )

Phew redid pretty much everything from scratch and got it working on iPad


And Just had the idea to have the fluid depth take into account the brightness of the fluid, so brighter fluid is closer to the camera, to help break up the linear fog, works quite well

Now to just got get particle depth working again, and tidy things up ( remove all the fudge and hack )

Just added Velocity Texture support

Can now do kickass never seen beforeness such as but not limited to: suck in fluid like a crazy blackhole upon hitting a cube, spurt out red jets of fury if you miss a box... and other such nonsense

As it just instances / splats a texture directly into the velocity field such as:

The colours represent the angle to direct the fluid. Hurt my brain working out how to draw such an image in Photoshop but tadda

The above is basically pushing fluid out in allow directions uniformly

FINALLY got the fluid simulation working with none square area... took 17 hours of docking about poking in the dark and fumbling about banging my head



The way I see it you have normal programming like JavaScript lets say that's difficulty 1, then twice as hard as that is doing it really well with proper abstraction and organisation with good performant code being twice as difficult at level 2, then you have writing graphics shaders at level 3, implementing a fluid sim with a shader level 4, writing the formulas used for the fluid sim level 5, and understanding that fucking picture at level 10

But I do keep surprising myself, after sticking with a few 'impossible' tasks for a while, they become... understandable. Most of what makes things look so scary or beyond your capacity is not understanding the language something is written in. When new things use a different vocabulary it creates the impression that it is forever beyond comprehension. Time and time again I have felt this way despite knowing full well I can learn new languages and then suddenly the impossible becomes simple.

I am probably the only human being that has both the persistence and ability to get down and nerdy with a simulation like this, and still possess enough artistic ability and eye for detail to make it look good too... hell I might even be sensible enough to make something people would enjoy playing on top of that... but lets not get too carried away

Most normal people are scared off by how complicated adding feature to a fluid sim are, I am clearly immune to the normal healthy desire to run away screaming

even though this was a side embellishment to a boring whack a mole game, I'm thinking I need to make something that uses this fluid sim as the key gameplay mechanic

hubris aside though... I spent 17 hours just trying to fix the aspect ratio / render in a none square area


Oh and then I checked the performance increase of rendering less pixels / cells in the fluid sim with this fantastic optimisation:

Yup, around 1ms at best..... FFS

On the iPhone the increase is probably a bit higher, but even still.... premature optimisation strikes again

Testing with higher resolution simulation and the result is:

Ooh 2 more frames per second


Well at least it is making a difference... glass half full.. and it is saving some memory... *sigh*

Show comments for 'Foggy Fluid'
Tags: - Programming - Games - Unity - Shadowood
Show comments

Finally gave in after being driven up the wall by MonoDevelop for the last time... Moved to Microsoft VisualStudio on Windows, ah now everything just works-ish

Took forever to get communication working between VisualStudio on Windows and Unity on the Mac, so that you can double click debug logs entries and files in Unity and have it jump to the right Project / File and Line Number in Visual Studio running in a Virtual machine on the Mac. Had to write my own PC EXE acting as a bridge and all kinds of funky stuff... But I just couldn't stand MonoDevelop or Xamarin anymore, they are such junk.

Between that, and upgrading to the new Unity... then upgrading to another new Unity, then upgrading the heart of the FluidSim code from JavaScript to C# version, and moving to iOS 7, and a new iPad.... eaten all my time! No game work done!

And I'm really fretting and struggling around the concept / design / look and feel. I need to nail it down now, but it is impossible to draw or even photoshop mockup any of the themes I have in my head.

Maybe better approach is to have a few visual ideas / concepts and start playing around in Unity bringing them to life, then in a serendipitous manner discover and stumble upon something I like that I may never have thought of otherwise. Just get the wheels moving instead of being stuck in planning limbo.

Show comments for 'Visual Studio Huzzah'
Tags: - Programming - Games - Unity - Shadowood
Show comments

Toying around with various visual concepts in this mockup, I have since abandoned this concept:

Playing around with the idea of using DOF / Spherical Aberrations or 'Bokeh' effects

Show comments for 'Squishy Concepts'
You have reached the end of this page - But there's more! Click Older for more
Subscribe to my News Feed.. or screw you then!
I'm on the verge of tears by the time we arrive at Espace, since I'm positive we won't have a decent table. But we do, and relief washes over me in an awesome wave
Copyright © 2006 - 2021 - Alex Lovett
Site and content designed, built and massaged by
Alex Lovett
( HD6 / HeliosDoubleSix )
contact me by email:
Page Rendered in: 0.045 seconds, like a boss