So just before I went away on holiday, I started working on porting the main engine from Babylon 3.3 to Babylon 4.0. Babylon.js is the game engine I use for Cryptovoxels, and it’s been awesome to use - so I was super keen to get on the latest and greatest version.
What I was especially keen on was using the new Shader material that lets me create a nice Physically Based shader, that has my own custom extensions for rendering the greedy mesh we use in CV. Basically, super nice materials, shadows, better fog, all wrapped up in some much more maintainable code.
Anyway - so I got CV running on Babylon 4. But after 3 weeks work (plus 2 weeks in the middle where I was on holiday) - I had to admit that the new Babylon 4 version was way worse than the old Babylon 3 version.
Which makes sense. I spent a year optimising the Babylon 3 version - working around bugs, measuring and speeding things up. Expecting that I could move to a whole new major version of the library in 3 weeks was just way too optimistic.
So I’m throwing that work away.
It’s on a branch, so I’ll probably cherry pick bits out of it in the future, but for now we’re sticking to Babylon 3 - and just making the engine run as fast as I possibly can.
I’m a big believer that major rewrites usually turn to custard. I’ve seen so many big projects that try and change their UI, and their JavaScript framework, and their CSS, all at once - and it’s been a really bad time. The end result is normally something that makes things worse for the users.
And even though the babylon 4 version looks amazing on a strong GPU, it runs like crap and is buggy for most users, and especially mobile.
And this isn’t a slight against Babylon, Babylon is amazing. I just tried to do too much in upgrading the core engine plus rewriting the voxel shader all at once.
So we’re back on 3.3. Features are coming out every day again, and I’ve learnt my lesson.
Next time I try to upgrade a major package in CV, I’m going to do only that, and not try and cram in every other feature I’ve been dreaming of at the same time.
Nice to be back team! 😅